Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-40123— bpf: Enforce expected_attach_type for tailcall compatibility

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于attach类型验证不足,可能导致空指针取消引用。

CVSS 7.8 · High EPSS 0.17% · P6

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 16

VendorProduct Version RangeStatus
Linux Linux 5e43f899b03a3492ce5fc44e8900becb04dae9c0< e53a59e7cee5c1605d1ed595933098c2b69108f9 affected
5e43f899b03a3492ce5fc44e8900becb04dae9c0< dc4f348952173beb8ceb15be30b249276eccb605 affected
5e43f899b03a3492ce5fc44e8900becb04dae9c0< a99de19128aec0913f3d529f529fbbff5edfaff8 affected
5e43f899b03a3492ce5fc44e8900becb04dae9c0< 08cb3dc9d2b44f153d0bcf2cb966e4a94b5d0f32 affected
5e43f899b03a3492ce5fc44e8900becb04dae9c0< f856c598080ba7ce1252867b8ecd6ad5bdaf9a6a affected
5e43f899b03a3492ce5fc44e8900becb04dae9c0< c1ad19b5d8e23123503dcaf2d4342e1b90b923ad affected
5e43f899b03a3492ce5fc44e8900becb04dae9c0< 4540aed51b12bc13364149bf95f6ecef013197c0 affected
4.17 affected
… +8 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-40123

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
bpf: Enforce expected_attach_type for tailcall compatibility
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于attach类型验证不足,可能导致空指针取消引用。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 5e43f899b03a3492ce5fc44e8900becb04dae9c0 ~ e53a59e7cee5c1605d1ed595933098c2b69108f9 -
Linux Linux 4.17 -

II. Public POCs for CVE-2025-40123

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-40123

请登录查看更多情报信息。

Patches & Fixes for CVE-2025-40123 (2)

Same Patch Batch · Linux · 2025-11-12 · 96 CVEs total

CVE-2025-40176 9.8 CRITICAL tls: wait for pending async decryptions if tls_strp_msg_hold fails
CVE-2025-40140 8.8 HIGH net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast
CVE-2025-40135 8.1 HIGH ipv6: use RCU in ip6_xmit()
CVE-2025-40158 8.1 HIGH ipv6: use RCU in ip6_output()
CVE-2025-40186 8.1 HIGH tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().
CVE-2025-40204 8.1 HIGH sctp: Fix MAC comparison to be constant-time
CVE-2025-40133 8.1 HIGH mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().
CVE-2025-40168 8.1 HIGH smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().
CVE-2025-40141 8.0 HIGH Bluetooth: ISO: Fix possible UAF on iso_conn_free
CVE-2025-40149 7.8 HIGH tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
CVE-2025-40190 7.8 HIGH ext4: guard against EA inode refcount underflow in xattr update
CVE-2025-40139 7.8 HIGH smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set().
CVE-2025-40151 7.8 HIGH LoongArch: BPF: No support of struct argument in trampoline programs
CVE-2025-40159 7.8 HIGH xsk: Harden userspace-supplied xdp_desc validation
CVE-2025-40165 7.8 HIGH media: nxp: imx8-isi: m2m: Fix streaming cleanup on release
CVE-2025-40174 7.8 HIGH x86/mm: Fix SMP ordering in switch_mm_irqs_off()
CVE-2025-40172 7.8 HIGH accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()
CVE-2025-40170 7.8 HIGH net: use dst_dev_rcu() in sk_setup_caps()
CVE-2025-40169 7.8 HIGH bpf: Reject negative offsets for ALU ops
CVE-2025-40167 7.8 HIGH ext4: detect invalid INLINE_DATA + EXTENTS flag combination

Showing top 20 of 96 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-40123

No comments yet


Leave a comment