
Cloud Vulnerability DB
A community-led vulnerabilities database
A memory leak vulnerability was discovered in the Linux kernel's BTRFS filesystem component, identified as CVE-2025-40209. The issue was disclosed on November 21, 2025, affecting the btrfsaddqgroup_relation function when handling invalid qgroup levels (NVD).
The vulnerability occurs in the btrfsaddqgrouprelation() function when called with invalid qgroup levels (src >= dst). The function returns -EINVAL directly without freeing the preallocated qgrouplist structure passed by the caller. This happens because the level validation check occurs before the mutex acquisition and before any error handling path that would free the prealloc pointer. The cleanup code at the 'out' label is never reached, resulting in a 64-byte memory leak per failed operation (NVD, Debian Tracker).
The vulnerability can be triggered repeatedly by an unprivileged user with access to a writable btrfs mount, potentially leading to kernel memory exhaustion. Each failed operation results in a 64-byte memory leak (NVD).
The fix involves ensuring prealloc is freed before the early return, guaranteeing that prealloc is always freed on all error paths. This prevents the memory leak condition from occurring (NVD).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."