CVE-2024-47703
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.
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`
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 4.4 | 5.5 | 7.8 |
| Attack Vector | Local | Local | Local |
| Attack Complexity | Low | Low | Low |
| Privileges Required | High | Low | Low |
| User Interaction | None | None | None |
| Scope | Unchanged | Unchanged | Unchanged |
| Confidentiality | None | None | High |
| Integrity Impact | None | None | High |
| Availability Impact | High | High | High |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
cve.org: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Other,Integrity
Technical Impact: Unexpected State; Quality Degradation
The program could wind up using the wrong number and generate incorrect results. If the number is used to allocate resources or make a security decision, then this could introduce a vulnerability.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.