firmware_loader: do not queue completed sysfs fallback requests
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel c8b97c5130f27b64fa2cfe1aa4bebb13f724c6c7, Kernel 5.10.270, Kernel 5.14 and 15 more.
In the Linux kernel, the following vulnerability has been resolved: firmware_loader: do not queue completed sysfs fallback requests fw_load_sysfs_fallback() calls device_add() before adding the fw_priv to pending_fw_head. device_add() publishes the fallback loading interface, so a userspace helper which discovers the device by scanning sysfs can write 0 to the loading attribute and complete the request before it is queued as pending. In that interleaving firmware_loading_store() calls fw_state_done() while pending_list still points to itself, so it cannot remove an entry from pending_fw_head. The subsequent unconditional list_add() then queues an already-completed fw_priv. Once the request is released, pending_fw_head can retain a pointer to freed memory and the next fallback request can fault while validating the list. Only in-flight fallback requests need suspend or reboot abort handling. If the request is already DONE after device_add(), return success from the fallback path without sending another uevent, waiting again, or queueing it as pending. This preserves the invariant that pending_fw_head contains only active fallback requests.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=ecb739cf15a9bae040ce6b60209b78b92512d120 <c8b97c5130f27b64fa2cfe1aa4bebb13f724c6c7, >=5.10.58 <5.10.270, >=5.13.10 <5.14, >=5.4.140 <5.5, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <5a250bff75a446374c05622973b18b4ab662b504, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <6eaa632d0ed7bbb84f9cb670e5ec4e2cecf4cc7b, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <85aeb8fc61839098ae0942ccba86e669c08e75d4, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <93a2385730540105df8524447dcc11309ad280f9, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <b48373c901951fad1a26bd7c33ad91172b3945b5, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <ea33fac0df7fe7b49a4b27acb83e227b82317d1d, >=75d95e2e39b27f733f21e6668af1c9893a97de5e <fb4824880b0dba0e7b3a497c46c642f979630392, =5.14, =67cf0fbcac0d42d4d4686cddc1e39f465bbfec37, =c14a54675db7131791402fa22fb0fa6da1f5fb66, =d09639528b66b5c7c20dc8f7fb8928aacabd40bb, >=4.19.203 <4.20 | c8b97c5130f27b64fa2cfe1aa4bebb13f724c6c7, 5.10.270, 5.14, 5.5, 5a250bff75a446374c05622973b18b4ab662b504, 6eaa632d0ed7bbb84f9cb670e5ec4e2cecf4cc7b, 85aeb8fc61839098ae0942ccba86e669c08e75d4, 93a2385730540105df8524447dcc11309ad280f9, b48373c901951fad1a26bd7c33ad91172b3945b5, ea33fac0df7fe7b49a4b27acb83e227b82317d1d, fb4824880b0dba0e7b3a497c46c642f979630392, 4.20 |
| linux-kernel: Kernel | >=5.10.58 <5.10.270, >=5.13.10 <5.14, >=5.14.0 <5.15.221, >=5.16.0 <6.1.188, >=5.4.140 <5.5, >=6.13.0 <6.18.52, >=6.19.0 <7.2.6, >=6.2.0 <6.6.157, >=6.7.0 <6.12.110, >=4.19.203 <4.20 | 5.10.270, 5.14, 5.15.221, 6.1.188, 5.5, 6.18.52, 7.2.6, 6.6.157, 6.12.110, 4.20 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket