CVE-2025-21693: Linux kernel · mm: zswap: properly synchronize freeing resources during CPU hotunplug
Affects Linux kernelSource GCVE Database
Not known to be exploited · CVSS 7.8 High · fixed in 6.11.0-1013.13~24.04.1 : patch Linux kernel soon.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 10% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 6.11.0-1013.13~24.04.1, 6.11.0-24.24~24.04.1, 6.11.0-1012.13~24.04.1 +2
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 10 Feb 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSlinuxpkg:deb/ubuntu/linux@6.8.0-136.136?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-awspkg:deb/ubuntu/linux-aws@6.8.0-1060.63?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azurepkg:deb/ubuntu/linux-azure@6.8.0-1062.69?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azure-6.11pkg:deb/ubuntu/linux-azure-6.11@6.11.0-1013.13~24.04.1?arch=source&distro=nobleOther threats | Affected
| Fixed in
|
Ubuntu 24.04 LTSlinux-azure-fdepkg:deb/ubuntu/linux-azure-fde@6.8.0-1061.68?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azure-nvidiapkg:deb/ubuntu/linux-azure-nvidia@6.8.0-1039.42?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
In the Linux kernel, the following vulnerability has been resolved: mm: zswap: properly synchronize freeing resources during CPU hotunplug In zswap_compress() and zswap_decompress(), the per-CPU acomp_ctx of the current CPU at the beginning of the operation is retrieved and used throughout. However, since neither preemption nor migration are disabled, it is possible that the operation continues on a different CPU. If the original CPU is hotunplugged while the acomp_ctx is still in use, we run into a UAF bug as some of the resources attached to the acomp_ctx are freed during hotunplug in zswap_cpu_comp_dead() (i.e. acomp_ctx.buffer, acomp_ctx.req, or acomp_ctx.acomp). The problem was introduced in commit 1ec3b5fe6eec ("mm/zswap: move to use crypto_acomp API for hardware acceleration") when the switch to the crypto_acomp API was made. Prior to that, the per-CPU crypto_comp was retrieved using get_cpu_ptr() which disables preemption and makes sure the CPU cannot go away from under us. Preemption cannot be disabled with the crypto_acomp API as a sleepable context is needed. Use the acomp_ctx.mutex to synchronize CPU hotplug callbacks allocating and freeing resources with compression/decompression paths. Make sure that acomp_ctx.req is NULL when the resources are freed. In the compression/decompression paths, check if acomp_ctx.req is NULL after acquiring the mutex (meaning the CPU was offlined) and retry on the new CPU. The initialization of acomp_ctx.mutex is moved from the CPU hotplug callback to the pool initialization where it belongs (where the mutex is allocated). In addition to adding clarity, this makes sure that CPU hotplug cannot reinitialize a mutex that is already locked by compression/decompression. Previously a fix was attempted by holding cpus_read_lock() [1]. This would have caused a potential deadlock as it is possible for code already holding the lock to fall into reclaim and enter zswap (causing a deadlock). A fix was also attempted using SRCU for synchronization, but Johannes pointed out that synchronize_srcu() cannot be used in CPU hotplug notifiers [2]. Alternative fixes that were considered/attempted and could have worked: - Refcounting the per-CPU acomp_ctx. This involves complexity in handling the race between the refcount dropping to zero in zswap_[de]compress() and the refcount being re-initialized when the CPU is onlined. - Disabling migration before getting the per-CPU acomp_ctx [3], but that's discouraged and is a much bigger hammer than needed, and could result in subtle performance issues. [1]https://lkml.kernel.org/20241219212437.2714151-1-yosryahmed@google.com/ [2]https://lkml.kernel.org/20250107074724.1756696-2-yosryahmed@google.com/ [3]https://lkml.kernel.org/20250107222236.2715883-2-yosryahmed@google.com/ [yosryahmed@google.com: remove comment]
References
- ubuntu.com/security/CVE-2025-21693 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-21693 (opens in a new tab)
- git.kernel.org/linus/12dcb0ef540629a281533f9dedc1b6b8e14cfb65 (opens in a new tab)
- git.kernel.org/stable/c/12dcb0ef540629a281533f9dedc1b6b8e14cfb65 (opens in a new tab)
- git.kernel.org/stable/c/8d29ff5d50304daa41dc3cfdda4a9d1e46cf5be1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7445-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7448-1 (opens in a new tab)