spi: uniphier: Fix completion initialization order before devm_request_irq()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5ba155a4d4cc8e4cdd3db6df7d03271a3bd91177 · < d44b828eb551bd59ba9f22457825cc3db3a39fc1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: uniphier: Fix completion initialization order before devm_request_irq()
The driver calls devm_request_irq() before initializing the completion used by the interrupt handler. Because the interrupt may occur immediately after devm_request_irq(), the handler may execute before init_completion().
This may result in calling complete() on an uninitialized completion, causing undefined behavior. This has been observed with KASAN.
Fix this by initializing the completion before registering the IRQ.
From the CVE record · Linux
The UniPhier SPI driver registers an interrupt handler before initializing the completion it uses. If an interrupt occurs immediately after registration, the handler may use the uninitialized completion, causing undefined behavior. The input does not identify an attacker path or specify authentication or user-interaction requirements.
Engineers running Linux kernels with the UniPhier SPI driver should check whether their kernel includes the fix; affected versions are not specified.