CVE-2025-40253
Description
In the Linux kernel, the following vulnerability has been resolved:
s390/ctcm: Fix double-kfree
The function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally from function 'ctcmpc_unpack_skb'. It frees passed mpcginfo. After that a call to function 'kfree' in function 'ctcmpc_unpack_skb' frees it again.
Remove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'.
Bug detected by the clang static analyzer.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A double-free vulnerability in the Linux kernel's s390/ctcm driver occurs when mpc_rcvd_sweep_req frees mpcginfo and a subsequent kfree frees it again.
Vulnerability
Overview
CVE-2025-40253 is a double-free vulnerability in the Linux kernel's s390/ctcm (Channel-to-Channel Media Access Control) driver. The bug resides in the ctcmpc_unpack_skb function, which conditionally calls mpc_rcvd_sweep_req(mpcginfo). The latter function frees the mpcginfo structure. However, after that call returns, ctcmpc_unpack_skb also performs a kfree on the same pointer, leading to a second free.
Root
Cause
The root cause is a logic error in the control flow. The developer intended that mpc_rcvd_sweep_req would take ownership of the memory, so the subsequent kfree in the caller is redundant and dangerous. The issue was flagged by the Clang static analyzer [1][2].
Impact
A double-free can cause memory corruption, potentially leading to a system crash or denial of service. Under certain conditions, an attacker might exploit this to achieve arbitrary code execution, but the CVE description does not provide evidence of such exploitability; the primary risk is kernel instability.
Mitigation
The fix removes the redundant kfree call from mpc_rcvd_sweep_req, ensuring each allocation is freed exactly once. Patch commits are available in the stable kernel tree [1][2][3]. Users should update to the latest patched kernel versions.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
806f1dd1de0d36bf8ccaabce87616e2eee67943096dab8cc63b177b2ded56b9dbfb1b56997ff76f8dc6b5da02a1824884Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/06f1dd1de0d33dbfbd2e1fc9fc57d8895f730de2nvd
- git.kernel.org/stable/c/3b177b2ded563df16f6d5920671ffcfe5915d472nvd
- git.kernel.org/stable/c/43096dab8cc60fc39133205fd149a54d3acebea8nvd
- git.kernel.org/stable/c/6bf8ccaabce8cebb6cb1f255c93d0acdfe95c17anvd
- git.kernel.org/stable/c/7616e2eee679746d526c7f5befd4eedb995935b5nvd
- git.kernel.org/stable/c/7ff76f8dc6b550f8d16487bf3cebc278be720b5cnvd
- git.kernel.org/stable/c/b9dbfb1b5699f9f1e4991f96741bdf9047147589nvd
- git.kernel.org/stable/c/da02a1824884d6c84c5e5b5ac373b0c9e3288ec2nvd
News mentions
0No linked articles in our index yet.