{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-56759", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-12-29T11:26:39.761Z", "datePublished": "2025-01-06T16:20:39.668Z", "dateUpdated": "2026-08-05T11:46:23.511Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:46:23.511Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix use-after-free when COWing tree bock and tracing is enabled\n\nWhen a COWing a tree block, at btrfs_cow_block(), and we have the\ntracepoint trace_btrfs_cow_block() enabled and preemption is also enabled\n(CONFIG_PREEMPT=y), we can trigger a use-after-free in the COWed extent\nbuffer while inside the tracepoint code. This is because in some paths\nthat call btrfs_cow_block(), such as btrfs_search_slot(), we are holding\nthe last reference on the extent buffer @buf so btrfs_force_cow_block()\ndrops the last reference on the @buf extent buffer when it calls\nfree_extent_buffer_stale(buf), which schedules the release of the extent\nbuffer with RCU. This means that if we are on a kernel with preemption,\nthe current task may be preempted before calling trace_btrfs_cow_block()\nand the extent buffer already released by the time trace_btrfs_cow_block()\nis called, resulting in a use-after-free.\n\nFix this by moving the trace_btrfs_cow_block() from btrfs_cow_block() to\nbtrfs_force_cow_block() before the COWed extent buffer is freed.\nThis also has a side effect of invoking the tracepoint in the tree defrag\ncode, at defrag.c:btrfs_realloc_node(), since btrfs_force_cow_block() is\ncalled there, but this is fine and it was actually missing there." } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "AV:L - The vulnerable code is btrfs's core b-tree COW path, reached through ordinary filesystem syscalls (write, create, unlink, rename) on a mounted btrfs volume. This requires local access to the system; there is no network protocol handler involved.\nAC:L - The attacker fully controls the triggering side — every metadata modification calls btrfs_search_slot() → btrfs_cow_block(), so the free-then-trace window can be retried millions of times, and the attacker can raise CPU/scheduling pressure with concurrent threads to make preemption at that point (and elapse of the RCU grace period) occur. A race the attacker can drive at will and retry unboundedly is Low complexity.\nPR:L - Only an unprivileged local account with write access to any btrfs filesystem is needed; no capability, CAP_SYS_ADMIN, or namespace check exists anywhere on the btrfs_search_slot() → btrfs_cow_block() path. Writing into a home directory or container rootfs on btrfs is sufficient.\nUI:N - The attacker triggers the COW path directly with its own filesystem operations; no victim action, mount, or file-open by another user is required.\nS:U - The use-after-free is confined to kernel memory managed by the same kernel security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - The freed extent_buffer is read after release from a mergeable, non-TYPESAFE_BY_RCU slab cache, and btrfs_header_level(buf) loads eb->folios[0] and dereferences it — with heap spray this becomes a controlled-address read whose result is emitted into the trace ring buffer, disclosing kernel memory.\nI:H - The use-after-free on a reclaimable, slab-mergeable object gives the attacker influence over the contents of the reused allocation and the pointer subsequently dereferenced, which is the standard primitive for escalating a UAF into kernel memory corruption and control-flow hijacking.\nA:H - Dereferencing the freed extent_buffer and its stale folios[0] pointer causes a wild-pointer access that oopses or panics the kernel (this is exactly what syzbot's KASAN report captured), and it can be re-triggered repeatedly." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "fs/btrfs/ctree.c" ], "versions": [ { "version": "3083ee2e18b701122a3b841db83448543a87a583", "lessThan": "ba5120a2fb5f23b4d39d302e181aa5d4e28a90d1", "status": "affected", "versionType": "git" }, { "version": "3083ee2e18b701122a3b841db83448543a87a583", "lessThan": "526ff5b27f090fb15040471f892cd2c9899ce314", "status": "affected", "versionType": "git" }, { "version": "3083ee2e18b701122a3b841db83448543a87a583", "lessThan": "66376f1a73cba57fd0af2631d7888605b738e499", "status": "affected", "versionType": "git" }, { "version": "3083ee2e18b701122a3b841db83448543a87a583", "lessThan": "9a466b8693b9add05de99af00c7bdff8259ecf19", "status": "affected", "versionType": "git" }, { "version": "3083ee2e18b701122a3b841db83448543a87a583", "lessThan": "c3a403d8ce36f5a809a492581de5ad17843e4701", "status": "affected", "versionType": "git" }, { "version": "3083ee2e18b701122a3b841db83448543a87a583", "lessThan": "44f52bbe96dfdbe4aca3818a2534520082a07040", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "fs/btrfs/ctree.c" ], "versions": [ { "version": "3.4", "status": "affected" }, { "version": "0", "lessThan": "3.4", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.233", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.176", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.124", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.70", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.8", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4", "versionEndExcluding": "5.10.233" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4", "versionEndExcluding": "5.15.176" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4", "versionEndExcluding": "6.1.124" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4", "versionEndExcluding": "6.6.70" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4", "versionEndExcluding": "6.12.8" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4", "versionEndExcluding": "6.13" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/ba5120a2fb5f23b4d39d302e181aa5d4e28a90d1" }, { "url": "https://git.kernel.org/stable/c/526ff5b27f090fb15040471f892cd2c9899ce314" }, { "url": "https://git.kernel.org/stable/c/66376f1a73cba57fd0af2631d7888605b738e499" }, { "url": "https://git.kernel.org/stable/c/9a466b8693b9add05de99af00c7bdff8259ecf19" }, { "url": "https://git.kernel.org/stable/c/c3a403d8ce36f5a809a492581de5ad17843e4701" }, { "url": "https://git.kernel.org/stable/c/44f52bbe96dfdbe4aca3818a2534520082a07040" } ], "title": "btrfs: fix use-after-free when COWing tree bock and tracing is enabled", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "metrics": [ { "cvssV3_1": { "scope": "UNCHANGED", "version": "3.1", "baseScore": 7.8, "attackVector": "LOCAL", "baseSeverity": "HIGH", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "integrityImpact": "HIGH", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "LOW", "confidentialityImpact": "HIGH" } }, { "other": { "type": "ssvc", "content": { "id": "CVE-2024-56759", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "total" } ], "version": "2.0.3", "timestamp": "2025-02-11T15:41:24.236942Z" } } } ], "problemTypes": [ { "descriptions": [ { "lang": "en", "type": "CWE", "cweId": "CWE-416", "description": "CWE-416 Use After Free" } ] } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2025-02-11T15:45:20.928Z" } }, { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html" }, { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T20:53:52.637Z" } } ] } }