Potential Use-After-Free Vulnerability in Linux Kernel's ZRAM Package

linux Updated 02 Oct 2025

Summary

31/01/2025
N/A
Yes i
High
7.8

CVE-2025-21671: In the Linux kernel, the following vulnerability has been resolved: zram: fix potential UAF of zram table If zram_meta_alloc failed early, it frees allocated zram->table without setting it NULL. Affects linux versions < 6.1.128-1. Fixed in 6.1.128-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Linux kernel is the core component of many operating systems, including Debian. It manages system resources and hardware interactions, providing essential services for software applications. The ZRAM feature in the Linux kernel allows for the creation of compressed block devices in RAM, enhancing memory efficiency. However, vulnerabilities in the kernel can lead to severe security risks, including unauthorized access and system instability.

Vulnerability Detail

In the Linux kernel, a vulnerability has been identified in the ZRAM implementation. Specifically, if the zram_meta_alloc function fails early, it can lead to a use-after-free (UAF) condition. This occurs because the allocated zram->table is freed without being set to NULL, which can result in zram_meta_free accessing an uninitialized and potentially freed memory area. This flaw can be exploited by an attacker to cause system crashes or execute arbitrary code, posing a significant risk to system integrity and security.

How To Fix

Minimum fixed version

6.1.128-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade linux

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds provided for this vulnerability. The best course of action is to apply the patch as soon as it becomes available.

Conclusion

The identified vulnerability in the Linux kernel's ZRAM implementation poses a significant risk due to the potential for use-after-free conditions. Users are advised to update their systems to the latest patched versions to mitigate this risk. Regular updates and monitoring for vulnerabilities are crucial for maintaining system security.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

A use-after-free vulnerability occurs when a program continues to use a memory reference after it has been freed, potentially allowing an attacker to manipulate the freed memory.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By uploading a manifest file like package-lock.json, you can check if your application is affected by this vulnerability.

Exploitation of this vulnerability can lead to system crashes, unauthorized access, or execution of arbitrary code, compromising system security.

The vulnerability affects the Linux kernel versions in Debian 12 and 13, specifically those that utilize the ZRAM feature.

It is recommended to regularly check for updates and apply them promptly to ensure your system is protected against known vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

Minimum fixed version

6.1.128-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade linux

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback