CVE-2026-143053: gpiolib: synchronize updates of descriptor labels
In the Linux kernel, the following vulnerability has been resolved:
gpiolib: synchronize updates of descriptor labels
descsetlabel() swaps desc->label with rcureplacepointer() but without any synchronization of concurrent updates. The swap is a plain read + write: two threads can observe the same old label and then call callscru() on the same SRCU head corrupting the state of the chain.
Add a spinlock to struct gpiodevice - we're using a single spinlock for all descriptors as using a per-descriptor lock would unnecessarily bloat the size of the desc array with very little chance and no consequences of contention - and use it to serialize the pointer update.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Add a single spinlock to struct gpio_device and use it to serialize descriptor label pointer updates in desc_set_label().
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
Concurrent updates to GPIO descriptor labels are required. Two threads must race while replacing the same descriptor label, allowing both to act on the same old label and corrupt the SRCU callback chain state.
Which systems are realistically exposed?
Linux kernel systems that use gpiolib and perform concurrent GPIO descriptor label updates are exposed to the described race. The provided information does not identify specific kernel versions, configurations, or affected hardware platforms.
What can be done if an update cannot be applied immediately?
Avoid or serialize concurrent updates to GPIO descriptor labels where operationally possible. The resolved implementation serializes label pointer updates with a spinlock in the GPIO device structure.