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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2025-40256— xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added

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存在安全漏洞,该漏洞源于未正确清理IPcomp隧道状态,可能导致内存泄漏。

AI Predicted 5.5 Difficulty: Hard EPSS 0.20% · P10

Affected Version Matrix 11

VendorProduct Version RangeStatus
Linux Linux 1b28a7fae0128fa140a7dccd995182ff6cd1c67b< 57b72d74d4651dc19d046308a8304eb9abfe66ac affected
4b2c17d0f9be8b58bb30468bc81a4b61c985b04e< 1dad653643f28ccc89be93f9440b8804cded85b2 affected
0da961fa46da1b37ef868d9b603bd202136f8f8e< 64441724387b4ac92f67ef51caaaeffe99c950d1 affected
d0e0d1097118461463b76562c7ebaabaa5b90b13< 763e5c351206c1e4d910db4a1159053f6263689c affected
dc3636912d41770466543623cb76e7b88fdb42c7< f7d879c19d306512c2e260f37e8a3e5c85e37c50 affected
b441cf3f8c4b8576639d20c8eb4aa32917602ecd< d6fe5c740c573af10943b8353992e1325cdb2715 affected
b441cf3f8c4b8576639d20c8eb4aa32917602ecd< 10deb69864840ccf96b00ac2ab3a2055c0c04721 affected
6.16 affected
… +3 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-40256

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
xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added In commit b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x"), I missed the case where state creation fails between full initialization (->init_state has been called) and being inserted on the lists. In this situation, ->init_state has been called, so for IPcomp tunnels, the fallback tunnel has been created and added onto the lists, but the user state never gets added, because we fail before that. The user state doesn't go through __xfrm_state_delete, so we don't call xfrm_state_delete_tunnel for those states, and we end up leaking the FB tunnel. There are several codepaths affected by this: the add/update paths, in both net/key and xfrm, and the migrate code (xfrm_migrate, xfrm_state_migrate). A "proper" rollback of the init_state work would probably be doable in the add/update code, but for migrate it gets more complicated as multiple states may be involved. At some point, the new (not-inserted) state will be destroyed, so call xfrm_state_delete_tunnel during xfrm_state_gc_destroy. Most states will have their fallback tunnel cleaned up during __xfrm_state_delete, which solves the issue that b441cf3f8c4b (and other patches before it) aimed at. All states (including FB tunnels) will be removed from the lists once xfrm_state_fini has called flush_work(&xfrm_state_gc_work).
Source: CVE Program / CVE List V5
CVSS Information
N/A
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存在安全漏洞,该漏洞源于未正确清理IPcomp隧道状态,可能导致内存泄漏。
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 1b28a7fae0128fa140a7dccd995182ff6cd1c67b ~ 57b72d74d4651dc19d046308a8304eb9abfe66ac -
Linux Linux 6.16 -

II. Public POCs for CVE-2025-40256

# 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-40256

登录查看更多情报信息。

Other References for CVE-2025-40256 (1)

Same Patch Batch · Linux · 2025-12-04 · 53 CVEs total

CVE-2025-40261 9.8 CRITICAL nvme: nvme-fc: Ensure ->ioerr_work is cancelled in nvme_fc_delete_ctrl()
CVE-2025-40258 9.8 CRITICAL mptcp: fix race condition in mptcp_schedule_work()
CVE-2025-40257 9.8 CRITICAL mptcp: fix a race in mptcp_pm_del_add_timer()
CVE-2025-40252 9.8 CRITICAL net: qlogic/qede: fix potential out-of-bounds read in qede_tpa_cont() and qede_tpa_end()
CVE-2025-40253 8.8 HIGH s390/ctcm: Fix double-kfree
CVE-2025-40266 8.2 HIGH KVM: arm64: Check the untrusted offset in FF-A memory share
CVE-2025-40244 7.8 HIGH hfsplus: fix KMSAN uninit-value issue in __hfsplus_ext_cache_extent()
CVE-2025-40250 7.8 HIGH net/mlx5: Clean up only new IRQ glue on request_irq() failure
CVE-2025-40262 7.8 HIGH Input: imx_sc_key - fix memory corruption on unload
CVE-2025-40251 7.8 HIGH devlink: rate: Unset parent pointer in devl_rate_nodes_destroy
CVE-2025-40248 7.8 HIGH vsock: Ignore signal/timeout on connect() if already established
CVE-2025-40249 7.8 HIGH gpio: cdev: make sure the cdev fd is still active before emitting events
CVE-2025-40245 7.8 HIGH nios2: ensure that memblock.current_limit is set when setting pfn limits
CVE-2025-40214 7.8 HIGH af_unix: Initialise scc_index in unix_add_edge().
CVE-2025-40243 7.8 HIGH hfs: fix KMSAN uninit-value issue in hfs_find_set_zero_bits()
CVE-2025-40241 7.8 HIGH erofs: fix crafted invalid cases for encoded extents
CVE-2025-40233 7.8 HIGH ocfs2: clear extent cache after moving/defragmenting extents
CVE-2025-40216 7.8 HIGH io_uring/rsrc: don't rely on user vaddr alignment
CVE-2025-40215 7.8 HIGH xfrm: delete x->tunnel as we delete x
CVE-2025-40240 7.5 HIGH sctp: avoid NULL dereference when chunk data buffer is missing

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

IV. Related Vulnerabilities

V. Comments for CVE-2025-40256

No comments yet


Leave a comment