iio: light: opt3001: fix deadlock due to concurrent flag access
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 94a9b7b1809f56cfaa080e70ec49b6979563a237 · < 7ca84f6a22d50bf8b31efe9eb05f9859947266d7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: light: opt3001: fix deadlock due to concurrent flag access
The threaded IRQ function in this driver is reading the flag twice: once to lock a mutex and once to unlock it. Even though the code setting the flag is designed to prevent it, there are subtle cases where the flag could be true at the mutex_lock stage and false at the mutex_unlock stage. This results in the mutex not being unlocked, resulting in a deadlock.
Fix it by making the opt3001_irq() code generally more robust, reading the flag into a variable and using the variable value at both stages.
From the CVE record · Linux
The Linux kernel’s opt3001 light sensor driver can deadlock when its threaded interrupt handler reads a changing flag while locking and unlocking a mutex. The input does not establish whether an attacker can trigger this condition or specify access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the opt3001 light sensor driver should check their versions; affected versions were not provided.