Linux Kernel up to 6.12.7 defrag.c btrfs_cow_block use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.3 | $0-$5k | 0.00 |
Summary
A vulnerability identified as critical has been detected in Linux Kernel up to 6.12.7. The affected element is the function btrfs_cow_block of the file defrag.c. The manipulation leads to use after free.
This vulnerability is referenced as CVE-2024-56759. No exploit is available.
You should upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 6.12.7. It has been rated as critical. This issue affects the function btrfs_cow_block of the file defrag.c. The manipulation with an unknown input leads to a use after free vulnerability. Using CWE to declare the problem leads to CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. Impacted is confidentiality, integrity, and availability. The summary by CVE is:
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free when COWing tree bock and tracing is enabled When a COWing a tree block, at btrfs_cow_block(), and we have the tracepoint trace_btrfs_cow_block() enabled and preemption is also enabled (CONFIG_PREEMPT=y), we can trigger a use-after-free in the COWed extent buffer while inside the tracepoint code. This is because in some paths that call btrfs_cow_block(), such as btrfs_search_slot(), we are holding the last reference on the extent buffer @buf so btrfs_force_cow_block() drops the last reference on the @buf extent buffer when it calls free_extent_buffer_stale(buf), which schedules the release of the extent buffer with RCU. This means that if we are on a kernel with preemption, the current task may be preempted before calling trace_btrfs_cow_block() and the extent buffer already released by the time trace_btrfs_cow_block() is called, resulting in a use-after-free. Fix this by moving the trace_btrfs_cow_block() from btrfs_cow_block() to btrfs_force_cow_block() before the COWed extent buffer is freed. This also has a side effect of invoking the tracepoint in the tree defrag code, at defrag.c:btrfs_realloc_node(), since btrfs_force_cow_block() is called there, but this is fine and it was actually missing there.
The advisory is shared at git.kernel.org. The identification of this vulnerability is CVE-2024-56759 since 12/29/2024. The exploitation is known to be difficult. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 10/13/2025).
The vulnerability scanner Nessus provides a plugin with the ID 214901 (SUSE SLES15 Security Update : kernel (SUSE-SU-2025:0289-1)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 6.12.8 eliminates this vulnerability. Applying the patch c3a403d8ce36f5a809a492581de5ad17843e4701/44f52bbe96dfdbe4aca3818a2534520082a07040 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (214901) and CERT Bund (WID-SEC-2025-0016). If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Affected
- Debian Linux
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- Dell NetWorker
- Dell Avamar
- Dell PowerProtect Data Domain
- Open Source Linux Kernel
Product
Type
Vendor
Name
Version
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.4VulDB Meta Temp Score: 7.3
VulDB Base Score: 7.1
VulDB Temp Score: 6.8
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 7.8
NVD Vector: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: CWE-416 / CWE-119
CAPEC: 🔍
ATT&CK: 🔍
Physical: Partially
Local: Yes
Remote: Partially
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 214901
Nessus Name: SUSE SLES15 Security Update : kernel (SUSE-SU-2025:0289-1)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Kernel 6.12.8
Patch: c3a403d8ce36f5a809a492581de5ad17843e4701/44f52bbe96dfdbe4aca3818a2534520082a07040
Timeline
12/29/2024 🔍01/06/2025 🔍
01/06/2025 🔍
10/13/2025 🔍
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2024-56759 (🔍)
GCVE (CVE): GCVE-0-2024-56759
GCVE (VulDB): GCVE-100-290285
CERT Bund: WID-SEC-2025-0016 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service
Entry
Created: 01/06/2025 18:07Updated: 10/13/2025 21:20
Changes: 01/06/2025 18:07 (58), 01/08/2025 09:13 (12), 02/04/2025 16:22 (2), 10/13/2025 21:20 (7)
Complete: 🔍
Cache ID: 216::103
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
No comments yet. Languages: en.
Please log in to comment.