PCI/sysfs: Add CAP_SYS_ADMIN check to __resource_resize_store()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's PCI sysfs resourceN_resize attribute allows BAR resizing without a CAP_SYS_ADMIN check, relying only on file access permissions. A local user who can write to the attribute could resize a BAR without that capability, potentially disrupting active drivers; no additional user interaction is described.
Administrators running Linux kernels that allow writes to resourceN_resize without a CAP_SYS_ADMIN check should check their systems; affected versions are not specified.