Heap-based buffer overflow in libbpf



| Updated: 2025-05-01
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2021-45940
CWE-ID CWE-122
Exploitation vector Network
Public exploit N/A
Vulnerable software
libbpf
Other software / Other software solutions

Vendor libbpf

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Heap-based buffer overflow

EUVDB-ID: #VU108110

Risk: Medium

CVSSv4.0: 4.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green]

CVE-ID: CVE-2021-45940

CWE-ID: CWE-122 - Heap-based Buffer Overflow

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform a denial of service attack.

The vulnerability exists due to a boundary error within the __bpf_object__open (called from bpf_object__open_mem and bpf-object-fuzzer.c). A remote attacker can create a specially crafted file, trick the victim into opening it, trigger heap-based buffer overflow and perform a denial of service attack.

Mitigation

Install update from vendor's website.

Vulnerable software versions

libbpf: 0.6.0 - 0.6.1

CPE2.3 External links

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40868
https://github.com/google/oss-fuzz-vulns/blob/main/vulns/libbpf/OSV-2021-1562.yaml


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###