CVE-2024-50253
kernel: bpf: Check the validity of nr_words in bpf_iter_bits_new()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · November 9, 2024
Updated · September 14, 2026
Description
A flaw was found in the Linux kernel. A privileged local user could exploit a missing validity check for the nr_words parameter within the Berkeley Packet Filter (BPF) subsystem's bpf_iter_bits_new() function. This could lead to a multiplication overflow, resulting in stack corruption and a denial of service.
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 confirm that unprivileged users cannot utilize eBPF, inspect the kernel.unprivileged_bpf_disabled sysctl. A value of 1 indicates that unprivileged eBPF is disabled, which mitigates this flaw. If the value is 0, set it to 1 using sysctl -w kernel.unprivileged_bpf_disabled=1 and ensure this setting persists across reboots by adding kernel.unprivileged_bpf_disabled = 1 to /etc/sysctl.d/99-sysctl.conf.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-190 · Integer Overflow or Wraparound