CVE-2026-90265 (GCVE-0-2026-90265)
Vulnerability from cvelistv5
Published
2026-09-17 16:08
Modified
2026-10-21 12:50
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: defrag: fix deadlock between defrag and delalloc space reservation While running fsstress with autodefrag and flushoncommit, hit a deadlock due to the fact that defrag reserves delalloc space while it's holding dirty and locked folios, besides the extent range lock. The stack traces are the following: [958.624] task:kworker/u50:3 state:D stack:0 pid:20365 tgid:20365 ppid:2 task_flags:0x4208060 flags:0x00080000 [958.626] Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs] [958.627] Call Trace: [958.628] <TASK> [958.628] __schedule+0x4be/0x10f0 [958.629] ? preempt_count_add+0x69/0xa0 [958.630] schedule+0x26/0xd0 [958.631] wait_current_trans+0x102/0x160 [btrfs] [958.632] ? __pfx_autoremove_wake_function+0x10/0x10 [958.633] start_transaction+0x374/0x900 [btrfs] [958.634] btrfs_commit_current_transaction+0x1d/0x70 [btrfs] [958.635] flush_space+0xca/0x5e0 [btrfs] [958.636] ? _raw_spin_unlock+0x15/0x30 [958.637] ? btrfs_reduce_alloc_profile+0x8c/0x190 [btrfs] [958.639] ? _raw_spin_unlock+0x15/0x30 [958.640] ? calc_available_free_space.isra.0+0x6f/0x110 [btrfs] [958.641] do_async_reclaim_metadata_space+0x84/0x190 [btrfs] [958.642] btrfs_async_reclaim_metadata_space+0x64/0x80 [btrfs] [958.644] process_one_work+0x19d/0x3a0 [958.644] worker_thread+0x1c4/0x330 [958.645] ? __pfx_worker_thread+0x10/0x10 [958.646] kthread+0xfc/0x130 [958.647] ? __pfx_kthread+0x10/0x10 [958.648] ret_from_fork+0x1f7/0x2c0 [958.648] ? __pfx_kthread+0x10/0x10 [958.649] ret_from_fork_asm+0x1a/0x30 [958.650] </TASK> [958.651] task:kworker/u49:7 state:D stack:0 pid:52990 tgid:52990 ppid:2 task_flags:0x4208060 flags:0x00080000 [958.653] Workqueue: writeback wb_workfn (flush-btrfs-334) [958.655] Call Trace: [958.655] <TASK> [958.656] __schedule+0x4be/0x10f0 [958.657] ? __blk_flush_plug+0xe9/0x140 [958.658] schedule+0x26/0xd0 [958.658] io_schedule+0x42/0x70 [958.659] folio_wait_bit_common+0x12b/0x330 [958.660] ? folio_wait_bit_common+0x100/0x330 [958.662] ? __pfx_wake_page_function+0x10/0x10 [958.663] extent_write_cache_pages+0x599/0x830 [btrfs] [958.664] ? acpi_fwnode_get_reference_args+0x1fa/0x270 [958.665] btrfs_writepages+0x77/0x130 [btrfs] [958.666] ? __pfx_end_bbio_data_write+0x10/0x10 [btrfs] [958.667] do_writepages+0xc6/0x160 [958.668] __writeback_single_inode+0x42/0x310 [958.669] writeback_sb_inodes+0x231/0x570 [958.670] wb_writeback+0x8a/0x340 [958.671] wb_workfn+0xbf/0x450 [958.672] ? finish_task_switch.isra.0+0xc1/0x350 [958.673] process_one_work+0x19d/0x3a0 [958.673] worker_thread+0x1c4/0x330 [958.674] ? __pfx_worker_thread+0x10/0x10 [958.675] kthread+0xfc/0x130 [958.676] ? __pfx_kthread+0x10/0x10 [958.676] ret_from_fork+0x1f7/0x2c0 [958.677] ? __pfx_kthread+0x10/0x10 [958.678] ret_from_fork_asm+0x1a/0x30 [958.679] </TASK> [958.679] task:btrfs-cleaner state:D stack:0 pid:296750 tgid:296750 ppid:2 task_flags:0x208040 flags:0x00080000 [958.681] Call Trace: [958.682] <TASK> [958.682] __schedule+0x4be/0x10f0 [958.683] schedule+0x26/0xd0 [958.684] handle_reserve_ticket+0x1b9/0x2c0 [btrfs] [958.685] ? __pfx_autoremove_wake_function+0x10/0x10 [958.686] reserve_bytes+0x283/0x4c0 [btrfs] [958.687] btrfs_reserve_metadata_bytes+0x18/0xb0 [btrfs] [958.688] btrfs_delalloc_reserve_metadata+0x121/0x320 [btrfs] [958.690] btrfs_delalloc_reserve_space+0x46/0xb0 [btrfs] [958.691] btrfs_defrag_file+0x903/0x1110 [btrfs] [958.692] btrfs_run_defrag_inodes+0x334/0x430 [btrfs] [958.694] cleaner_kthread+0x97/0x1c0 [btrfs] [958.694] ? __pfx_cleaner_kthread+0x10/0x10 [btrfs] [958.696] kthread+0xfc/0x130 [958.696] ? __pfx_kthread+0x10/0x10 [958.697] ret_ ---truncated---
Impacted products
Vendor Product Version
Linux Linux Version: 22b398eeeed43d51e85b1008e51bf9663ac1f491
Version: 22b398eeeed43d51e85b1008e51bf9663ac1f491
Version: 22b398eeeed43d51e85b1008e51bf9663ac1f491
Version: 22b398eeeed43d51e85b1008e51bf9663ac1f491
Version: 22b398eeeed43d51e85b1008e51bf9663ac1f491
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/defrag.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c97277aa6ce8ac725642aced0fe20cd8d31f6e09",
              "status": "affected",
              "version": "22b398eeeed43d51e85b1008e51bf9663ac1f491",
              "versionType": "git"
            },
            {
              "lessThan": "37614074596827a5f292243673b699c90ff63e7d",
              "status": "affected",
              "version": "22b398eeeed43d51e85b1008e51bf9663ac1f491",
              "versionType": "git"
            },
            {
              "lessThan": "a9701dd06e82c345fe70debdf8835b7eb5000c59",
              "status": "affected",
              "version": "22b398eeeed43d51e85b1008e51bf9663ac1f491",
              "versionType": "git"
            },
            {
              "lessThan": "ac916391e1c70801649f7d6f85014f687983bc33",
              "status": "affected",
              "version": "22b398eeeed43d51e85b1008e51bf9663ac1f491",
              "versionType": "git"
            },
            {
              "lessThan": "ba02eab28041f9a4bbe9fc90c7249644fef6de0f",
              "status": "affected",
              "version": "22b398eeeed43d51e85b1008e51bf9663ac1f491",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/defrag.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.16"
            },
            {
              "lessThan": "5.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.160",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.114",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.52",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.160",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.114",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.52",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.6",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: defrag: fix deadlock between defrag and delalloc space reservation\n\nWhile running fsstress with autodefrag and flushoncommit, hit a deadlock\ndue to the fact that defrag reserves delalloc space while it\u0027s holding\ndirty and locked folios, besides the extent range lock. The stack traces\nare the following:\n\n   [958.624] task:kworker/u50:3   state:D stack:0     pid:20365 tgid:20365 ppid:2      task_flags:0x4208060 flags:0x00080000\n   [958.626] Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs]\n   [958.627] Call Trace:\n   [958.628]  \u003cTASK\u003e\n   [958.628]  __schedule+0x4be/0x10f0\n   [958.629]  ? preempt_count_add+0x69/0xa0\n   [958.630]  schedule+0x26/0xd0\n   [958.631]  wait_current_trans+0x102/0x160 [btrfs]\n   [958.632]  ? __pfx_autoremove_wake_function+0x10/0x10\n   [958.633]  start_transaction+0x374/0x900 [btrfs]\n   [958.634]  btrfs_commit_current_transaction+0x1d/0x70 [btrfs]\n   [958.635]  flush_space+0xca/0x5e0 [btrfs]\n   [958.636]  ? _raw_spin_unlock+0x15/0x30\n   [958.637]  ? btrfs_reduce_alloc_profile+0x8c/0x190 [btrfs]\n   [958.639]  ? _raw_spin_unlock+0x15/0x30\n   [958.640]  ? calc_available_free_space.isra.0+0x6f/0x110 [btrfs]\n   [958.641]  do_async_reclaim_metadata_space+0x84/0x190 [btrfs]\n   [958.642]  btrfs_async_reclaim_metadata_space+0x64/0x80 [btrfs]\n   [958.644]  process_one_work+0x19d/0x3a0\n   [958.644]  worker_thread+0x1c4/0x330\n   [958.645]  ? __pfx_worker_thread+0x10/0x10\n   [958.646]  kthread+0xfc/0x130\n   [958.647]  ? __pfx_kthread+0x10/0x10\n   [958.648]  ret_from_fork+0x1f7/0x2c0\n   [958.648]  ? __pfx_kthread+0x10/0x10\n   [958.649]  ret_from_fork_asm+0x1a/0x30\n   [958.650]  \u003c/TASK\u003e\n   [958.651] task:kworker/u49:7   state:D stack:0     pid:52990 tgid:52990 ppid:2      task_flags:0x4208060 flags:0x00080000\n   [958.653] Workqueue: writeback wb_workfn (flush-btrfs-334)\n   [958.655] Call Trace:\n   [958.655]  \u003cTASK\u003e\n   [958.656]  __schedule+0x4be/0x10f0\n   [958.657]  ? __blk_flush_plug+0xe9/0x140\n   [958.658]  schedule+0x26/0xd0\n   [958.658]  io_schedule+0x42/0x70\n   [958.659]  folio_wait_bit_common+0x12b/0x330\n   [958.660]  ? folio_wait_bit_common+0x100/0x330\n   [958.662]  ? __pfx_wake_page_function+0x10/0x10\n   [958.663]  extent_write_cache_pages+0x599/0x830 [btrfs]\n   [958.664]  ? acpi_fwnode_get_reference_args+0x1fa/0x270\n   [958.665]  btrfs_writepages+0x77/0x130 [btrfs]\n   [958.666]  ? __pfx_end_bbio_data_write+0x10/0x10 [btrfs]\n   [958.667]  do_writepages+0xc6/0x160\n   [958.668]  __writeback_single_inode+0x42/0x310\n   [958.669]  writeback_sb_inodes+0x231/0x570\n   [958.670]  wb_writeback+0x8a/0x340\n   [958.671]  wb_workfn+0xbf/0x450\n   [958.672]  ? finish_task_switch.isra.0+0xc1/0x350\n   [958.673]  process_one_work+0x19d/0x3a0\n   [958.673]  worker_thread+0x1c4/0x330\n   [958.674]  ? __pfx_worker_thread+0x10/0x10\n   [958.675]  kthread+0xfc/0x130\n   [958.676]  ? __pfx_kthread+0x10/0x10\n   [958.676]  ret_from_fork+0x1f7/0x2c0\n   [958.677]  ? __pfx_kthread+0x10/0x10\n   [958.678]  ret_from_fork_asm+0x1a/0x30\n   [958.679]  \u003c/TASK\u003e\n   [958.679] task:btrfs-cleaner   state:D stack:0     pid:296750 tgid:296750 ppid:2      task_flags:0x208040 flags:0x00080000\n   [958.681] Call Trace:\n   [958.682]  \u003cTASK\u003e\n   [958.682]  __schedule+0x4be/0x10f0\n   [958.683]  schedule+0x26/0xd0\n   [958.684]  handle_reserve_ticket+0x1b9/0x2c0 [btrfs]\n   [958.685]  ? __pfx_autoremove_wake_function+0x10/0x10\n   [958.686]  reserve_bytes+0x283/0x4c0 [btrfs]\n   [958.687]  btrfs_reserve_metadata_bytes+0x18/0xb0 [btrfs]\n   [958.688]  btrfs_delalloc_reserve_metadata+0x121/0x320 [btrfs]\n   [958.690]  btrfs_delalloc_reserve_space+0x46/0xb0 [btrfs]\n   [958.691]  btrfs_defrag_file+0x903/0x1110 [btrfs]\n   [958.692]  btrfs_run_defrag_inodes+0x334/0x430 [btrfs]\n   [958.694]  cleaner_kthread+0x97/0x1c0 [btrfs]\n   [958.694]  ? __pfx_cleaner_kthread+0x10/0x10 [btrfs]\n   [958.696]  kthread+0xfc/0x130\n   [958.696]  ? __pfx_kthread+0x10/0x10\n   [958.697]  ret_\n---truncated---"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-21T12:50:45.545Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c97277aa6ce8ac725642aced0fe20cd8d31f6e09"
        },
        {
          "url": "https://git.kernel.org/stable/c/37614074596827a5f292243673b699c90ff63e7d"
        },
        {
          "url": "https://git.kernel.org/stable/c/a9701dd06e82c345fe70debdf8835b7eb5000c59"
        },
        {
          "url": "https://git.kernel.org/stable/c/ac916391e1c70801649f7d6f85014f687983bc33"
        },
        {
          "url": "https://git.kernel.org/stable/c/ba02eab28041f9a4bbe9fc90c7249644fef6de0f"
        }
      ],
      "title": "btrfs: defrag: fix deadlock between defrag and delalloc space reservation",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-90265",
    "datePublished": "2026-09-17T16:08:01.372Z",
    "dateReserved": "2026-09-11T19:38:34.796Z",
    "dateUpdated": "2026-10-21T12:50:45.545Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…