Memory Leak in btrfs: __add_inode_ref()
Summary
GSD-2021-1002757: btrfs: fix memory leak in __add_inode_ref(). Affects Kernel versions >= d3316c8233bb05e0dd855d30aac347bb8ad76ee4, < 493ff661d434d6bdf02e3a21adae04d7a0b4265d. No fix is published. 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 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 →
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.