spi: fix statistics allocation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6598b91b5ac32bc756d7c3000a31f775d4ead1c4 · < dee0774bbb2abb172e9069ce5ffef579b12b3ae9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: fix statistics allocation
The controller per-cpu statistics is not allocated until after the controller has been registered with driver core, which leaves a window where accessing the sysfs attributes can trigger a NULL-pointer dereference.
Fix this by moving the statistics allocation to controller allocation while tying its lifetime to that of the controller (rather than using implicit devres).
From the CVE record · Linux
The Linux kernel registers an SPI controller before allocating its per-CPU statistics, leaving a window in which the statistics pointer is null. A local user who can access the controller's sysfs attributes during that window can trigger a NULL-pointer dereference.
Engineers running Linux kernels with the affected SPI controller code should check their kernel's status; affected versions are not specified.