CVE-2026-90315: PCI/sysfs: Add lockdown checks to legacy I/O and memory handlers
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
PCI/sysfs: Add lockdown checks to legacy I/O and memory handlers
Currently, the legacy I/O and memory sysfs handlers do not check security_locked_down(LOCKDOWN_PCI_ACCESS), leaving the legacy_io and legacy_mem files unprotected when the kernel is locked down.
Commit eb627e17727e ("PCI: Lock down BAR access when the kernel is locked down") added the check to pci_write_config(), pci_mmap_resource(), and pci_write_resource_io() to prevent userspace from programming DMA-capable hardware that could be used to modify kernel code, but did not cover the legacy handlers.
As a result, root can still write arbitrary I/O ports and map the legacy I/O and memory spaces while the kernel is locked down, which is the same capability the lockdown is meant to remove.
Add the same check to pci_write_legacy_io(), pci_mmap_legacy_mem(), and pci_mmap_legacy_io().
These generic handlers cover both architectures that define HAVE_PCI_LEGACY (such as Alpha and PowerPC).
[bhelgaas: add Link]
The Linux kernel CVE team has assigned CVE-2026-90315 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.4 with commit eb627e17727ebeede70697ae1798688b0d328b54 and fixed in 7.2.6 with commit cd07aef510ac6a2873e01f9ddddc5492490b0067 Issue introduced in 5.4 with commit eb627e17727ebeede70697ae1798688b0d328b54 and fixed in 7.3-rc1 with commit 747b9bbbbdfdee51aee2456388f9b94b5086de4d
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-90315
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/pci/pci-sysfs.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/cd07aef510ac6a2873e01f9ddddc5492490b0067 https://git.kernel.org/stable/c/747b9bbbbdfdee51aee2456388f9b94b5086de4d