CVE-2025-40078
Description
A vulnerability was discovered in the Linux kernel’s Berkeley Packet Filter (BPF) subsystem related to insufficient access validation in the sock_addr context. The BPF verifier did not explicitly reject access to a 4-byte implicit padding following the msg_src_ip4 field within the bpf_sock_addr structure. Syzkaller, a kernel testing and fuzzing tool, identified a kernel warning triggered when a BPF program attempted to read from this padding, revealing that the sock_addr_is_valid_access function did not enforce a complete set of bounds checks. A patch has been applied upstream to explicitly validate all relevant fields and prevent out-of-bounds access.
Mitigation
To mitigate this issue, restrict unprivileged users from loading BPF programs by setting `kernel.unprivileged_bpf_disabled` to 1. This can be achieved by running `sysctl -w kernel.unprivileged_bpf_disabled=1` or by adding `kernel.unprivileged_bpf_disabled = 1` to `/etc/sysctl.d/99-sysctl.conf` and applying with `sysctl -p`. This may affect applications that utilize unprivileged BPF. A system reboot may be required.
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).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 5.5 | N/A | N/A |
| Attack Vector | Local | N/A | N/A |
| Attack Complexity | Low | N/A | N/A |
| Privileges Required | Low | N/A | N/A |
| User Interaction | None | N/A | N/A |
| Scope | Unchanged | N/A | N/A |
| Confidentiality | None | N/A | N/A |
| Integrity Impact | None | N/A | N/A |
| Availability Impact | High | N/A | N/A |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Understanding the Weakness (CWE)
Availability
Technical Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory)
An attacker could provide unexpected values and cause a program crash or arbitrary control of resource allocation, leading to excessive consumption of resources such as memory and CPU.
Confidentiality
Technical Impact: Read Memory; Read Files or Directories
An attacker could read confidential data if they are able to control resource references.
Integrity,Confidentiality,Availability
Technical Impact: Modify Memory; Execute Unauthorized Code or Commands
An attacker could use malicious input to modify data or possibly alter control flow in unexpected ways, including arbitrary command execution.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.