{
  "cveId": "CVE-2024-46687",
  "url": "https://patchblox.com/security/cve/CVE-2024-46687",
  "summary": "CVE-2024-46687 is fixed in 26 products on 1 platform, first by DEBIAN-CVE-2024-46687, released September 13, 2024. It is not reported as exploited. Patch Radar priority: High.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  btrfs: fix a use-after-free when hitting errors...",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  btrfs: fix a use-after-free when hitting errors inside btrfs_submit_chunk()  [BUG] There is an internal report that KASAN is reporting use-after-free, with the following backtrace:    BUG: KASAN: slab-use-after-free in btrfs_check_read_bio\u002B0xa68/0xb70 [btrfs]   Read of size 4 at addr ffff8881117cec28 by task kworker/u16:2/45   CPU: 1 UID: 0 PID: 45 Comm: kworker/u16:2 Not tainted 6.11.0-rc2-next-20240805-default\u002B #76   Hardware name: QEMU Standard PC (i440FX \u002B PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014   Workqueue: btrfs-endio btrfs_end_bio_work [btrfs]   Call Trace:    dump_stack_lvl\u002B0x61/0x80    print_address_description.constprop.0\u002B0x5e/0x2f0    print_report\u002B0x118/0x216    kasan_report\u002B0x11d/0x1f0    btrfs_check_read_bio\u002B0xa68/0xb70 [btrfs]    process_one_work\u002B0xce0/0x12a0    worker_thread\u002B0x717/0x1250    kthread\u002B0x2e3/0x3c0    ret_from_fork\u002B0x2d/0x70    ret_from_fork_asm\u002B0x11/0x20    Allocated by task 20917:    kasan_save_stack\u002B0x37/0x60    kasan_save_track\u002B0x10/0x30    __kasan_slab_alloc\u002B0x7d/0x80    kmem_cache_alloc_noprof\u002B0x16e/0x3e0    mempool_alloc_noprof\u002B0x12e/0x310    bio_alloc_bioset\u002B0x3f0/0x7a0    btrfs_bio_alloc\u002B0x2e/0x50 [btrfs]    submit_extent_page\u002B0x4d1/0xdb0 [btrfs]    btrfs_do_readpage\u002B0x8b4/0x12a0 [btrfs]    btrfs_readahead\u002B0x29a/0x430 [btrfs]    read_pages\u002B0x1a7/0xc60    page_cache_ra_unbounded\u002B0x2ad/0x560    filemap_get_pages\u002B0x629/0xa20    filemap_read\u002B0x335/0xbf0    vfs_read\u002B0x790/0xcb0    ksys_read\u002B0xfd/0x1d0    do_syscall_64\u002B0x6d/0x140    entry_SYSCALL_64_after_hwframe\u002B0x4b/0x53    Freed by task 20917:    kasan_save_stack\u002B0x37/0x60    kasan_save_track\u002B0x10/0x30    kasan_save_free_info\u002B0x37/0x50    __kasan_slab_free\u002B0x4b/0x60    kmem_cache_free\u002B0x214/0x5d0    bio_free\u002B0xed/0x180    end_bbio_data_read\u002B0x1cc/0x580 [btrfs]    btrfs_submit_chunk\u002B0x98d/0x1880 [btrfs]    btrfs_submit_bio\u002B0x33/0x70 [btrfs]    submit_one_bio\u002B0xd4/0x130 [btrfs]    submit_extent_page\u002B0x3ea/0xdb0 [btrfs]    btrfs_do_readpage\u002B0x8b4/0x12a0 [btrfs]    btrfs_readahead\u002B0x29a/0x430 [btrfs]    read_pages\u002B0x1a7/0xc60    page_cache_ra_unbounded\u002B0x2ad/0x560    filemap_get_pages\u002B0x629/0xa20    filemap_read\u002B0x335/0xbf0    vfs_read\u002B0x790/0xcb0    ksys_read\u002B0xfd/0x1d0    do_syscall_64\u002B0x6d/0x140    entry_SYSCALL_64_after_hwframe\u002B0x4b/0x53  [CAUSE] Although I cannot reproduce the error, the report itself is good enough to pin down the cause.  The call trace is the regular endio workqueue context, but the free-by-task trace is showing that during btrfs_submit_chunk() we already hit a critical error, and is calling btrfs_bio_end_io() to error out.  And the original endio function called bio_put() to free the whole bio.  This means a double freeing thus causing use-after-free, e.g.:  1. Enter btrfs_submit_bio() with a read bio    The read bio length is 128K, crossing two 64K stripes.  2. The first run of btrfs_submit_chunk()  2.1 Call btrfs_map_block(), which returns 64K 2.2 Call btrfs_split_bio()     Now there are two bios, one referring to the first 64K, the other     referring to the second 64K. 2.3 The first half is submitted.  3. The second run of btrfs_submit_chunk()  3.1 Call btrfs_map_block(), which by somehow failed     Now we call btrfs_bio_end_io() to handle the error  3.2 btrfs_bio_end_io() calls the original endio function     Which is end_bbio_data_read(), and it calls bio_put() for the     original bio.      Now the original bio is freed.  4. The submitted first 64K bio finished    Now we call into btrfs_check_read_bio() and tries to advance the bio    iter.    But since the original bio (thus its iter) is already freed, we    trigger the above use-after free.     And even if the memory is not poisoned/corrupted, we will later call    the original endio function, causing a double freeing.  [FIX] Instead of calling btrfs_bio_end_io(), call btrfs_orig_bbio_end_io(), which has the extra check on split bios and do the pr ---truncated---",
  "published": "2024-09-13T06:15:13Z",
  "severity": "high",
  "cvss": 7.8,
  "cvssVector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "epss": 0.00211,
  "epssPercentile": 0.11374,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "dtb-aarch64",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-64kb",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-64kb",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-azure",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.8.14.1",
      "fix": "SUSE-SU-2024:3551-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3551-1",
      "released": "2024-10-08T15:03:16Z"
    },
    {
      "platform": "linux",
      "product": "kernel-azure",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.8.14.1",
      "fix": "SUSE-SU-2024:3551-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3551-1",
      "released": "2024-10-08T15:03:16Z"
    },
    {
      "platform": "linux",
      "product": "kernel-coco",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-15061.6.coco15sp6.1",
      "fix": "SUSE-SU-2024:3553-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3553-1",
      "released": "2024-10-08T15:10:23Z"
    },
    {
      "platform": "linux",
      "product": "kernel-coco_debug",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-15061.6.coco15sp6.1",
      "fix": "SUSE-SU-2024:3553-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3553-1",
      "released": "2024-10-08T15:10:23Z"
    },
    {
      "platform": "linux",
      "product": "kernel-debug",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-default",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-default",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-default-base",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1.150600.12.10.2",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-default-base",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1.150600.12.10.2",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-docs",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.2",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-docs",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.2",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-kvmsmall",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-livepatch-SLE15-SP6-RT_Update_4",
      "release": "sles 15.6",
      "fixedVersion": "1-150600.1.3.1",
      "fix": "SUSE-SU-2024:3564-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3564-1",
      "released": "2024-10-09T09:09:06Z"
    },
    {
      "platform": "linux",
      "product": "kernel-livepatch-SLE15-SP6_Update_5",
      "release": "sles 15.6",
      "fixedVersion": "1-150600.13.3.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-obs-build",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.2",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-obs-build",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.2",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-obs-qa",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-rt",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.10.14.1",
      "fix": "SUSE-SU-2024:3564-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3564-1",
      "released": "2024-10-09T09:09:06Z"
    },
    {
      "platform": "linux",
      "product": "kernel-rt_debug",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.10.14.1",
      "fix": "SUSE-SU-2024:3564-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3564-1",
      "released": "2024-10-09T09:09:06Z"
    },
    {
      "platform": "linux",
      "product": "kernel-source",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-source",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-source-azure",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.8.14.1",
      "fix": "SUSE-SU-2024:3551-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3551-1",
      "released": "2024-10-08T15:03:16Z"
    },
    {
      "platform": "linux",
      "product": "kernel-source-azure",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.8.14.1",
      "fix": "SUSE-SU-2024:3551-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3551-1",
      "released": "2024-10-08T15:03:16Z"
    },
    {
      "platform": "linux",
      "product": "kernel-source-coco",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-15061.6.coco15sp6.1",
      "fix": "SUSE-SU-2024:3553-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3553-1",
      "released": "2024-10-08T15:10:23Z"
    },
    {
      "platform": "linux",
      "product": "kernel-source-rt",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.10.14.1",
      "fix": "SUSE-SU-2024:3564-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3564-1",
      "released": "2024-10-09T09:09:06Z"
    },
    {
      "platform": "linux",
      "product": "kernel-syms",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-syms",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-syms-azure",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.8.14.1",
      "fix": "SUSE-SU-2024:3551-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3551-1",
      "released": "2024-10-08T15:03:16Z"
    },
    {
      "platform": "linux",
      "product": "kernel-syms-azure",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.8.14.1",
      "fix": "SUSE-SU-2024:3551-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3551-1",
      "released": "2024-10-08T15:03:16Z"
    },
    {
      "platform": "linux",
      "product": "kernel-syms-coco",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-15061.6.coco15sp6.1",
      "fix": "SUSE-SU-2024:3553-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3553-1",
      "released": "2024-10-08T15:10:23Z"
    },
    {
      "platform": "linux",
      "product": "kernel-syms-rt",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.10.14.1",
      "fix": "SUSE-SU-2024:3564-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3564-1",
      "released": "2024-10-09T09:09:06Z"
    },
    {
      "platform": "linux",
      "product": "kernel-zfcpdump",
      "release": "opensuse-leap 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "kernel-zfcpdump",
      "release": "sles 15.6",
      "fixedVersion": "6.4.0-150600.23.25.1",
      "fix": "SUSE-SU-2024:3561-1",
      "url": "https://patchblox.com/security/fix/linux/suse-su-2024-3561-1",
      "released": "2024-10-09T08:45:13Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.10.9-1",
      "fix": "DEBIAN-CVE-2024-46687",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-46687",
      "released": "2024-09-13T06:15:13Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.10.9-1",
      "fix": "DEBIAN-CVE-2024-46687",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-46687",
      "released": "2024-09-13T06:15:13Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T13:06:02Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}