# CVE-2022-49030: libbpf: Handle size overflow for ringbuf mmap

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-02)
- Published: 2024-10-21T20:06:34.571Z
- Modified: 2026-08-05T08:53:34.621Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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 * max_entries
will overflow u32 when mapping producer page and data pages. Only
casting max_entries to size_t is not enough, because for 32-bits
application on 64-bits kernel the size of read-only mmap region
also could overflow size_t.

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.

(As written by CVE List.)

## Affected

- Linux Linux: from bf99c936f9478a05d51e9f101f90de70bee9a89c before 8a549ab6724520aa3c07f47e0eba820293551490; from bf99c936f9478a05d51e9f101f90de70bee9a89c before 0140e079a42064680394fff1199a7b5483688dec; from bf99c936f9478a05d51e9f101f90de70bee9a89c before 535a25ab4f9a45f74ba38ab71de95e97474922ed; from bf99c936f9478a05d51e9f101f90de70bee9a89c before 927cbb478adf917e0a142b94baa37f06279cc466; 5.8 (not affected: before 5.8; from 5.10.158 up to 5.10.*; from 5.15.82 up to 5.15.*; from 6.0.12 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.8 before 5.10.158; from 5.11 before 5.15.82; from 5.16 before 6.0.12; 6.1

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/8a549ab6724520aa3c07f47e0eba820293551490> (patch)
- <https://git.kernel.org/stable/c/0140e079a42064680394fff1199a7b5483688dec> (patch)
- <https://git.kernel.org/stable/c/535a25ab4f9a45f74ba38ab71de95e97474922ed> (patch)
- <https://git.kernel.org/stable/c/927cbb478adf917e0a142b94baa37f06279cc466> (patch)

## Sources

- CVE List: [CVE-2022-49030](https://www.cve.org/CVERecord?id=CVE-2022-49030), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-49030](https://nvd.nist.gov/vuln/detail/CVE-2022-49030), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-49030 · Whole record: https://cve.day/CVE-2022-49030.json · Rebuilt by cve.day 2026-11-25T22:58:20.042Z
