{"id":28663,"date":"2026-09-25T04:31:32","date_gmt":"2026-09-24T20:31:32","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-97416"},"modified":"2026-09-25T04:31:32","modified_gmt":"2026-09-24T20:31:32","slug":"cve-2026-97416","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-97416","title":{"rendered":"CVE-2026-97416 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: balance: fix p"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>btrfs: balance: fix potential bg lookup failure in btrfs_may_alloc_data_chunk()<\/p>\n<p>[BUG]<br \/>\nRunning btrfs balance can trigger a null-ptr-deref before relocating a<br \/>\ndata chunk when metadata corruption leaves a chunk in the chunk tree<br \/>\nwithout a corresponding block group in the in-memory cache:<\/p>\n<p>  KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]<br \/>\n  RIP: 0010:btrfs_may_alloc_data_chunk+0x40\/0x1c0 fs\/btrfs\/volumes.c:3601<br \/>\n  Call Trace:<br \/>\n    __btrfs_balance fs\/btrfs\/volumes.c:4217 [inline]<br \/>\n    btrfs_balance+0x2516\/0x42b0 fs\/btrfs\/volumes.c:4604<br \/>\n    btrfs_ioctl_balance fs\/btrfs\/ioctl.c:3577 [inline]<br \/>\n    btrfs_ioctl+0x25cf\/0x5b90 fs\/btrfs\/ioctl.c:5313<br \/>\n    &#8230;<\/p>\n<p>[CAUSE]<br \/>\n__btrfs_balance() iterates the on-disk chunk tree and passes the chunk<br \/>\nlogical bytenr to btrfs_may_alloc_data_chunk() before relocating a data<br \/>\nchunk. That helper then queries the in-memory block group cache:<\/p>\n<p>  cache = btrfs_lookup_block_group(fs_info, chunk_offset);<br \/>\n  chunk_type = cache-&gt;flags;   \/* cache may be NULL *\/<\/p>\n<p>A corrupt image can contain a chunk item whose matching block group<br \/>\nitem is missing, so no block group is ever inserted into the cache. In<br \/>\nthat case btrfs_lookup_block_group() returns NULL.<\/p>\n<p>The code only guards this with ASSERT(cache), which becomes a no-op when<br \/>\nCONFIG_BTRFS_ASSERT is disabled. The subsequent dereference of<br \/>\ncache-&gt;flags therefore crashes the kernel.<\/p>\n<p>[FIX]<br \/>\nAdd a NULL check after btrfs_lookup_block_group() in<br \/>\nbtrfs_may_alloc_data_chunk() and print and error message for clarity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>btrfs: balance: fix potential bg lookup failure in btrfs_may_alloc_data_chunk()<\/p>\n<p>[BUG]<br \/>\nRunning btrfs balance can trigger a null-ptr<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-28663","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/28663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}