All reports
Low

libbpf: heap-based buffer overflow (4 bytes) in __bpf_object__open

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2021-45940

Probability of exploitation in the next 30 days: 1.25%

FIRST EPSS · 2026-11-17

Description

libbpf 0.6.0 and 0.6.1 has a heap-based buffer overflow (4 bytes) in __bpf_object__open (called from bpf_object__open_mem and bpf-object-fuzzer.c).

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.