CVE-2026-97505: PCI/sysfs: Add CAP_SYS_ADMIN check to __resource_resize_store()
In the Linux kernel, the following vulnerability has been resolved:
PCI/sysfs: Add CAPSYSADMIN check to resourceresizestore()
Currently, the resourceresizestore() allows writing to the resourceNresize 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 sysfsupdategroups().
Add a CAPSYSADMIN check to prevent unprivileged users from performing BAR resize operations.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Add a CAP_SYS_ADMIN capability check to __resource_resize_store() so unprivileged users cannot write the resourceN_resize sysfs attribute and resize PCI BARs.
Event History
Frequently Asked Questions
Who can exploit this issue?
An unprivileged user who has file write access to a PCI device's resourceN_resize sysfs attribute can resize the device BAR. The vulnerable path did not require CAP_SYS_ADMIN.
What is the impact of a successful BAR resize?
Resizing a BAR changes PCI device configuration and can disrupt active drivers. It can also trigger resource file updates through sysfs_update_groups() after the referenced static-attribute conversion.
What changes with the fix?
The resourceN_resize sysfs write path now checks for CAP_SYS_ADMIN. Users without that capability should no longer be able to perform BAR resize operations through this attribute.