gpio: pca953x: fix pca953x_irq_bus_sync_unlock regmap lock
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bfc6444b57dc7186b6acc964705d7516cbaf3904 · < 9dc325327babe7f159e84cbe9380a45342da0585| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gpio: pca953x: fix pca953x_irq_bus_sync_unlock regmap lock
Locking is disabled in the regmap config as this driver uses its own lock. This means that all calls to regmap functions (read or write) must hold the i2c_lock. The function pca953x_irq_bus_sync_unlock() did not do this, and it was therefore possible that multiple threads could cause an incorrect register to be read/written.
A previous patch partly fixed this, but only protected the write to the interrupt mask register, and not the read from the direction register.
From the CVE record · Linux
The Linux kernel's pca953x GPIO driver does not hold its i2c_lock for every register access in pca953x_irq_bus_sync_unlock(). Concurrent threads can therefore cause an incorrect register to be read or written. The input does not specify whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running Linux kernels with the pca953x GPIO driver should check their kernel versions against the vendor advisory; affected versions are not specified in the input.