{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-49030",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-08-22T01:27:53.651Z",
        "datePublished": "2024-10-21T20:06:34.571Z",
        "dateUpdated": "2026-08-05T08:53:34.621Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:53:34.621Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nlibbpf: Handle size overflow for ringbuf mmap\n\nThe maximum size of ringbuf is 2GB on x86-64 host, so 2 * max_entries\nwill overflow u32 when mapping producer page and data pages. Only\ncasting max_entries to size_t is not enough, because for 32-bits\napplication on 64-bits kernel the size of read-only mmap region\nalso could overflow size_t.\n\nSo fixing it by casting the size of read-only mmap region into a __u64\nand checking whether or not there will be overflow during mmap."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug is in userspace libbpf (`ring_buffer__add` in tools/lib/bpf/ringbuf.c), reached only when a local process mmaps a BPF_MAP_TYPE_RINGBUF fd; no network or adjacent-protocol path exists.\nAC:L - Creating a 2GB (power-of-two) RINGBUF and calling ring_buffer__new/__add deterministically overflows `2 * max_entries` as u32, so mmap maps only one page; no race or attacker-uncontrollable layout is required.\nPR:L - Unprivileged local users can open this path when unprivileged BPF is enabled (common across much of the affected 5.8+ window), and CAP_BPF alone (not full root) suffices when unprivileged BPF is disabled.\nUI:N - The attacker runs an affected libbpf consumer end-to-end against their own (or an attacker-supplied) map fd; no separate victim action is required.\nS:U - Corruption is confined to the calling process’s address space; libbpf and its caller share one security authority with no VM/IOMMU/sandbox escape.\nC:H - With mask≈2GB-1 over a one-page mapping, ringbuf_process_ring indexes far beyond the VMA and can read adjacent readable mappings, and sample callbacks receive those wild pointers.\nI:H - On 64-bit, ringbuf_unmap_ring munmaps ~4GiB from a 4KiB mapping and tears down neighboring VMAs, a classic unmap/remap memory-corruption primitive that enables control-flow hijack in the process.\nA:H - Consume walks unmapped addresses and causes SIGSEGV, and the oversized munmap can unmap libraries/heap and crash the process; both are repeatable at will."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "tools/lib/bpf/ringbuf.c"
                    ],
                    "versions": [
                        {
                            "version": "bf99c936f9478a05d51e9f101f90de70bee9a89c",
                            "lessThan": "8a549ab6724520aa3c07f47e0eba820293551490",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bf99c936f9478a05d51e9f101f90de70bee9a89c",
                            "lessThan": "0140e079a42064680394fff1199a7b5483688dec",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bf99c936f9478a05d51e9f101f90de70bee9a89c",
                            "lessThan": "535a25ab4f9a45f74ba38ab71de95e97474922ed",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bf99c936f9478a05d51e9f101f90de70bee9a89c",
                            "lessThan": "927cbb478adf917e0a142b94baa37f06279cc466",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "tools/lib/bpf/ringbuf.c"
                    ],
                    "versions": [
                        {
                            "version": "5.8",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.8",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.158",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.82",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.12",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "5.10.158"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "5.15.82"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "6.0.12"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.8",
                                    "versionEndExcluding": "6.1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/8a549ab6724520aa3c07f47e0eba820293551490"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0140e079a42064680394fff1199a7b5483688dec"
                },
                {
                    "url": "https://git.kernel.org/stable/c/535a25ab4f9a45f74ba38ab71de95e97474922ed"
                },
                {
                    "url": "https://git.kernel.org/stable/c/927cbb478adf917e0a142b94baa37f06279cc466"
                }
            ],
            "title": "libbpf: Handle size overflow for ringbuf mmap",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2022-49030",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-10-22T13:11:21.316890Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-10-22T13:18:35.905Z"
                }
            }
        ]
    }
}