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

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.3$0-$5k0.00

Summaryinfo

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.

Detailsinfo

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

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.4
VulDB 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: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Use after free
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 214901
Nessus Name: SUSE SLES15 Security Update : kernel (SUSE-SU-2025:0289-1)

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 6.12.8
Patch: c3a403d8ce36f5a809a492581de5ad17843e4701/44f52bbe96dfdbe4aca3818a2534520082a07040

Timelineinfo

12/29/2024 🔍
01/06/2025 +8 days 🔍
01/06/2025 +0 days 🔍
10/13/2025 +280 days 🔍

Sourcesinfo

Vendor: kernel.org

Advisory: 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

Entryinfo

Created: 01/06/2025 18:07
Updated: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!