{"id":21412,"date":"2026-09-12T04:31:09","date_gmt":"2026-09-11T20:31:09","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89490"},"modified":"2026-09-12T04:31:09","modified_gmt":"2026-09-11T20:31:09","slug":"cve-2026-89490","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89490","title":{"rendered":"CVE-2026-89490 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: fix readdir po"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>ocfs2: fix readdir position truncation on 32-bit kernels<\/p>\n<p>In ocfs2_dir_foreach_blk_el(), the directory cookie position is<br \/>\nrebuilt with<\/p>\n<p>\tctx-&gt;pos = (ctx-&gt;pos &amp; ~(sb-&gt;s_blocksize &#8211; 1)) | offset;<\/p>\n<p>`ctx-&gt;pos` is loff_t (signed 64-bit), while `sb-&gt;s_blocksize` is<br \/>\nunsigned long.  On 32-bit kernels unsigned long is 32-bit, so the mask<\/p>\n<p>\t~(sb-&gt;s_blocksize &#8211; 1)<\/p>\n<p>is computed as a 32-bit unsigned value (e.g. 0xfffff000 for a 4 KiB<br \/>\nblock size).  In the AND expression with the 64-bit `ctx-&gt;pos`, that<br \/>\nunsigned operand is zero-extended to 64 bits per the usual arithmetic<br \/>\nconversions, yielding 0x00000000fffff000.  The high 32 bits of<br \/>\n`ctx-&gt;pos` are silently cleared, even though directory size is<br \/>\nallowed to exceed 4 GiB.<\/p>\n<p>When readdir() crosses the 4 GiB boundary on a 32-bit kernel the<br \/>\nposition is reset back into the first 4 GiB block, making the<br \/>\nre-validation path re-enumerate already-returned dirents indefinitely.<\/p>\n<p>This is ocfs2_dir_foreach_blk_el(), the extent-list readdir path taken<br \/>\nfor all non-inline directories, so a directory large enough to cross<br \/>\n4 GiB reaches it.<\/p>\n<p>This is the same class of bug that commit 3dce5bb82c97 (&#8220;exfat: Fix<br \/>\nbitwise operation having different size&#8221;) fixed in exfat, and the<br \/>\nfix mirrors the equivalent ext4 fix in this series.  Cast the operand<br \/>\nto loff_t so the mask is 64-bit before the AND:<\/p>\n<p>\tctx-&gt;pos = (ctx-&gt;pos &amp; ~((loff_t)sb-&gt;s_blocksize &#8211; 1)) | offset;<\/p>\n<p>64-bit kernels are unaffected.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>ocfs2: fix readdir position truncation on 32-bit kernels<\/p>\n<p>In ocfs2_dir_foreach_blk_el(), the directory cookie position is<br \/>\nrebuilt w<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-21412","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/21412","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=21412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}