{"uuid": "6c15e5ed-6be7-4cef-9203-af64d8aae803", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "2a075640-a300-48a4-bb44-bc6130783b9b", "vulnerability": "CVE-2024-56759", "type": "seen", "source": "https://t.me/cvedetector/14387", "content": "{\n  \"Source\": \"CVE FEED\",\n  \"Title\": \"CVE-2024-56759 - Linux Btrfs Use-After-Free Vulnerability\", \n  \"Content\": \"CVE ID : CVE-2024-56759 \nPublished : Jan. 6, 2025, 5:15 p.m. | 43\u00a0minutes ago \nDescription : 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. \nSeverity: 0.0 | NA \nVisit the link for more details, such as CVSS details, affected products, timeline, and more...\",\n  \"Detection Date\": \"06 Jan 2025\",\n  \"Type\": \"Vulnerability\"\n}\n\ud83d\udd39 t.me/cvedetector \ud83d\udd39", "creation_timestamp": "2025-01-06T19:26:46.000000Z"}