CVE Database›CVE-2024-47703

CVE-2024-47703

kernel: bpf, lsm: Add check for BPF LSM return value

Loading…

Severity

Moderate

Red Hat Product Security

4.4

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 Berkeley Packet Filter (BPF) and Linux Security Module (LSM) subsystems. A privileged local attacker could exploit this by attaching a BPF program that returns a positive number to the file_alloc_security hook. This misinterpretation of the return value by the file system can lead to a kernel panic, resulting in a Denial of Service (DoS).

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

To mitigate this issue, ensure that unprivileged users are prevented from using eBPF. This can be confirmed by checking the kernel.unprivileged_bpf_disabled sysctl. A value of 1 indicates that unprivileged eBPF usage is disabled, which prevents exploitation.

To check the current setting: cat /proc/sys/kernel/unprivileged_bpf_disabled

If the value is 0, set it to 1: echo 1 > /proc/sys/kernel/unprivileged_bpf_disabled

For persistent configuration across reboots, add or modify the following line in /etc/sysctl.d/99-sysctl.conf (or a similar sysctl configuration file): kernel.unprivileged_bpf_disabled = 1

Then, apply the changes: sysctl -p

CVSS / CWE

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

CWE-681 · Incorrect Conversion between Numeric Types