Memory Leak in btrfs: __add_inode_ref()

Kernel Updated 02 Oct 2025

Summary

27/12/2021
N/A
No i
Unrated
Not published

GSD-2021-1002757: btrfs: fix memory leak in __add_inode_ref(). Affects Kernel versions >= d3316c8233bb05e0dd855d30aac347bb8ad76ee4, < 493ff661d434d6bdf02e3a21adae04d7a0b4265d. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The btrfs package is a file system for Linux that provides advanced features such as snapshots, pooling, and checksums. It is widely used in various Linux distributions. The __add_inode_ref() function in btrfs is responsible for adding a reference to an inode, which is a data structure that represents a file or directory. This vulnerability in __add_inode_ref() leads to a memory leak, where allocated memory is not properly freed, resulting in a gradual depletion of system resources.

Vulnerability Detail

The vulnerability in __add_inode_ref() allows an attacker to trigger a memory leak by repeatedly adding references to inodes without releasing the allocated memory. This can be exploited to exhaust system resources, leading to a denial-of-service condition. The impact of this vulnerability depends on the attacker's ability to repeatedly trigger the vulnerable code path. If successfully exploited, it can cause system instability and potential crashes. The vulnerability was introduced in version v5.5 of the Linux Kernel and is fixed in version v5.15.11.

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 →

Conclusion

The memory leak vulnerability in __add_inode_ref() in the btrfs package can be mitigated by updating the Linux Kernel to version v5.15.11 or later. This update includes the necessary fix to prevent the memory leak and ensure system stability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

btrfs is a file system for Linux that provides advanced features such as snapshots, pooling, and checksums. It is widely used in various Linux distributions.

__add_inode_ref() is a function in the btrfs package that is responsible for adding a reference to an inode, which represents a file or directory.

A memory leak occurs when allocated memory is not properly freed, leading to a gradual depletion of system resources.

The vulnerability can be exploited to exhaust system resources, leading to a denial-of-service condition. It can cause system instability and potential crashes.

To fix this vulnerability, update the Linux Kernel to version v5.15.11 or later, which includes the necessary fix for the memory leak in __add_inode_ref().

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

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