{
  "cveId": "CVE-2024-49869",
  "url": "https://patchblox.com/security/cve/CVE-2024-49869",
  "summary": "CVE-2024-49869 is fixed in linux on 1 platform, first by DEBIAN-CVE-2024-49869, released October 21, 2024. It is not reported as exploited. Patch Radar priority: High.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  btrfs: send: fix buffer overflow detection when...",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  btrfs: send: fix buffer overflow detection when copying path to cache entry  Starting with commit c0247d289e73 (\u0022btrfs: send: annotate struct name_cache_entry with __counted_by()\u0022) we annotated the variable length array \u0022name\u0022 from the name_cache_entry structure with __counted_by() to improve overflow detection. However that alone was not correct, because the length of that array does not match the \u0022name_len\u0022 field - it matches that plus 1 to include the NUL string terminator, so that makes a fortified kernel think there\u0027s an overflow and report a splat like this:    strcpy: detected buffer overflow: 20 byte write of buffer size 19   WARNING: CPU: 3 PID: 3310 at __fortify_report\u002B0x45/0x50   CPU: 3 UID: 0 PID: 3310 Comm: btrfs Not tainted 6.11.0-prnet #1   Hardware name: CompuLab Ltd.  sbc-ihsw/Intense-PC2 (IPC2), BIOS IPC2_3.330.7 X64 03/15/2018   RIP: 0010:__fortify_report\u002B0x45/0x50   Code: 48 8b 34 (...)   RSP: 0018:ffff97ebc0d6f650 EFLAGS: 00010246   RAX: 7749924ef60fa600 RBX: ffff8bf5446a521a RCX: 0000000000000027   RDX: 00000000ffffdfff RSI: ffff97ebc0d6f548 RDI: ffff8bf84e7a1cc8   RBP: ffff8bf548574080 R08: ffffffffa8c40e10 R09: 0000000000005ffd   R10: 0000000000000004 R11: ffffffffa8c70e10 R12: ffff8bf551eef400   R13: 0000000000000000 R14: 0000000000000013 R15: 00000000000003a8   FS:  00007fae144de8c0(0000) GS:ffff8bf84e780000(0000) knlGS:0000000000000000   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033   CR2: 00007fae14691690 CR3: 00000001027a2003 CR4: 00000000001706f0   Call Trace:    \u003CTASK\u003E    ? __warn\u002B0x12a/0x1d0    ? __fortify_report\u002B0x45/0x50    ? report_bug\u002B0x154/0x1c0    ? handle_bug\u002B0x42/0x70    ? exc_invalid_op\u002B0x1a/0x50    ? asm_exc_invalid_op\u002B0x1a/0x20    ? __fortify_report\u002B0x45/0x50    __fortify_panic\u002B0x9/0x10   __get_cur_name_and_parent\u002B0x3bc/0x3c0    get_cur_path\u002B0x207/0x3b0    send_extent_data\u002B0x709/0x10d0    ? find_parent_nodes\u002B0x22df/0x25d0    ? mas_nomem\u002B0x13/0x90    ? mtree_insert_range\u002B0xa5/0x110    ? btrfs_lru_cache_store\u002B0x5f/0x1e0    ? iterate_extent_inodes\u002B0x52d/0x5a0    process_extent\u002B0xa96/0x11a0    ? __pfx_lookup_backref_cache\u002B0x10/0x10    ? __pfx_store_backref_cache\u002B0x10/0x10    ? __pfx_iterate_backrefs\u002B0x10/0x10    ? __pfx_check_extent_item\u002B0x10/0x10    changed_cb\u002B0x6fa/0x930    ? tree_advance\u002B0x362/0x390    ? memcmp_extent_buffer\u002B0xd7/0x160    send_subvol\u002B0xf0a/0x1520    btrfs_ioctl_send\u002B0x106b/0x11d0    ? __pfx___clone_root_cmp_sort\u002B0x10/0x10    _btrfs_ioctl_send\u002B0x1ac/0x240    btrfs_ioctl\u002B0x75b/0x850    __se_sys_ioctl\u002B0xca/0x150    do_syscall_64\u002B0x85/0x160    ? __count_memcg_events\u002B0x69/0x100    ? handle_mm_fault\u002B0x1327/0x15c0    ? __se_sys_rt_sigprocmask\u002B0xf1/0x180    ? syscall_exit_to_user_mode\u002B0x75/0xa0    ? do_syscall_64\u002B0x91/0x160    ? do_user_addr_fault\u002B0x21d/0x630   entry_SYSCALL_64_after_hwframe\u002B0x76/0x7e   RIP: 0033:0x7fae145eeb4f   Code: 00 48 89 (...)   RSP: 002b:00007ffdf1cb09b0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010   RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fae145eeb4f   RDX: 00007ffdf1cb0ad0 RSI: 0000000040489426 RDI: 0000000000000004   RBP: 00000000000078fe R08: 00007fae144006c0 R09: 00007ffdf1cb0927   R10: 0000000000000008 R11: 0000000000000246 R12: 00007ffdf1cb1ce8   R13: 0000000000000003 R14: 000055c499fab2e0 R15: 0000000000000004    \u003C/TASK\u003E  Fix this by not storing the NUL string terminator since we don\u0027t actually need it for name cache entries, this way \u0022name_len\u0022 corresponds to the actual size of the \u0022name\u0022 array. This requires marking the \u0022name\u0022 array field with __nonstring and using memcpy() instead of strcpy() as recommended by the guidelines at:     https://github.com/KSPP/linux/issues/90",
  "published": "2024-10-21T18:15:08Z",
  "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.00244,
  "epssPercentile": 0.15689,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.11.4-1",
      "fix": "DEBIAN-CVE-2024-49869",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-49869",
      "released": "2024-10-21T18:15:08Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.11.4-1",
      "fix": "DEBIAN-CVE-2024-49869",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-49869",
      "released": "2024-10-21T18:15:08Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T00:53:09Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}