Critical NULL Pointer Dereference in Linux Kernel's Btrfs Package
Summary
DEBIAN-CVE-2025-21658: In the Linux kernel, the following vulnerability has been resolved: btrfs: avoid NULL pointer dereference if no valid extent tree [BUG] Syzbot reported a crash with the following call trace: BTRFS info (device loop0): sc... Affects linux versions < 6.12.10-1. Fixed in 6.12.10-1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of the Linux operating system, managing system resources and hardware interactions. Btrfs (B-tree file system) is a modern file system for Linux that offers advanced features such as snapshots, dynamic inode allocation, and integrated volume management. However, it is susceptible to vulnerabilities that can lead to system crashes and data loss, particularly when handling corrupted file system images.
Vulnerability Detail
A critical vulnerability has been identified in the Btrfs component of the Linux kernel, which can lead to a NULL pointer dereference. This issue arises when a scrub operation is performed on a corrupted image where the extent tree root is invalid. The scrub process relies on the extent tree to locate data and metadata extents. If the extent root is NULL, it results in a crash, causing potential system instability and data loss. The vulnerability was reported by Syzbot and affects multiple versions of the Linux kernel.
How To Fix
Minimum fixed version
6.12.10-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 mentioned for this vulnerability. However, avoiding the use of corrupted file system images can help mitigate the risk of triggering this issue.
Conclusion
The identified vulnerability in the Btrfs component of the Linux kernel poses a significant risk of system crashes due to NULL pointer dereference. It is crucial for users to update their Linux packages to the patched versions to ensure system stability and data integrity. Regular monitoring using tools like Vulert can help in identifying such vulnerabilities promptly.
See every vulnerability recorded for linux →
FAQ
The vulnerability is a NULL pointer dereference in the Btrfs component of the Linux kernel, which can lead to system crashes.
The vulnerability affects multiple versions of the Linux kernel prior to the fixed versions 6.12.10-1.
You can use Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.
While there are no specific workarounds, it is advisable to avoid using corrupted file system images to reduce the risk of triggering the vulnerability.
Detailed information can be found in the official Debian CVE database at https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-21658.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for linux.