In the Linux kernel, the following vulnerability has been resolved:
libbpf: Handle size overflow for ringbuf mmap
The maximum size of ringbuf is 2GB on x86-64 host, so 2 * maxentries will overflow u32 when mapping producer page and data pages. Only casting maxentries to sizet is not enough, because for 32-bits application on 64-bits kernel the size of read-only mmap region also could overflow sizet.
So fixing it by casting the size of read-only mmap region into a __u64 and checking whether or not there will be overflow during mmap.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49030.json"
}