{
  "cveId": "CVE-2021-47508",
  "url": "https://patchblox.com/security/cve/CVE-2021-47508",
  "summary": "CVE-2021-47508 is fixed in linux on 1 platform, first by DEBIAN-CVE-2021-47508, released May 24, 2024. It is not reported as exploited. Patch Radar priority: Routine.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  btrfs: free exchange changeset on failures  Fste...",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  btrfs: free exchange changeset on failures  Fstests runs on my VMs have show several kmemleak reports like the following.    unreferenced object 0xffff88811ae59080 (size 64):     comm \u0022xfs_io\u0022, pid 12124, jiffies 4294987392 (age 6.368s)     hex dump (first 32 bytes):       00 c0 1c 00 00 00 00 00 ff cf 1c 00 00 00 00 00  ................       90 97 e5 1a 81 88 ff ff 90 97 e5 1a 81 88 ff ff  ................     backtrace:       [\u003C00000000ac0176d2\u003E] ulist_add_merge\u002B0x60/0x150 [btrfs]       [\u003C0000000076e9f312\u003E] set_state_bits\u002B0x86/0xc0 [btrfs]       [\u003C0000000014fe73d6\u003E] set_extent_bit\u002B0x270/0x690 [btrfs]       [\u003C000000004f675208\u003E] set_record_extent_bits\u002B0x19/0x20 [btrfs]       [\u003C00000000b96137b1\u003E] qgroup_reserve_data\u002B0x274/0x310 [btrfs]       [\u003C0000000057e9dcbb\u003E] btrfs_check_data_free_space\u002B0x5c/0xa0 [btrfs]       [\u003C0000000019c4511d\u003E] btrfs_delalloc_reserve_space\u002B0x1b/0xa0 [btrfs]       [\u003C000000006d37e007\u003E] btrfs_dio_iomap_begin\u002B0x415/0x970 [btrfs]       [\u003C00000000fb8a74b8\u003E] iomap_iter\u002B0x161/0x1e0       [\u003C0000000071dff6ff\u003E] __iomap_dio_rw\u002B0x1df/0x700       [\u003C000000002567ba53\u003E] iomap_dio_rw\u002B0x5/0x20       [\u003C0000000072e555f8\u003E] btrfs_file_write_iter\u002B0x290/0x530 [btrfs]       [\u003C000000005eb3d845\u003E] new_sync_write\u002B0x106/0x180       [\u003C000000003fb505bf\u003E] vfs_write\u002B0x24d/0x2f0       [\u003C000000009bb57d37\u003E] __x64_sys_pwrite64\u002B0x69/0xa0       [\u003C000000003eba3fdf\u003E] do_syscall_64\u002B0x43/0x90  In case brtfs_qgroup_reserve_data() or btrfs_delalloc_reserve_metadata() fail the allocated extent_changeset will not be freed.  So in btrfs_check_data_free_space() and btrfs_delalloc_reserve_space() free the allocated extent_changeset to get rid of the allocated memory.  The issue currently only happens in the direct IO write path, but only after 65b3c08606e5 (\u0022btrfs: fix ENOSPC failure when attempting direct IO write into NOCOW range\u0022), and also at defrag_one_locked_target(). Every other place is always calling extent_changeset_free() even if its call to btrfs_delalloc_reserve_space() or btrfs_check_data_free_space() has failed.",
  "published": "2024-05-24T15:15:11Z",
  "severity": "medium",
  "cvss": 5.5,
  "cvssVector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
  "epss": 0.00205,
  "epssPercentile": 0.10588,
  "priority": "Routine",
  "priorityTier": 4,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 12.15 (bookworm)",
      "fixedVersion": "5.15.15-1",
      "fix": "DEBIAN-CVE-2021-47508",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2021-47508",
      "released": "2024-05-24T15:15:11Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "5.15.15-1",
      "fix": "DEBIAN-CVE-2021-47508",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2021-47508",
      "released": "2024-05-24T15:15:11Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "5.15.15-1",
      "fix": "DEBIAN-CVE-2021-47508",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2021-47508",
      "released": "2024-05-24T15:15:11Z"
    }
  ],
  "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"
  }
}