Vulnerability in ceph: Fix Inode Reference Leakage in ceph_get_snapdir()
Summary
GSD-2022-1001383: ceph: fix inode reference leakage in ceph_get_snapdir(). Affects Kernel versions < 9cd21981dedfb4fe9f344529e4be35727cb10940. 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
Ceph is a distributed storage system that provides scalable and reliable storage for large-scale applications. It is commonly used in cloud computing environments to store and manage data. The ceph_get_snapdir() function is a part of the Ceph kernel module and is responsible for retrieving the snapshot directory inode. Inode reference leakage occurs when the function fails to properly release the inode reference, leading to a potential resource leak and subsequent memory exhaustion.
Vulnerability Detail
The vulnerability in ceph_get_snapdir() allows an attacker to exploit the resource leak and exhaust system memory, potentially leading to a denial of service (DoS) condition. By repeatedly triggering this vulnerability, an attacker could cause the system to become unresponsive or crash. This vulnerability has been assigned the ID GSD-2022-1001383 and has been fixed in Linux Kernel version v5.16.20 by commit 9cd21981dedfb4fe9f344529e4be35727cb10940.
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
If updating the kernel is not immediately feasible, a temporary workaround can be implemented by modifying the ceph_get_snapdir() function to release the inode reference properly. Here is an example code snippet that demonstrates the workaround:
void ceph_get_snapdir(struct inode *parent)
{
struct inode *inode;
// Existing code
...
// Workaround: Release inode reference
iput(inode);
}
Conclusion
The vulnerability in ceph_get_snapdir() can be mitigated by updating the Linux Kernel to version v5.16.20 or later. Additionally, a temporary workaround is available for immediate implementation. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
Ceph is a distributed storage system that provides scalable and reliable storage for large-scale applications. It is commonly used in cloud computing environments.
ceph_get_snapdir() is a function in the Ceph kernel module that retrieves the snapshot directory inode.
Inode reference leakage occurs when a function fails to properly release an inode reference, leading to a potential resource leak and subsequent memory exhaustion.
The vulnerability in ceph_get_snapdir() can be exploited to exhaust system memory, potentially leading to a denial of service (DoS) condition.
To fix this vulnerability, update the Linux Kernel to version v5.16.20 or later and recompile/reinstall the Ceph module. Alternatively, apply the provided workaround until the kernel update is feasible.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.