CVE Database›Document archive›CVE-2024-50203

CVE-2024-50203

kernel: bpf, arm64: Fix address emission with tag-based KASAN enabled

Loading…

Severity

Moderate

Red Hat Product Security

6.7

CVSS 3.1

Review impact separately from score.

Published · November 8, 2024

Updated · September 14, 2026

Description

A flaw was found in the Linux kernel. Specifically, within the Berkeley Packet Filter (BPF) component, an issue arises when BPF_TRAMP_F_CALL_ORIG is enabled. During address emission, an incorrect size calculation can lead to a heap buffer overflow, where more data is written to a memory block than it was allocated for. This could allow a privileged local attacker to potentially cause a denial of service or execute arbitrary code. The default kernel configuration restricts unprivileged users from using eBPF, which reduces the attack surface for this vulnerability.

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. This is the default configuration in Red Hat Enterprise Linux. To verify the current setting:

cat /proc/sys/kernel/unprivileged_bpf_disabled

If the value is 0, set it to 1 for the current session using:

sysctl -w kernel.unprivileged_bpf_disabled=1

To make this change persistent across reboots, add kernel.unprivileged_bpf_disabled = 1 to a new file in /etc/sysctl.d/ (e.g., /etc/sysctl.d/99-disable-unprivileged-bpf.conf) and then apply with sysctl -p. This action limits the functionality of unprivileged eBPF programs.

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-787 · Out-of-bounds Write