regmap: Fix race condition in hwspinlock irqsave routine
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8698b9364710e7bac84b3af07dd410e39c8c2e08 · < c2d2cf710dc3ee1a69e00b4ed8de607a92a07889| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
regmap: Fix race condition in hwspinlock irqsave routine
Previously, the address of the shared member '&map->spinlock_flags' was passed directly to 'hwspin_lock_timeout_irqsave'. This creates a race condition where multiple contexts contending for the lock could overwrite the shared flags variable, potentially corrupting the state for the current lock owner.
Fix this by using a local stack variable 'flags' to store the IRQ state temporarily.
From the CVE record · Linux
The Linux kernel’s regmap hwspinlock irqsave routine uses a shared variable to store IRQ flags. When multiple contexts contend for the lock, they can overwrite that variable and potentially corrupt the current lock owner’s IRQ state. The input does not specify attacker access or user-interaction requirements.
Engineers running Linux kernels should check their exposure; affected versions are not specified.