Critical Vulnerability in Linux Kernel: mmap() Crash in Persistent Ring Buffer

linux Updated 02 Oct 2025

Summary

27/02/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2025-21778: In the Linux kernel, the following vulnerability has been resolved: tracing: Do not allow mmap() of persistent ring buffer When trying to mmap a trace instance buffer that is attached to reserve_mem, it would crash: BUG:... Affects linux versions < 6.12.16-1. Fixed in 6.12.16-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 the Linux operating system, responsible for managing hardware resources and providing essential services to applications. It supports a wide range of functionalities, including process management, memory management, and device control. This vulnerability specifically affects the mmap() functionality of the persistent ring buffer, which is used for tracing and logging events in the kernel. The issue arises when attempting to map a trace instance buffer that is attached to reserved memory, leading to a crash.

Vulnerability Detail

In the Linux kernel, a vulnerability has been identified where the mmap() function can cause a crash when used with a persistent ring buffer attached to reserved memory. This occurs due to improper handling of memory mapping, which results in a page fault when the kernel attempts to access a non-present page. The crash manifests as a bug report indicating an inability to handle a page fault, which can lead to system instability and potential data loss. The root cause is linked to the use of virt_to_page() on vmap()'d memory, which is not compatible with the persistent ring buffer's memory management.

How To Fix

Minimum fixed version

6.12.16-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

As a temporary workaround, users should avoid using mmap() on instances that have their ring buffer from the reserve_mem option. If mmap() is attempted on a persistent buffer, it will return -ENODEV, indicating that the operation is not permitted.

Conclusion

The identified vulnerability in the Linux kernel poses a significant risk when using mmap() with persistent ring buffers. Users are advised to update to the patched version to ensure system stability and security. Temporary workarounds are available, but updating is the best long-term solution.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

The vulnerability can lead to system crashes and instability when using mmap() on certain trace buffers, potentially resulting in data loss.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If an immediate update is not possible, avoid using mmap() on persistent ring buffers as a temporary workaround.

This vulnerability affects the Linux kernel across various distributions, particularly those using the affected versions of the kernel.

You can refer to the official Linux kernel mailing lists, security advisories, and vulnerability databases for detailed information.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

Minimum fixed version

6.12.16-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