CVE-2025-68359
Double Free Vulnerability in Linux btrfs Qgroup Record Handling
Publication date: 2025-12-24
Last updated on: 2025-12-24
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a double free bug in the Linux kernel's btrfs filesystem code. Specifically, when adding a delayed reference head with the function add_delayed_ref_head(), if an error occurs after detecting that a record already exists, both the function and its caller attempt to free the same memory object (qgroup record). This leads to a double free scenario because the function does not set the pointer to NULL after freeing it, causing the caller to free it again. The fix involves changing ownership rules so that only the caller is responsible for freeing the qgroup record unless it was successfully inserted into the tracing logic, preventing the double free.
How can this vulnerability impact me? :
This vulnerability can lead to memory corruption due to a double free of a qgroup record in the btrfs filesystem code. Memory corruption can cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges if exploited. Therefore, it poses a risk to system reliability and security.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, update the Linux kernel to a version where the fix for the double free of qgroup record in btrfs has been applied. This fix ensures proper ownership and freeing of the qrecord object in add_delayed_ref_head(), preventing the double free scenario.