{"id":"CVE-2025-40253","state":"PUBLISHED","title":"s390/ctcm: Fix double-kfree","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ns390/ctcm: Fix double-kfree\n\nThe function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally\nfrom function 'ctcmpc_unpack_skb'. It frees passed mpcginfo.\nAfter that a call to function 'kfree' in function 'ctcmpc_unpack_skb'\nfrees it again.\n\nRemove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'.\n\nBug detected by the clang static analyzer.","publishedAt":"2025-12-04T16:08:15.340Z","updatedAt":"2026-10-15T22:02:41.932Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"467ddbbe7e749d558f13e640f50f546149c930b3","status":"affected","lessThan":"06f1dd1de0d33dbfbd2e1fc9fc57d8895f730de2","versionType":"git"},{"version":"4d3c6d741816539b57fa1110c3f765a8c176d7b4","status":"affected","lessThan":"6bf8ccaabce8cebb6cb1f255c93d0acdfe95c17a","versionType":"git"},{"version":"2bd57101c3ecf3f8c0da1d26c2b6ad511adc6d50","status":"affected","lessThan":"7616e2eee679746d526c7f5befd4eedb995935b5","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"43096dab8cc60fc39133205fd149a54d3acebea8","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"3b177b2ded563df16f6d5920671ffcfe5915d472","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"b9dbfb1b5699f9f1e4991f96741bdf9047147589","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"7ff76f8dc6b550f8d16487bf3cebc278be720b5c","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"da02a1824884d6c84c5e5b5ac373b0c9e3288ec2","versionType":"git"},{"version":"36933de59f67029e5739a98393891f9b94f27e0f","status":"affected","versionType":"git"},{"version":"d886b4292a1c5b4facdb2dfdc31f0fecc71df898","status":"affected","versionType":"git"},{"version":"4c9ba0fed125deba8416b995b0c274b0804c0c24","status":"affected","versionType":"git"},{"version":"ea0053af5dab4d63a9c44563973fb2f3bfd9eb2b","status":"affected","versionType":"git"},{"version":"5.4.195","status":"affected","lessThan":"5.4.302","versionType":"semver"},{"version":"5.10.117","status":"affected","lessThan":"5.10.247","versionType":"semver"},{"version":"5.15.41","status":"affected","lessThan":"5.15.197","versionType":"semver"},{"version":"4.9.315","status":"affected","lessThan":"4.10","versionType":"semver"},{"version":"4.14.280","status":"affected","lessThan":"4.15","versionType":"semver"},{"version":"4.19.244","status":"affected","lessThan":"4.20","versionType":"semver"},{"version":"5.17.9","status":"affected","lessThan":"5.18","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/s390/net/ctcm_mpc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"5.4.302","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.247","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.197","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.159","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.118","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.60","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.10","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/s390/net/ctcm_mpc.c"]}],"references":["https://git.kernel.org/stable/c/06f1dd1de0d33dbfbd2e1fc9fc57d8895f730de2","https://git.kernel.org/stable/c/6bf8ccaabce8cebb6cb1f255c93d0acdfe95c17a","https://git.kernel.org/stable/c/7616e2eee679746d526c7f5befd4eedb995935b5","https://git.kernel.org/stable/c/43096dab8cc60fc39133205fd149a54d3acebea8","https://git.kernel.org/stable/c/3b177b2ded563df16f6d5920671ffcfe5915d472","https://git.kernel.org/stable/c/b9dbfb1b5699f9f1e4991f96741bdf9047147589","https://git.kernel.org/stable/c/7ff76f8dc6b550f8d16487bf3cebc278be720b5c","https://git.kernel.org/stable/c/da02a1824884d6c84c5e5b5ac373b0c9e3288ec2"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40253.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40253","state":"PUBLISHED","datePublished":"2025-12-04T16:08:15.340Z","dateUpdated":"2026-10-15T22:02:41.932Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.181Z"},"containers":{"cna":{"title":"s390/ctcm: Fix double-kfree","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ns390/ctcm: Fix double-kfree\n\nThe function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally\nfrom function 'ctcmpc_unpack_skb'. It frees passed mpcginfo.\nAfter that a call to function 'kfree' in function 'ctcmpc_unpack_skb'\nfrees it again.\n\nRemove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'.\n\nBug detected by the clang static analyzer."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"467ddbbe7e749d558f13e640f50f546149c930b3","status":"affected","lessThan":"06f1dd1de0d33dbfbd2e1fc9fc57d8895f730de2","versionType":"git"},{"version":"4d3c6d741816539b57fa1110c3f765a8c176d7b4","status":"affected","lessThan":"6bf8ccaabce8cebb6cb1f255c93d0acdfe95c17a","versionType":"git"},{"version":"2bd57101c3ecf3f8c0da1d26c2b6ad511adc6d50","status":"affected","lessThan":"7616e2eee679746d526c7f5befd4eedb995935b5","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"43096dab8cc60fc39133205fd149a54d3acebea8","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"3b177b2ded563df16f6d5920671ffcfe5915d472","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"b9dbfb1b5699f9f1e4991f96741bdf9047147589","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"7ff76f8dc6b550f8d16487bf3cebc278be720b5c","versionType":"git"},{"version":"0c0b20587b9f25a2ad14db7f80ebe49bdf29920a","status":"affected","lessThan":"da02a1824884d6c84c5e5b5ac373b0c9e3288ec2","versionType":"git"},{"version":"36933de59f67029e5739a98393891f9b94f27e0f","status":"affected","versionType":"git"},{"version":"d886b4292a1c5b4facdb2dfdc31f0fecc71df898","status":"affected","versionType":"git"},{"version":"4c9ba0fed125deba8416b995b0c274b0804c0c24","status":"affected","versionType":"git"},{"version":"ea0053af5dab4d63a9c44563973fb2f3bfd9eb2b","status":"affected","versionType":"git"},{"version":"5.4.195","status":"affected","lessThan":"5.4.302","versionType":"semver"},{"version":"5.10.117","status":"affected","lessThan":"5.10.247","versionType":"semver"},{"version":"5.15.41","status":"affected","lessThan":"5.15.197","versionType":"semver"},{"version":"4.9.315","status":"affected","lessThan":"4.10","versionType":"semver"},{"version":"4.14.280","status":"affected","lessThan":"4.15","versionType":"semver"},{"version":"4.19.244","status":"affected","lessThan":"4.20","versionType":"semver"},{"version":"5.17.9","status":"affected","lessThan":"5.18","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/s390/net/ctcm_mpc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"5.4.302","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.247","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.197","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.159","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.118","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.60","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.10","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/s390/net/ctcm_mpc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/06f1dd1de0d33dbfbd2e1fc9fc57d8895f730de2"},{"url":"https://git.kernel.org/stable/c/6bf8ccaabce8cebb6cb1f255c93d0acdfe95c17a"},{"url":"https://git.kernel.org/stable/c/7616e2eee679746d526c7f5befd4eedb995935b5"},{"url":"https://git.kernel.org/stable/c/43096dab8cc60fc39133205fd149a54d3acebea8"},{"url":"https://git.kernel.org/stable/c/3b177b2ded563df16f6d5920671ffcfe5915d472"},{"url":"https://git.kernel.org/stable/c/b9dbfb1b5699f9f1e4991f96741bdf9047147589"},{"url":"https://git.kernel.org/stable/c/7ff76f8dc6b550f8d16487bf3cebc278be720b5c"},{"url":"https://git.kernel.org/stable/c/da02a1824884d6c84c5e5b5ac373b0c9e3288ec2"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The malicious `TH_SWEEP_REQ` transmission header is delivered as a link-level MPC frame by the directly-attached CTC peer (a partner LPAR or a z/VM guest coupled via virtual CTCA), reaching `ctcmpc_unpack_skb()` straight from the channel read interrupt. MPC TH headers are regenerated per link and not routable, so the attacker must sit on the adjacent channel connection rather than across a routed network.\nAC:L - A single frame with `th_ch_flag = 0xfe` deterministically drives `ctcmpc_unpack_skb()` into `mpc_rcvd_sweep_req()` and the two consecutive `kfree()` calls every time — no race, no timing window, and no memory-layout precondition outside the attacker's control.\nPR:N - The attacker needs no account, credential, or capability on the target Linux image; it only has to be the CTC peer, and the path is reachable both in `MPCG_STATE_READY` and during the pre-establishment XID-negotiation states, where no authentication of any kind has occurred.\nUI:N - The remote peer triggers the double free entirely on its own by transmitting one frame on an already-active CTC link; no administrator or user action on the victim system is needed at attack time.\nS:U - The slab corruption occurs in the receiving kernel's own softirq/tasklet context and its consequences stay within that kernel's security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - On kernels without freelist hardening the double free leaves the kmalloc-64 percpu freelist self-referential, so repeated allocations hand the same 40-byte object to unrelated kernel structures, yielding an aliasing/use-after-free primitive that exposes arbitrary kernel memory contents to the attacker-controlled objects.\nI:H - The same freelist corruption lets attacker-influenced allocations overlap live kernel objects (type confusion), giving a write primitive over adjacent/aliased kernel data and a realistic path to control-flow hijack — classic exploitable heap corruption, not a mere accounting error.\nA:H - With `CONFIG_SLAB_FREELIST_HARDENED` the immediate double free hits `BUG_ON(object == fp)` in `set_freepointer()` inside a tasklet, which is fatal in interrupt context; without it the corrupted freelist causes near-certain crashes, and either outcome is re-triggerable at will by the peer."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:08:55.944Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4.195","versionEndExcluding":"5.4.302"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.117","versionEndExcluding":"5.10.247"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.41","versionEndExcluding":"5.15.197"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.1.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.6.118"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.12.60"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.17.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.9.315"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14.280"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19.244"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-40253","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:58:29.186367Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:41.932Z"}}]}}}