{"id":25907,"date":"2026-09-18T04:32:04","date_gmt":"2026-09-17T20:32:04","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-93048"},"modified":"2026-09-18T04:32:04","modified_gmt":"2026-09-17T20:32:04","slug":"cve-2026-93048","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-93048","title":{"rendered":"CVE-2026-93048 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmtd: part: reject MTD"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mtd: part: reject MTDPART_OFS_RETAIN in mtd_add_partition()<\/p>\n<p>mtd_add_partition() does not reject the special offset value<br \/>\nMTDPART_OFS_RETAIN (-3), which leads to a WARN_ON in<br \/>\nadd_mtd_device() when called through the BLKPG ioctl on NAND<br \/>\ndevices. The RETAIN value depends on cur_offset being the end of<br \/>\nthe previous partition, but in the dynamic partition path<br \/>\ncur_offset equals the offset argument itself, causing undefined<br \/>\nbehavior.<\/p>\n<p>Commit 5daa7b21496a (&#8220;mtd: prepare partition add and del functions<br \/>\nfor ioctl requests&#8221;) introduced mtd_add_partition() and correctly<br \/>\nrejected MTDPART_OFS_APPEND (-1) and MTDPART_OFS_NXTBLK (-2),<br \/>\nsince those special offsets rely on cur_offset tracking the<br \/>\nprevious partition&#8217;s end. However, commit 1a31368bf92e (&#8220;mtd: add a flags<br \/>\nfor partitions which should just leave smth. after them&#8221;)<br \/>\nlater added MTDPART_OFS_RETAIN (-3) for the static<br \/>\npartition table path without updating mtd_add_partition() to<br \/>\nalso reject this value.<\/p>\n<p>With offset=-3 passed via BLKPG, the RETAIN size calculation in<br \/>\nallocate_partition() underflows (parent_size &#8211; 0xFFFFFFFFFFFFFFFD<br \/>\n= parent_size + 3). If the underflow result does not appear to<br \/>\nleave enough space, allocate_partition() jumps to out_register via<br \/>\ngoto, skipping erasesize initialization. This results in<br \/>\nerasesize=0, which triggers:<\/p>\n<p>WARN_ON((!mtd-&gt;erasesize || !master-&gt;_erase) &amp;&amp;<br \/>\n\t\t!(mtd-&gt;flags &amp; MTD_NO_ERASE))<\/p>\n<p>in add_mtd_device(). If the underflow result appears to leave<br \/>\nenough space, a bogus partition size is calculated, but the<br \/>\n&#8220;out of reach&#8221; sanity check catches the invalid offset and<br \/>\ncreates a disabled empty partition (offset=0, size=0) instead<br \/>\nof returning an error.<\/p>\n<p>Fix this by adding MTDPART_OFS_RETAIN to the rejection list in<br \/>\nmtd_add_partition(), consistent with the existing handling of<br \/>\nAPPEND and NXTBLK.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mtd: part: reject MTDPART_OFS_RETAIN in mtd_add_partition()<\/p>\n<p>mtd_add_partition() does not reject the special offset value<br \/>\nMTDPART_O<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-25907","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/25907","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=25907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}