LiveActive security incident?Get immediate response
CVE Record

CVE-2024-56759: btrfs: fix use-after-free when COWing tree bock and tracing is enabled

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.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Linux Btrfs flaw can access freed kernel memory while copying filesystem metadata under specific tracing and preemption conditions. Successful triggering could seriously affect system confidentiality, integrity, or availability. Exposure requires Btrfs, kernel preemption, and the relevant tracepoint, so risk is concentrated rather than universal.

Executive priority

Treat as a high-priority kernel maintenance issue for Btrfs hosts permitting untrusted local access. Patch those systems promptly after vendor validation. Systems without Btrfs, preemption, or the tracepoint conditions have materially lower immediate exposure, but version and configuration checks are still required.

Technical view

CVE-2024-56759 is a CWE-416 use-after-free in Btrfs tree-block copy-on-write handling. With CONFIG_PREEMPT=y and trace_btrfs_cow_block enabled, preemption can allow RCU to release the old extent buffer before tracing accesses it. The fix moves tracing into btrfs_force_cow_block before the buffer is freed.

Likely exposure

Potentially exposed systems run an affected Linux kernel, use Btrfs, enable CONFIG_PREEMPT, and activate the affected tracepoint. The supplied CVSS vector requires local access with low privileges and no user interaction. The bundle's version data is ambiguous, so confirm status against distribution or kernel-vendor advisories.

Exploitation context

The supplied CVSS score is 7.8 and describes local, low-complexity exploitation with low privileges. The source bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public exploit. Practical triggerability depends on tracing, preemption, and Btrfs activity.

Researcher notes

The vulnerable ordering occurs when btrfs_force_cow_block drops the final extent-buffer reference and schedules RCU release before trace_btrfs_cow_block reads it. Preemption creates the race window. The upstream correction invokes tracing before freeing the COWed buffer. The supplied sources do not establish exploit reliability or observed attacks.

Mitigation direction

  • Upgrade to a vendor-supported kernel containing the applicable upstream stable fix.
  • Consult the Linux distribution or appliance vendor for precise fixed package versions.
  • Until patched, avoid enabling the affected Btrfs tracepoint where operationally feasible.
  • Prioritize multi-user systems where untrusted local users can access affected hosts.

Validation and detection

  • Inventory systems using Btrfs and record their running kernel versions.
  • Confirm whether each kernel was built with CONFIG_PREEMPT enabled.
  • Determine whether trace_btrfs_cow_block can be or is currently enabled.
  • Map installed kernel packages to vendor advisories and applicable stable fixes.
  • After updating, reboot and verify the running kernel matches the fixed package.
Prepared
Confidence
high
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2024-56759 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
3Timeline events
2ADP providers
9Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Linux
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2024-56759Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux3083ee2e18b701122a3b841db83448543a87a583, 3083ee2e18b701122a3b841db83448543a87a583, 3083ee2e18b701122a3b841db83448543a87a583, 3083ee2e18b701122a3b841db83448543a87a583, 3083ee2e18b701122a3b841db83448543a87a583, 3083ee2e18b701122a3b841db83448543a87a583unaffected
LinuxLinux3.4, 0, 5.10.233, 5.15.176, 6.1.124, 6.6.70, 6.12.8, 6.13affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.