{"api_version":"1","generated_at":"2026-09-12T12:18:18+00:00","cve":"CVE-2026-89722","urls":{"html":"https://cve.report/CVE-2026-89722","api":"https://cve.report/api/cve/CVE-2026-89722.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-89722","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-89722"},"summary":{"title":"PCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()\n\npci_write_legacy_io() loads 4 bytes from the kernfs write buffer\nregardless of how many bytes userspace wrote:\n\n  if (count != 1 && count != 2 && count != 4)\n          return -EINVAL;\n\n  return pci_legacy_write(bus, off, *(u32 *)buf, count);\n\nkernfs_fop_write_iter() allocates the buffer with kmalloc(len + 1),\nso a 1-byte write to the legacy_io sysfs file allocates 2 bytes and\nthe unconditional u32 load reads up to 2 bytes past the end of the\nallocation, which KASAN reports as a slab-out-of-bounds read.\nSimilarly, a 2-byte write overreads by 1 byte.\n\nThus, read only the number of bytes requested using get_unaligned_le16()\nand get_unaligned_le32() for the 2 and 4 byte cases, interpreting the\nbuffer as little-endian to match the byte ordering of PCI I/O port\nspace.\n\nThe PowerPC implementation previously compensated for the generic\ncode's native-endian 32-bit load by shifting the value into place\nfor the 1 and 2 byte cases.  The shifts were only correct on\nbig-endian kernels.\n\nOn little-endian PowerPC (POWER8 and later), they extracted the wrong\nbytes, so a 1-byte write wrote an out-of-bounds byte instead of the\nrequested value.  On big-endian, the native load also caused out_le16()\nand out_le32() to reverse the user's bytes on the wire for 2 and 4 byte\nwrites.  The little-endian helpers resolve both issues, so the shifts\nare removed.\n\nNo changes are needed for the Alpha platform.\n\nThe legacy_io file is root-only and exists only on Alpha and PowerPC,\nthe two architectures that define HAVE_PCI_LEGACY.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-11 20:20:01","updated_at":"2026-09-11 20:20:01"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/7a99e9c7011905734cc2739038f2a224b6be0d1f","name":"https://git.kernel.org/stable/c/7a99e9c7011905734cc2739038f2a224b6be0d1f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/dc76258d0132df1d831a5a29758bd448ca9c566e","name":"https://git.kernel.org/stable/c/dc76258d0132df1d831a5a29758bd448ca9c566e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e892f05f1f790d5721cd8e3c561ed76da7e08bae","name":"https://git.kernel.org/stable/c/e892f05f1f790d5721cd8e3c561ed76da7e08bae","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-89722","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89722","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e892f05f1f790d5721cd8e3c561ed76da7e08bae git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 7a99e9c7011905734cc2739038f2a224b6be0d1f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 dc76258d0132df1d831a5a29758bd448ca9c566e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.50 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.2.4 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.50 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.4 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["arch/powerpc/kernel/pci-common.c","drivers/pci/pci-sysfs.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"e892f05f1f790d5721cd8e3c561ed76da7e08bae","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"7a99e9c7011905734cc2739038f2a224b6be0d1f","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"dc76258d0132df1d831a5a29758bd448ca9c566e","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"6.18.50","status":"affected","version":"0","versionType":"semver"},{"lessThan":"7.2.4","status":"affected","version":"0","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/powerpc/kernel/pci-common.c","drivers/pci/pci-sysfs.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.50","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.50","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()\n\npci_write_legacy_io() loads 4 bytes from the kernfs write buffer\nregardless of how many bytes userspace wrote:\n\n  if (count != 1 && count != 2 && count != 4)\n          return -EINVAL;\n\n  return pci_legacy_write(bus, off, *(u32 *)buf, count);\n\nkernfs_fop_write_iter() allocates the buffer with kmalloc(len + 1),\nso a 1-byte write to the legacy_io sysfs file allocates 2 bytes and\nthe unconditional u32 load reads up to 2 bytes past the end of the\nallocation, which KASAN reports as a slab-out-of-bounds read.\nSimilarly, a 2-byte write overreads by 1 byte.\n\nThus, read only the number of bytes requested using get_unaligned_le16()\nand get_unaligned_le32() for the 2 and 4 byte cases, interpreting the\nbuffer as little-endian to match the byte ordering of PCI I/O port\nspace.\n\nThe PowerPC implementation previously compensated for the generic\ncode's native-endian 32-bit load by shifting the value into place\nfor the 1 and 2 byte cases.  The shifts were only correct on\nbig-endian kernels.\n\nOn little-endian PowerPC (POWER8 and later), they extracted the wrong\nbytes, so a 1-byte write wrote an out-of-bounds byte instead of the\nrequested value.  On big-endian, the native load also caused out_le16()\nand out_le32() to reverse the user's bytes on the wire for 2 and 4 byte\nwrites.  The little-endian helpers resolve both issues, so the shifts\nare removed.\n\nNo changes are needed for the Alpha platform.\n\nThe legacy_io file is root-only and exists only on Alpha and PowerPC,\nthe two architectures that define HAVE_PCI_LEGACY."}],"providerMetadata":{"dateUpdated":"2026-09-11T19:46:34.427Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/e892f05f1f790d5721cd8e3c561ed76da7e08bae"},{"url":"https://git.kernel.org/stable/c/7a99e9c7011905734cc2739038f2a224b6be0d1f"},{"url":"https://git.kernel.org/stable/c/dc76258d0132df1d831a5a29758bd448ca9c566e"}],"title":"PCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-89722","datePublished":"2026-09-11T19:46:34.427Z","dateReserved":"2026-09-11T19:38:34.759Z","dateUpdated":"2026-09-11T19:46:34.427Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-11 20:20:01","lastModifiedDate":"2026-09-11 20:20:01","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"89722","Ordinal":"1","Title":"PCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()","CVE":"CVE-2026-89722","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"89722","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()\n\npci_write_legacy_io() loads 4 bytes from the kernfs write buffer\nregardless of how many bytes userspace wrote:\n\n  if (count != 1 && count != 2 && count != 4)\n          return -EINVAL;\n\n  return pci_legacy_write(bus, off, *(u32 *)buf, count);\n\nkernfs_fop_write_iter() allocates the buffer with kmalloc(len + 1),\nso a 1-byte write to the legacy_io sysfs file allocates 2 bytes and\nthe unconditional u32 load reads up to 2 bytes past the end of the\nallocation, which KASAN reports as a slab-out-of-bounds read.\nSimilarly, a 2-byte write overreads by 1 byte.\n\nThus, read only the number of bytes requested using get_unaligned_le16()\nand get_unaligned_le32() for the 2 and 4 byte cases, interpreting the\nbuffer as little-endian to match the byte ordering of PCI I/O port\nspace.\n\nThe PowerPC implementation previously compensated for the generic\ncode's native-endian 32-bit load by shifting the value into place\nfor the 1 and 2 byte cases.  The shifts were only correct on\nbig-endian kernels.\n\nOn little-endian PowerPC (POWER8 and later), they extracted the wrong\nbytes, so a 1-byte write wrote an out-of-bounds byte instead of the\nrequested value.  On big-endian, the native load also caused out_le16()\nand out_le32() to reverse the user's bytes on the wire for 2 and 4 byte\nwrites.  The little-endian helpers resolve both issues, so the shifts\nare removed.\n\nNo changes are needed for the Alpha platform.\n\nThe legacy_io file is root-only and exists only on Alpha and PowerPC,\nthe two architectures that define HAVE_PCI_LEGACY.","Type":"Description","Title":"PCI/sysfs: Fix out-of-bounds read in pci_write_legacy_io()"}]}}}