{"api_version":"1","generated_at":"2026-09-18T01:40:45+00:00","cve":"CVE-2026-90264","urls":{"html":"https://cve.report/CVE-2026-90264","api":"https://cve.report/api/cve/CVE-2026-90264.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-90264","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-90264"},"summary":{"title":"btrfs: always wait for ordered extents to avoid OE races","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: always wait for ordered extents to avoid OE races\n\n[BUG]\nSyzbot reported a bug that there can be conflicting OEs for the same\nrange:\n\n  BTRFS critical (device loop4): panic in insert_ordered_extent:264: overlapping ordered extents, existing oe file_offset 16384 num_bytes 430080 flags 0x1089, new oe file_offset 16384 num_bytes 430080 flags 0x80 (errno=-17 Object alrea[  179.162726][ T6897] BTRFS critical (device loop4): panic in insert_ordered_extent:264: overlapping ordered extents, existing oe file_offset 16384 num_bytes 430080 flags 0x1089, new oe file_offset 16384 num_bytes 430080 flags 0x80 (errno=-17 Object already exists)\n  ------------[ cut here ]------------\n  kernel BUG at fs/btrfs/ordered-data.c:264!\n  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026\n  RIP: 0010:btrfs_alloc_ordered_extent+0x943/0xad0\n  Call Trace:\n   <TASK>\n   cow_file_range+0x744/0x12a0\n   fallback_to_cow+0x5ea/0xa00\n   run_delalloc_nocow+0x110c/0x17a0\n   btrfs_run_delalloc_range+0xbe4/0x1c20\n   writepage_delalloc+0x104d/0x1ba0\n   btrfs_writepages+0x1667/0x28b0\n   do_writepages+0x338/0x560\n   filemap_fdatawrite_range+0x1f2/0x300\n   btrfs_fdatawrite_range+0x54/0xf0\n   btrfs_direct_write+0x6a0/0xc30\n   btrfs_do_write_iter+0x329/0x790\n   do_iter_readv_writev+0x624/0x8d0\n   vfs_writev+0x34c/0x990\n   __se_sys_pwritev2+0x17a/0x2a0\n   do_syscall_64+0x174/0x580\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n   </TASK>\n  ---[ end trace 0000000000000000 ]---\n\n[CAUSE]\nSince commit ff66fe666233 (\"btrfs: fix incorrect buffered IO fallback\nfor append direct writes\"), if the direct IO finished short, we will\nrevert the isize back to the original one, so that append writes can be\nrespected during the buffered fallback.\n\nNormally we rely on lock_and_cleanup_extent_if_need() function during\nbuffered writeback to wait for any existing ordered extents.\n\nBut that ordered extent waiting only happens if the start_pos is inside\nthe isize.\nSince we have reverted the isize during failed direct IO, we will not\nwait for any ordered extents.\n\nThis means we can have a race where the direct IO OE is still in the\ntree, finished but not yet removed, then we're inserting the OE for the\nbuffered write, causing the above crash.\n\n[FIX]\nMake the OE wait to be unconditional, to handle the reverted isize\nsituation.\n\nAnd since lock_and_cleanup_extent_if_need() now either lock the\nextents or return -EAGAIN, also remove the branches that handles\nno-extent-locked cases, and rename it to remove the \"_if_need\" suffix.\n\nThe following micro benchmark shows the runtime difference for\nbtrfs_buffered_write(), doing `xfs_io -f -c \"pwrite 0 1m\"` workload,\nall values are the average runtime in nano seconds.\n\n      function runtime              |   before    |     after\n -----------------------------------+-------------+---------------\n lock_and_cleanup_extent_if_need()  |     58.2    |    183.0\n btrfs_buffered_write()             |   2115.6    |   2973.3\n\nThe overall runtime of btrfs_buffered_write() is still pretty\ntiny (still less than 3 micro seconds), I'd say the extra cost is still\nacceptable.\n\nAn alternative to fix this problem is to wait ordered extents during\niomap_end() where the isize revert is done.\n\nBut that solution will break nowait requirement, as if a nowait direct\nIO finished short, we have to wait for the OEs unconditionally or the\nnext append buffered IO can still hit the same problem.\n\nSo here we have to move the wait cost to buffered write, but at least\nthe code is slightly more streamline.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-17 17:17:22","updated_at":"2026-09-17 17:17:22"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/ec78575dde998c21be7e0cb2503b5620f34b6255","name":"https://git.kernel.org/stable/c/ec78575dde998c21be7e0cb2503b5620f34b6255","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/58ce50b1802a446d3b26df1b9c58be1ab8913d0e","name":"https://git.kernel.org/stable/c/58ce50b1802a446d3b26df1b9c58be1ab8913d0e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/aaac9b352f7f53f5d2f7e58e612d67d2a2bf7094","name":"https://git.kernel.org/stable/c/aaac9b352f7f53f5d2f7e58e612d67d2a2bf7094","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-90264","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90264","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c3a3d3986719026c85950bfa6f41a251fc46e16f 58ce50b1802a446d3b26df1b9c58be1ab8913d0e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ff66fe6662330226b3f486014c375538d91c44aa aaac9b352f7f53f5d2f7e58e612d67d2a2bf7094 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ff66fe6662330226b3f486014c375538d91c44aa ec78575dde998c21be7e0cb2503b5620f34b6255 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4b5875cbb85dbf4d11385eb0a7a589c086d76d42 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 10b1abc1d0c8ae25c2b9ac465515717c68ffff05 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 097b159d43407b4ea0e5d14ae58a3bbfa5865a24 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ccd5c23122b01de646c80485e2fadac82d1aab62 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b8df7f486a4617d3096b8fa27148cfa54b1d6a8d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.40 6.18.52 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.15.212 5.16 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.178 6.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6.145 6.7 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.97 6.13 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.1.4 7.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.52 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.6 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/btrfs/file.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"58ce50b1802a446d3b26df1b9c58be1ab8913d0e","status":"affected","version":"c3a3d3986719026c85950bfa6f41a251fc46e16f","versionType":"git"},{"lessThan":"aaac9b352f7f53f5d2f7e58e612d67d2a2bf7094","status":"affected","version":"ff66fe6662330226b3f486014c375538d91c44aa","versionType":"git"},{"lessThan":"ec78575dde998c21be7e0cb2503b5620f34b6255","status":"affected","version":"ff66fe6662330226b3f486014c375538d91c44aa","versionType":"git"},{"status":"affected","version":"4b5875cbb85dbf4d11385eb0a7a589c086d76d42","versionType":"git"},{"status":"affected","version":"10b1abc1d0c8ae25c2b9ac465515717c68ffff05","versionType":"git"},{"status":"affected","version":"097b159d43407b4ea0e5d14ae58a3bbfa5865a24","versionType":"git"},{"status":"affected","version":"ccd5c23122b01de646c80485e2fadac82d1aab62","versionType":"git"},{"status":"affected","version":"b8df7f486a4617d3096b8fa27148cfa54b1d6a8d","versionType":"git"},{"lessThan":"6.18.52","status":"affected","version":"6.18.40","versionType":"semver"},{"lessThan":"5.16","status":"affected","version":"5.15.212","versionType":"semver"},{"lessThan":"6.2","status":"affected","version":"6.1.178","versionType":"semver"},{"lessThan":"6.7","status":"affected","version":"6.6.145","versionType":"semver"},{"lessThan":"6.13","status":"affected","version":"6.12.97","versionType":"semver"},{"lessThan":"7.2","status":"affected","version":"7.1.4","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/btrfs/file.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.2"},{"lessThan":"7.2","status":"unaffected","version":"0","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-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.52","versionStartIncluding":"6.18.40","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.6","versionStartIncluding":"7.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc1","versionStartIncluding":"7.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.212","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.178","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.145","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.97","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1.4","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: always wait for ordered extents to avoid OE races\n\n[BUG]\nSyzbot reported a bug that there can be conflicting OEs for the same\nrange:\n\n  BTRFS critical (device loop4): panic in insert_ordered_extent:264: overlapping ordered extents, existing oe file_offset 16384 num_bytes 430080 flags 0x1089, new oe file_offset 16384 num_bytes 430080 flags 0x80 (errno=-17 Object alrea[  179.162726][ T6897] BTRFS critical (device loop4): panic in insert_ordered_extent:264: overlapping ordered extents, existing oe file_offset 16384 num_bytes 430080 flags 0x1089, new oe file_offset 16384 num_bytes 430080 flags 0x80 (errno=-17 Object already exists)\n  ------------[ cut here ]------------\n  kernel BUG at fs/btrfs/ordered-data.c:264!\n  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026\n  RIP: 0010:btrfs_alloc_ordered_extent+0x943/0xad0\n  Call Trace:\n   <TASK>\n   cow_file_range+0x744/0x12a0\n   fallback_to_cow+0x5ea/0xa00\n   run_delalloc_nocow+0x110c/0x17a0\n   btrfs_run_delalloc_range+0xbe4/0x1c20\n   writepage_delalloc+0x104d/0x1ba0\n   btrfs_writepages+0x1667/0x28b0\n   do_writepages+0x338/0x560\n   filemap_fdatawrite_range+0x1f2/0x300\n   btrfs_fdatawrite_range+0x54/0xf0\n   btrfs_direct_write+0x6a0/0xc30\n   btrfs_do_write_iter+0x329/0x790\n   do_iter_readv_writev+0x624/0x8d0\n   vfs_writev+0x34c/0x990\n   __se_sys_pwritev2+0x17a/0x2a0\n   do_syscall_64+0x174/0x580\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n   </TASK>\n  ---[ end trace 0000000000000000 ]---\n\n[CAUSE]\nSince commit ff66fe666233 (\"btrfs: fix incorrect buffered IO fallback\nfor append direct writes\"), if the direct IO finished short, we will\nrevert the isize back to the original one, so that append writes can be\nrespected during the buffered fallback.\n\nNormally we rely on lock_and_cleanup_extent_if_need() function during\nbuffered writeback to wait for any existing ordered extents.\n\nBut that ordered extent waiting only happens if the start_pos is inside\nthe isize.\nSince we have reverted the isize during failed direct IO, we will not\nwait for any ordered extents.\n\nThis means we can have a race where the direct IO OE is still in the\ntree, finished but not yet removed, then we're inserting the OE for the\nbuffered write, causing the above crash.\n\n[FIX]\nMake the OE wait to be unconditional, to handle the reverted isize\nsituation.\n\nAnd since lock_and_cleanup_extent_if_need() now either lock the\nextents or return -EAGAIN, also remove the branches that handles\nno-extent-locked cases, and rename it to remove the \"_if_need\" suffix.\n\nThe following micro benchmark shows the runtime difference for\nbtrfs_buffered_write(), doing `xfs_io -f -c \"pwrite 0 1m\"` workload,\nall values are the average runtime in nano seconds.\n\n      function runtime              |   before    |     after\n -----------------------------------+-------------+---------------\n lock_and_cleanup_extent_if_need()  |     58.2    |    183.0\n btrfs_buffered_write()             |   2115.6    |   2973.3\n\nThe overall runtime of btrfs_buffered_write() is still pretty\ntiny (still less than 3 micro seconds), I'd say the extra cost is still\nacceptable.\n\nAn alternative to fix this problem is to wait ordered extents during\niomap_end() where the isize revert is done.\n\nBut that solution will break nowait requirement, as if a nowait direct\nIO finished short, we have to wait for the OEs unconditionally or the\nnext append buffered IO can still hit the same problem.\n\nSo here we have to move the wait cost to buffered write, but at least\nthe code is slightly more streamline."}],"providerMetadata":{"dateUpdated":"2026-09-17T16:08:00.740Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/58ce50b1802a446d3b26df1b9c58be1ab8913d0e"},{"url":"https://git.kernel.org/stable/c/aaac9b352f7f53f5d2f7e58e612d67d2a2bf7094"},{"url":"https://git.kernel.org/stable/c/ec78575dde998c21be7e0cb2503b5620f34b6255"}],"title":"btrfs: always wait for ordered extents to avoid OE races","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-90264","datePublished":"2026-09-17T16:08:00.740Z","dateReserved":"2026-09-11T19:38:34.796Z","dateUpdated":"2026-09-17T16:08:00.740Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-17 17:17:22","lastModifiedDate":"2026-09-17 17:17:22","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"90264","Ordinal":"1","Title":"btrfs: always wait for ordered extents to avoid OE races","CVE":"CVE-2026-90264","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"90264","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: always wait for ordered extents to avoid OE races\n\n[BUG]\nSyzbot reported a bug that there can be conflicting OEs for the same\nrange:\n\n  BTRFS critical (device loop4): panic in insert_ordered_extent:264: overlapping ordered extents, existing oe file_offset 16384 num_bytes 430080 flags 0x1089, new oe file_offset 16384 num_bytes 430080 flags 0x80 (errno=-17 Object alrea[  179.162726][ T6897] BTRFS critical (device loop4): panic in insert_ordered_extent:264: overlapping ordered extents, existing oe file_offset 16384 num_bytes 430080 flags 0x1089, new oe file_offset 16384 num_bytes 430080 flags 0x80 (errno=-17 Object already exists)\n  ------------[ cut here ]------------\n  kernel BUG at fs/btrfs/ordered-data.c:264!\n  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026\n  RIP: 0010:btrfs_alloc_ordered_extent+0x943/0xad0\n  Call Trace:\n   <TASK>\n   cow_file_range+0x744/0x12a0\n   fallback_to_cow+0x5ea/0xa00\n   run_delalloc_nocow+0x110c/0x17a0\n   btrfs_run_delalloc_range+0xbe4/0x1c20\n   writepage_delalloc+0x104d/0x1ba0\n   btrfs_writepages+0x1667/0x28b0\n   do_writepages+0x338/0x560\n   filemap_fdatawrite_range+0x1f2/0x300\n   btrfs_fdatawrite_range+0x54/0xf0\n   btrfs_direct_write+0x6a0/0xc30\n   btrfs_do_write_iter+0x329/0x790\n   do_iter_readv_writev+0x624/0x8d0\n   vfs_writev+0x34c/0x990\n   __se_sys_pwritev2+0x17a/0x2a0\n   do_syscall_64+0x174/0x580\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n   </TASK>\n  ---[ end trace 0000000000000000 ]---\n\n[CAUSE]\nSince commit ff66fe666233 (\"btrfs: fix incorrect buffered IO fallback\nfor append direct writes\"), if the direct IO finished short, we will\nrevert the isize back to the original one, so that append writes can be\nrespected during the buffered fallback.\n\nNormally we rely on lock_and_cleanup_extent_if_need() function during\nbuffered writeback to wait for any existing ordered extents.\n\nBut that ordered extent waiting only happens if the start_pos is inside\nthe isize.\nSince we have reverted the isize during failed direct IO, we will not\nwait for any ordered extents.\n\nThis means we can have a race where the direct IO OE is still in the\ntree, finished but not yet removed, then we're inserting the OE for the\nbuffered write, causing the above crash.\n\n[FIX]\nMake the OE wait to be unconditional, to handle the reverted isize\nsituation.\n\nAnd since lock_and_cleanup_extent_if_need() now either lock the\nextents or return -EAGAIN, also remove the branches that handles\nno-extent-locked cases, and rename it to remove the \"_if_need\" suffix.\n\nThe following micro benchmark shows the runtime difference for\nbtrfs_buffered_write(), doing `xfs_io -f -c \"pwrite 0 1m\"` workload,\nall values are the average runtime in nano seconds.\n\n      function runtime              |   before    |     after\n -----------------------------------+-------------+---------------\n lock_and_cleanup_extent_if_need()  |     58.2    |    183.0\n btrfs_buffered_write()             |   2115.6    |   2973.3\n\nThe overall runtime of btrfs_buffered_write() is still pretty\ntiny (still less than 3 micro seconds), I'd say the extra cost is still\nacceptable.\n\nAn alternative to fix this problem is to wait ordered extents during\niomap_end() where the isize revert is done.\n\nBut that solution will break nowait requirement, as if a nowait direct\nIO finished short, we have to wait for the OEs unconditionally or the\nnext append buffered IO can still hit the same problem.\n\nSo here we have to move the wait cost to buffered write, but at least\nthe code is slightly more streamline.","Type":"Description","Title":"btrfs: always wait for ordered extents to avoid OE races"}]}}}