Skip to main content

Linux Kernel CVE-2025-40123

HIGH
2025-11-12 416baaa9-dc9f-4396-8d5f-8c081fb06d67
High
Disputed · 7.8 Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Sources disagree (Low–High)
Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
5.5 MEDIUM

Requires local privilege to load BPF programs (PR:L); demonstrated impact is a NULL pointer dereference crash so A:H with C:N/I:N, as no confidentiality/integrity compromise is shown in the data.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat
4.4 LOW
qualitative

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

8
Analysis Updated
Jul 30, 2026 - 09:13 vuln.today
v4 (cvss_changed)
Analysis Updated
Jul 30, 2026 - 09:13 vuln.today
v3 (cvss_changed)
Analysis Updated
Jul 30, 2026 - 09:12 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 30, 2026 - 06:37 vuln.today
cvss_changed
CVSS changed
Jul 30, 2026 - 06:37 NVD
7.8 (HIGH)
Patch released
Mar 28, 2026 - 19:31 nvd
Patch available
Analysis Generated
Mar 28, 2026 - 19:21 vuln.today
CVE Published
Nov 12, 2025 - 11:15 nvd
N/A

DescriptionCVE.org

In the Linux kernel, the following vulnerability has been resolved:

bpf: Enforce expected_attach_type for tailcall compatibility

Yinhao et al. recently reported:

Our fuzzer tool discovered an uninitialized pointer issue in the bpf_prog_test_run_xdp() function within the Linux kernel's BPF subsystem. This leads to a NULL pointer dereference when a BPF program attempts to deference the txq member of struct xdp_buff object.

The test initializes two programs of BPF_PROG_TYPE_XDP: progA acts as the entry point for bpf_prog_test_run_xdp() and its expected_attach_type can neither be of be BPF_XDP_DEVMAP nor BPF_XDP_CPUMAP. progA calls into a slot of a tailcall map it owns. progB's expected_attach_type must be BPF_XDP_DEVMAP to pass xdp_is_valid_access() validation. The program returns struct xdp_md's egress_ifindex, and the latter is only allowed to be accessed under mentioned expected_attach_type. progB is then inserted into the tailcall which progA calls.

The underlying issue goes beyond XDP though. Another example are programs of type BPF_PROG_TYPE_CGROUP_SOCK_ADDR. sock_addr_is_valid_access() as well as sock_addr_func_proto() have different logic depending on the programs' expected_attach_type. Similarly, a program attached to BPF_CGROUP_INET4_GETPEERNAME should not be allowed doing a tailcall into a program which calls bpf_bind() out of BPF which is only enabled for BPF_CGROUP_INET4_CONNECT.

In short, specifying expected_attach_type allows to open up additional functionality or restrictions beyond what the basic bpf_prog_type enables. The use of tailcalls must not violate these constraints. Fix it by enforcing expected_attach_type in __bpf_prog_map_compatible().

Note that we only enforce this for tailcall maps, but not for BPF devmaps or cpumaps: There, the programs are invoked through dev_map_bpf_prog_run*() and cpu_map_bpf_prog_run*() which set up a new environment / context and therefore these situations are not prone to this issue.

AnalysisAI

Local privilege-constrained denial of service (and potential broader constraint bypass) in the Linux kernel BPF subsystem allows a user who can load BPF programs to bypass expected_attach_type enforcement via tailcall maps. A program can tailcall into an incompatible program whose verifier access rules were relaxed by its expected_attach_type (e.g. an XDP program returning xdp_md->egress_ifindex or a CGROUP_SOCK_ADDR program calling bpf_bind()), reaching code paths that dereference uninitialized state - demonstrated as a NULL pointer dereference of xdp_buff->txq in bpf_prog_test_run_xdp(). No public exploit identified at time of analysis; EPSS probability is very low (0.05%, 16th percentile) and it is not listed in CISA KEV.

Technical ContextAI

BPF (Berkeley Packet Filter) programs in the Linux kernel are typed via bpf_prog_type, but many types further specialize behavior through expected_attach_type. The verifier's access checkers (xdp_is_valid_access(), sock_addr_is_valid_access()) and helper-proto selectors (sock_addr_func_proto()) grant or deny access to specific context fields and helpers based on that expected_attach_type - for example XDP's egress_ifindex is only readable for BPF_XDP_DEVMAP/CPUMAP, and bpf_bind() is only permitted for BPF_CGROUP_INET4_CONNECT. Tailcalls, implemented via BPF_MAP_TYPE_PROG_ARRAY (prog-array) maps, let one program jump into another at runtime. The compatibility gate __bpf_prog_map_compatible() previously validated only the base prog_type and not expected_attach_type, so a program running in a context that never set up (for instance) an xdp_buff->txq could tailcall into a program compiled under assumptions that the field is valid, producing an uninitialized/NULL pointer dereference. The fix enforces expected_attach_type matching in __bpf_prog_map_compatible() for tailcall maps; devmap/cpumap paths are exempt because dev_map_bpf_prog_run*()/cpu_map_bpf_prog_run*() establish a fresh context. No CWE was assigned in the input, but the root cause is a class of uninitialized-pointer / NULL pointer dereference stemming from missing type-constraint enforcement (akin to CWE-824/CWE-476).

Affected ProductsAI

The Linux kernel BPF subsystem (mainline and stable branches) is affected; the exact affected version ranges are not enumerated in the provided data but are addressed across five stable-tree commits (git.kernel.org/stable/c/08cb3dc9d2b44f153d0bcf2cb966e4a94b5d0f32, 4540aed51b12bc13364149bf95f6ecef013197c0, a99de19128aec0913f3d529f529fbbff5edfaff8, c1ad19b5d8e23123503dcaf2d4342e1b90b923ad, and f856c598080ba7ce1252867b8ecd6ad5bdaf9a6a). Ubuntu confirms affected kernels via security notices USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1). No CPE strings were provided in the input, so precise version boundaries should be confirmed against each distribution's advisory.

RemediationAI

Patch available per vendor advisory: apply the stable-kernel commits that enforce expected_attach_type in __bpf_prog_map_compatible() (the five git.kernel.org/stable commits listed above) or install your distribution's fixed kernel - Ubuntu users should update to the versions specified in USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1) and reboot; exact fixed package versions are enumerated in those USNs. Because a released tagged kernel version is not stated in the input, cite the commit hashes rather than an invented version number. As a compensating control where patching is delayed, restrict who can load BPF programs: ensure unprivileged BPF is disabled by setting kernel.unprivileged_bpf_disabled=1 (sysctl), which prevents non-root users from loading programs and largely removes the local attack surface at the cost of breaking any legitimate unprivileged-BPF workloads; additionally avoid granting CAP_BPF/CAP_SYS_ADMIN to untrusted workloads and constrain container capabilities (e.g. seccomp/AppArmor profiles that block bpf() syscalls), noting this will disable in-container BPF tooling such as some observability agents.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/sl-micro/6.0/baremetal-os-container:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.95 Image SL-Micro Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.115 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.146 Affected
Container suse/sl-micro/6.0/toolbox:latest Affected

Share

CVE-2025-40123 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy