{"id":21644,"date":"2026-09-12T04:31:27","date_gmt":"2026-09-11T20:31:27","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89722"},"modified":"2026-09-12T04:31:27","modified_gmt":"2026-09-11T20:31:27","slug":"cve-2026-89722","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89722","title":{"rendered":"CVE-2026-89722 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nPCI\/sysfs: Fix out-of"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>PCI\/sysfs: Fix out-of-bounds read in pci_write_legacy_io()<\/p>\n<p>pci_write_legacy_io() loads 4 bytes from the kernfs write buffer<br \/>\nregardless of how many bytes userspace wrote:<\/p>\n<p>  if (count != 1 &amp;&amp; count != 2 &amp;&amp; count != 4)<br \/>\n          return -EINVAL;<\/p>\n<p>  return pci_legacy_write(bus, off, *(u32 *)buf, count);<\/p>\n<p>kernfs_fop_write_iter() allocates the buffer with kmalloc(len + 1),<br \/>\nso a 1-byte write to the legacy_io sysfs file allocates 2 bytes and<br \/>\nthe unconditional u32 load reads up to 2 bytes past the end of the<br \/>\nallocation, which KASAN reports as a slab-out-of-bounds read.<br \/>\nSimilarly, a 2-byte write overreads by 1 byte.<\/p>\n<p>Thus, read only the number of bytes requested using get_unaligned_le16()<br \/>\nand get_unaligned_le32() for the 2 and 4 byte cases, interpreting the<br \/>\nbuffer as little-endian to match the byte ordering of PCI I\/O port<br \/>\nspace.<\/p>\n<p>The PowerPC implementation previously compensated for the generic<br \/>\ncode&#8217;s native-endian 32-bit load by shifting the value into place<br \/>\nfor the 1 and 2 byte cases.  The shifts were only correct on<br \/>\nbig-endian kernels.<\/p>\n<p>On little-endian PowerPC (POWER8 and later), they extracted the wrong<br \/>\nbytes, so a 1-byte write wrote an out-of-bounds byte instead of the<br \/>\nrequested value.  On big-endian, the native load also caused out_le16()<br \/>\nand out_le32() to reverse the user&#8217;s bytes on the wire for 2 and 4 byte<br \/>\nwrites.  The little-endian helpers resolve both issues, so the shifts<br \/>\nare removed.<\/p>\n<p>No changes are needed for the Alpha platform.<\/p>\n<p>The legacy_io file is root-only and exists only on Alpha and PowerPC,<br \/>\nthe two architectures that define HAVE_PCI_LEGACY.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>PCI\/sysfs: Fix out-of-bounds read in pci_write_legacy_io()<\/p>\n<p>pci_write_legacy_io() loads 4 bytes from the kernfs write buffer<br \/>\nregard<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-21644","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/21644","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=21644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}