Critical Vulnerability in Linux Kernel: btrfs Zoned Mode Calculation Flaw

linux Updated 02 Oct 2025

Summary

30/07/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-42231: In the Linux kernel, the following vulnerability has been resolved: btrfs: zoned: fix calc_available_free_space() for zoned mode calc_available_free_space() returns the total size of metadata (or system) block groups, wh... Affects linux versions < 6.9.9-1. Fixed in 6.9.9-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 provides essential services for software applications. The btrfs file system, known for its advanced features like snapshots and dynamic volume management, is particularly affected by this vulnerability, which compromises its ability to manage disk space effectively in zoned mode.

Vulnerability Detail

In the Linux kernel, a vulnerability has been identified in the btrfs file system related to the calculation of available free space in zoned mode. The function calc_available_free_space() incorrectly computes the total size of metadata block groups that can be allocated from unallocated disk space. This miscalculation can lead to inefficient space allocation, particularly in devices with large zone sizes, potentially resulting in out-of-space errors (ENOSPC) during critical operations. The issue arises from two main flaws: the incorrect calculation of data_chunk_size and the misalignment of the available space with zone sizes, which can severely impact performance and reliability.

How To Fix

Minimum fixed version

6.9.9-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, no specific workarounds have been provided for this vulnerability. Users are advised to apply the patch as soon as it is available to mitigate risks.

Conclusion

The identified vulnerability in the Linux kernel's btrfs file system poses significant risks related to space allocation in zoned mode. Users are strongly encouraged to update their systems to the patched version to ensure continued performance and reliability.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

The vulnerability involves incorrect calculations in the btrfs file system that can lead to inefficient space allocation and potential out-of-space errors.

It can lead to less efficient metadata reclaim processes, especially in devices with large zone sizes, resulting in performance degradation and possible system failures.

If you are using Debian 13 or 14 with the Linux kernel version prior to 6.9.9-1, your system may be affected. You can check for vulnerabilities using Vulert.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json.

While no specific workarounds are available, it is crucial to plan for an update as soon as possible to mitigate the risks associated with this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

Minimum fixed version

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