Linux Kernel zram Use-After-Free Fixed in CVE-2025-21671
Patch & Detection Intelligence · 3 sources · Updated 3mo ago · First seen Nov 11, 2025

CVE-2025-21671 is a use-after-free flaw in the Linux kernel's zram compressed-RAM driver. If zram_meta_alloc fails early, it frees zram->table without clearing the pointer; a local privileged user can then reset the failed, uninitialized zram device and cause zram_meta_free to access freed memory, potentially compromising system confidentiality, integrity, or availability. The issue is tracked as CWE-416 and is rated 6.7 (Moderate) by Red Hat, while NVD and CVE.org assign CVSS 7.8.
The flaw affects stable kernel lines beginning at 6.1.122, 6.6.68, and 6.12.7, and is fixed in 6.1.127, 6.6.74, and 6.12.11; administrators should deploy current stable kernel releases rather than cherry-picking the patch. Red Hat remediated supported RHEL 10 and RHEL 9 kernels through RHSA-2025:20095 and RHSA-2025:20518, respectively, while the RHEL 9 kernel-rt package remains affected; older unsupported kernel packages are outside Red Hat support scope.
Why it matters
Impact assessment
CVE-2025-21671 enables a local privileged user to trigger a use-after-free condition in the Linux kernel zram driver, with potential confidentiality, integrity, and availability impact. Exposure is limited to systems using affected kernel builds with zram available and an attacker who already has local access and sufficient privileges; no exploitation in the wild is reported in the supplied references.
- Affected populations: Linux hosts running affected stable kernels, including RHEL 9 and RHEL 10 prior to their respective remediations.
- Potential outcomes: kernel memory disclosure, memory corruption, denial of service, and possible code execution depending on heap reuse conditions.
- Scope: targeted local post-compromise or privileged-user abuse, not a remote initial-access vulnerability.
- RHEL status: RHEL 9 and RHEL 10 standard kernels have fixes; RHEL 9
kernel-rtremains affected. RHEL 7 and RHEL 8 kernel packages are outside support scope and should be treated as potentially affected.
Supporting facts
- CVE-2025-21671 is classified as CWE-416, Use After Free.
- Red Hat rates the issue CVSS 6.7:
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H. - NVD and CVE.org assign CVSS 7.8, reflecting a lower-privilege requirement.
- No public IOCs, malware attribution, or confirmed exploitation evidence is provided.


