CVE Database›CVE-2022-3534

CVE-2022-3534

Kernel: use-after-free in btf_dump_name_dups in tools/lib/bpf/btf_dump.c

Loading…

Severity

Low

Red Hat Product Security

4.3

CVSS 3.1

Review impact separately from score.

Published · October 13, 2022

Updated · July 29, 2026

Description

A use-after-free flaw was found in btf_dump_name_dups in tools/lib/bpf/btf_dump.c in libbpf in the Linux Kernel. This issue occurs because the key stored in the hash table name_map is a string address, and the string memory is allocated by realloc() function. When the memory is resized by realloc() later, the old memory may be freed.

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

The default Red Hat Enterprise Linux kernel prevents unprivileged users from being able to use eBPF by the kernel.unprivileged_bpf_disabled sysctl. This would require a privileged user with CAP_SYS_ADMIN or root to be able to abuse this flaw reducing its attack space.

For the Red Hat Enterprise Linux 8 to confirm the current state, inspect the sysctl with the command:

cat /proc/sys/kernel/unprivileged_bpf_disabled

The setting of 1 would mean that unprivileged users can not use eBPF, mitigating the flaw.

CVSS / CWE

CVSS 3.1 · 4.3
CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L

CWE-416 · Use After Free