libbpf: Heap Buffer Overflow in libbpf
Published Apr 7, 2025
7.3
HIGHCVSS 3.1
EPSS 0.24%
Description
Buffer Overflow vulnerability in libbpf 1.5.0 allows a local attacker to execute arbitrary code via the bpf_object__init_prog` function of libbpf. This has been disputed by third parties who assert that "no one in their sane mind should be passing untrusted ELF files into libbpf while running under root."
Affected products
No data.
- 1.5.0
No data.
Red Hat Enterprise Linux 10
libbpf
Not affected
Red Hat Enterprise Linux 8
libbpf
Not affected
Red Hat Enterprise Linux 9
libbpf
Not affected
Red Hat OpenShift Container Platform 4
openshift/ose-rhel-coreos-8
Not affected
Red Hat OpenShift Container Platform 4
openshift/ose-rhel-coreos-9
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | libbpf | Not affected | n/a |
| Red Hat Enterprise Linux 8 | libbpf | Not affected | n/a |
| Red Hat Enterprise Linux 9 | libbpf | Not affected | n/a |
| Red Hat OpenShift Container Platform 4 | openshift/ose-rhel-coreos-8 | Not affected | n/a |
| Red Hat OpenShift Container Platform 4 | openshift/ose-rhel-coreos-9 | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This vulnerability is rated as a moderate severity because here heap buffer overflow vulnerability exists in the bpf_object__init_prog function of libbpf where this issue occurs due to missing boundary checks when copying BPF instructions from a malformed ELF file leading to memory corruption during memcpy and the impact of the issue is a crash of the application using libbpf when it loads a malicious BPF object file, the overflow could allow limited memory corruption.
References (6)
- https://access.redhat.com/security/cve/CVE-2025-29481 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2358023 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-10438 Advisory
- https://github.com/lmarch2/poc/blob/main/libbpf/libbpf.md exploitThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2025-29481
- https://www.cve.org/CVERecord?id=CVE-2025-29481
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2025-29481 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2358023 | Issue Tracking | |
| https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-10438 | Advisory | |
| https://github.com/lmarch2/poc/blob/main/libbpf/libbpf.md | exploitThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-29481 | ||
| https://www.cve.org/CVERecord?id=CVE-2025-29481 |
Change history (0)
No recorded changes yet.