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"
}[
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49030-1d854cd4",
"target": {
"file": "tools/lib/bpf/ringbuf.c",
"function": "ring_buffer__add"
},
"digest": {
"length": 2133.0,
"function_hash": "33826064554763964099384641097249816004"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0140e079a42064680394fff1199a7b5483688dec"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49030-3bf47977",
"target": {
"file": "tools/lib/bpf/ringbuf.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"182041646045616935075848235808817900572",
"276683600360101321145863222240346408826",
"33649977801050699099361130284700725105",
"283627357449336340006601979964091912221",
"276317405728567544823796923615182929228",
"46777037936822841379590930563008198407",
"138311094736446075425802932985555985416",
"107637971047441962357732350238078909639",
"136499186092732013595400627348992744733",
"182563691373873487976168251486197840338",
"188085388368847728133562354076456569971",
"165067792517251921141928653244902384967",
"326785604433909825714773728980403031844",
"58577921407521784359618108709912564224"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@535a25ab4f9a45f74ba38ab71de95e97474922ed"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49030-93aee4b8",
"target": {
"file": "tools/lib/bpf/ringbuf.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"182041646045616935075848235808817900572",
"276683600360101321145863222240346408826",
"33649977801050699099361130284700725105",
"283627357449336340006601979964091912221",
"276317405728567544823796923615182929228",
"46777037936822841379590930563008198407",
"138311094736446075425802932985555985416",
"107637971047441962357732350238078909639",
"136499186092732013595400627348992744733",
"182563691373873487976168251486197840338",
"188085388368847728133562354076456569971",
"165067792517251921141928653244902384967",
"326785604433909825714773728980403031844",
"58577921407521784359618108709912564224"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0140e079a42064680394fff1199a7b5483688dec"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49030-eeaffccb",
"target": {
"file": "tools/lib/bpf/ringbuf.c",
"function": "ring_buffer__add"
},
"digest": {
"length": 2133.0,
"function_hash": "33826064554763964099384641097249816004"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@535a25ab4f9a45f74ba38ab71de95e97474922ed"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49030.json"