Skip to main content
EPSS 0.2%top 95%

In the Linux kernel, the following vulnerability has been resolved: bpf: Enforce expected_attach_type for tailcall compatibility Yinhao et al. (CVE-2025-40123)

0
High
Published: 11/12/2025 (11/12/2025, 12:30:27 UTC)
Source: GCVE Database

Description

A vulnerability in the Linux kernel's BPF subsystem involving tailcall compatibility and enforcement of expected_attach_type has been resolved. The issue arises from an uninitialized pointer in the bpf_prog_test_run_xdp() function, leading to a NULL pointer dereference when accessing the txq member of the xdp_buff structure. The flaw involves improper enforcement of expected_attach_type constraints during tailcalls between BPF programs, potentially allowing invalid access patterns. The fix enforces expected_attach_type checks in __bpf_prog_map_compatible() for tailcall maps to prevent violations. This vulnerability affects the kernel's BPF subsystem and related program types that rely on expected_attach_type for access control.

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 16:42:51 UTC

Technical Analysis

The Linux kernel vulnerability CVE-2025-40123 concerns the BPF subsystem's handling of expected_attach_type during tailcalls between BPF programs. A fuzzer discovered an uninitialized pointer issue in bpf_prog_test_run_xdp(), causing a NULL pointer dereference when a BPF program dereferences the txq member of an xdp_buff object. The root cause is that tailcalls between BPF programs did not properly enforce expected_attach_type compatibility, allowing programs to bypass restrictions tied to their attach types. The fix enforces expected_attach_type checks in the __bpf_prog_map_compatible() function for tailcall maps, ensuring that tailcalls do not violate attach type constraints. This enforcement does not apply to BPF devmaps or cpumaps, as those invoke programs in a different context. The vulnerability has been resolved in the Linux kernel.

Potential Impact

Exploitation of this vulnerability could lead to a NULL pointer dereference in the kernel, causing denial of service (kernel crash). Additionally, improper enforcement of expected_attach_type constraints could allow BPF programs to perform unauthorized operations or access restricted kernel data, potentially leading to privilege escalation or other security breaches. The CVSS 3.1 vector indicates local attack vector with low complexity, requiring low privileges, no user interaction, and results in high confidentiality, integrity, and availability impact.

Mitigation Recommendations

A fix for this vulnerability has been implemented in the Linux kernel by enforcing expected_attach_type checks for tailcall maps in the BPF subsystem. Users and administrators should apply the official Linux kernel updates that include this patch. Since this is a kernel-level issue, upgrading to a patched kernel version is the recommended mitigation. Patch status is not explicitly stated in the provided data; therefore, check the vendor or Linux kernel advisory for the exact fixed versions and update accordingly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-f5hr-qj5q-hc8f
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40123"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d69c2644c7f847abca

Added to database: 07/30/2026, 15:50:46 UTC

Last enriched: 07/30/2026, 16:42:51 UTC

Last updated: 09/10/2026, 19:26:55 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses