CVE-2022-49030

libbpf: Handle size overflow for ringbuf mmap

HIGH
7.8
CVSS Score
Published: October 21, 2024 at 08:06 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.11 ≤ v < 5.15.825.16 ≤ v < 6.0.125.8 ≤ v < 5.10.1585.8 ≤ v < 5.15.825.8 ≤ v < 6.0.125.8 ≤ v < 6.16.1 rc16.1 rc26.1 rc36.1 rc46.1 rc56.1 rc66.1 rc7bf99c936f9478a05d51e9f101f90de70bee9a89c
Vendor states this is fixed in 0140e079a42064680394fff1199a7b5483688dec (fixed)
Vendor states this is fixed in 535a25ab4f9a45f74ba38ab71de95e97474922ed (fixed)
Vendor states this is fixed in 8a549ab6724520aa3c07f47e0eba820293551490 (fixed)
Vendor states this is fixed in 927cbb478adf917e0a142b94baa37f06279cc466 (fixed)
Vendor states this is fixed in 5.10.158 (unaffected)
Vendor states this is fixed in 5.15.82 (unaffected)
Vendor states this is fixed in 5.8 (unaffected)
Vendor states this is fixed in 6.0.12 (unaffected)
Vendor states this is fixed in 6.1 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0140e079a42064680394fff1199a7b5483688dec
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/535a25ab4f9a45f74ba38ab71de95e97474922ed
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8a549ab6724520aa3c07f47e0eba820293551490
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/927cbb478adf917e0a142b94baa37f06279cc466

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-190

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card