CVE-2026-97505: PCI/sysfs: Add CAP_SYS_ADMIN check to __resource_resize_store()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
PCI/sysfs: Add CAP_SYS_ADMIN check to __resource_resize_store()
Currently, the __resource_resize_store() allows writing to the resourceN_resize sysfs attribute to change a BAR's size without checking for capabilities, currently relying only on the file access check.
Resizing a BAR modifies PCI device configuration and can disrupt active drivers. After the upcoming conversion to static attributes, it will also trigger resource file updates via sysfs_update_groups().
Add a CAP_SYS_ADMIN check to prevent unprivileged users from performing BAR resize operations.
The Linux kernel CVE team has assigned CVE-2026-97505 to this issue.
Affected and fixed versions
===========================
Fixed in 6.12.111 with commit b722a607f858b9cd036075ea0efad553fb98e982 Fixed in 6.18.53 with commit cbf0628c0b7db86c5ce36451f088101546acbf1d Fixed in 7.2 with commit 25ec7f57deceec633f27bc93b615f951e2ade814
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-97505
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/b722a607f858b9cd036075ea0efad553fb98e982 https://git.kernel.org/stable/c/cbf0628c0b7db86c5ce36451f088101546acbf1d https://git.kernel.org/stable/c/25ec7f57deceec633f27bc93b615f951e2ade814