{"id":21479,"date":"2026-09-12T04:31:14","date_gmt":"2026-09-11T20:31:14","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89557"},"modified":"2026-09-12T04:31:14","modified_gmt":"2026-09-11T20:31:14","slug":"cve-2026-89557","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89557","title":{"rendered":"CVE-2026-89557 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmd: do overflow check"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>md: do overflow check for sb-&gt;bblog_shift in super_1_load()<\/p>\n<p>In super_1_load(), sb-&gt;bblog_shift is an __u8 type value loaded from on-<br \/>\ndisk superblock. It is used for badblocks API badblocks_set() by the<br \/>\nfollowing sequence,<\/p>\n<p> 1930   rdev-&gt;badblocks.shift = sb-&gt;bblog_shift;<br \/>\n 1931   for (i = 0 ; i &lt; (sectors &lt;&gt; 10;<br \/>\n 1935           sector &lt;bblog_shift;<br \/>\n 1936           count &lt;bblog_shift;<br \/>\n 1937           if (bb + 1 == 0)<br \/>\n 1938                   break;<br \/>\n 1939           if (!badblocks_set(&amp;rdev-&gt;badblocks, sector, count, 1))<br \/>\n 1940                   return -EINVAL;<br \/>\n 1941   }<\/p>\n<p>bb-&gt;bblog_shit is in range of 0-255, variable sector is 64bit width, for<br \/>\nan invalid bb-&gt;bblog_shit, it is possible to make sector be overflowed<br \/>\nby the following calculation,<br \/>\n 1935           sector &lt;bblog_shift;<br \/>\nThen in turn when call badblocks_set() at line 1939 with the invalid<br \/>\nrdev-&gt;badblocks.shift set at line 1930, may result an overflow inside<br \/>\n_badblocks_clear() in block\/badblocks.c.<\/p>\n<p>Although there are many places to call badblocks APIs, the non-zero<br \/>\nshift value is only used in super_1_load(), other places always use 0 as<br \/>\nthe shift value. Therefore it is unnecessary to do a general shift value<br \/>\noverflow check inside badblock API, and just check here as the caller.<\/p>\n<p>This may avoid unnecessary check, make the badblocks API code more simple<br \/>\nand elegant.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>md: do overflow check for sb-&gt;bblog_shift in super_1_load()<\/p>\n<p>In super_1_load(), sb-&gt;bblog_shift is an __u8 type value loaded from o<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-21479","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/21479","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=21479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}