CVE Database›CVE-2024-47675

CVE-2024-47675

kernel: bpf: Fix use-after-free in bpf_uprobe_multi_link_attach()

Loading…

Severity

Moderate

Red Hat Product Security

6.7

CVSS 3.1

Review impact separately from score.

Published · October 21, 2024

Updated · October 29, 2026

Description

A flaw was found in the Linux kernel's extended Berkeley Packet Filter (eBPF) subsystem. A privileged local attacker, with CAP_SYS_ADMIN capabilities or root access, could exploit a use-after-free vulnerability in the bpf_uprobe_multi_link_attach() function. This issue arises when bpf_link_prime() fails, leading to improper memory handling. Successful exploitation could result in memory corruption, potentially allowing for a denial of service or privilege escalation.

Statement

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 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

Ensure the kernel.unprivileged_bpf_disabled sysctl is set to 1 to prevent unprivileged users from utilizing eBPF, thereby mitigating this flaw.

To check the current setting:

cat /proc/sys/kernel/unprivileged_bpf_disabled

To set it permanently, create or modify a sysctl configuration file:

echo "kernel.unprivileged_bpf_disabled = 1" > /etc/sysctl.d/99-disable-unprivileged-bpf.conf
sysctl -p /etc/sysctl.d/99-disable-unprivileged-bpf.conf

A system reboot may be required for the change to take full effect if the kernel module was already loaded with a different setting.

CVSS / CWE

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

CWE-416 · Use After Free