CVE-2021-45940
libbpf: heap-based buffer overflow (4 bytes) in __bpf_object__open
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 1, 2022
Updated · June 27, 2026
Description
A flaw was found in libbpf. The vulnerability occurs due to incorrect handling of memory in the __bpf_object__open function and leads to a heap-buffer-overflow. This flaw allows an attacker to execute unauthorized code or commands, read memory, or modify memory.
Statement
The default Red Hat Enterprise Linux kernel prevents unprivileged users from being able to use eBPF.That means to exploit this vulnerability it would require a privileged user with CAP_SYS_ADMIN or root making the severity of this vulnerability as low.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 4.5CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:N/A:H
CWE-131 · Incorrect Calculation of Buffer Size