Kernel NULL Pointer Dereference Vulnerability in Linux Btrfs Package

linux Updated 02 Oct 2025

Summary

21/01/2025
N/A
No i
Medium
5.5

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.1.106-1 – 6.9.9-1. No fix is published. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Linux kernel is the core component of the Linux operating system, managing hardware resources and providing essential services to software applications. 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. This vulnerability affects the Btrfs file system, specifically during the scrub operation, which is designed to check the integrity of data and metadata stored on the file system.

Vulnerability Detail

The vulnerability, identified as CVE-2025-21658, arises from a NULL pointer dereference in the Btrfs scrub functionality. When a corrupted image is mounted with the 'rescue=all,ro' option, the scrub operation attempts to access the extent tree, which may be NULL due to corruption. This leads to a crash in the kernel, as the scrub function does not handle the case where the extent root is NULL, resulting in a potential denial of service. The issue was reported by Syzbot and affects kernel versions prior to 6.6.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using the 'rescue=all,ro' mount option on potentially corrupted Btrfs file systems to prevent triggering the scrub operation that leads to the NULL pointer dereference.

Conclusion

CVE-2025-21658 is a critical vulnerability in the Linux kernel's Btrfs file system that can lead to a kernel crash due to a NULL pointer dereference during scrub operations. Users are advised to update their systems to kernel version 6.6 or later to mitigate this issue. Temporary workarounds are available, but the best course of action is to apply the patch.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2025-21658 is a vulnerability in the Linux kernel's Btrfs file system that can lead to a kernel crash due to a NULL pointer dereference during scrub operations.

If you are using a version of the Linux kernel prior to 6.6 and utilize Btrfs, especially with corrupted file systems, your system may be affected.

Exploiting this vulnerability can lead to a denial of service, causing the kernel to crash and potentially resulting in data loss or system instability.

Yes, a patch is available in kernel versions 6.6 and later. Updating to these versions will resolve the vulnerability.

Yes, Vulert can monitor your software for open-source vulnerabilities in real-time using a manifest file like package-lock.json. You can also check if your application is affected by this vulnerability using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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