CVE-2026-139078: media: rc: Add missing locking for keymap
In the Linux kernel, the following vulnerability has been resolved:
media: rc: Add missing locking for keymap
When the rcmap for an rcdev gets updated, locking is required but is missing in places. A concurrent scancode lookup and a call to rc{register,unregistered}device() could result in a use-after-free; this could happen if IR is decoded during those function calls.
Add lockdep assertions where locks are required.
irfreetable() should only be called for non-TX devices else we will use a spinlock without iniitializing it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Linux kernel rc keymap code, add the missing locking for rc_map updates and concurrent scancode lookups, and add lockdep assertions where locks are required.
- Compensating control
Call ir_free_table() only for non-TX devices to avoid using an uninitialized spinlock.
Event History
Frequently Asked Questions
What conditions are needed to trigger the use-after-free?
A race is required between a scancode lookup and registration or unregistration of an rc_dev, with IR decoding occurring during those device-management calls. The issue arises when the rc_map is updated without the required locking.
Are transmit-only devices affected in the same way?
The fix specifies that ir_free_table() must only be called for non-TX devices. Calling it for TX devices can use an uninitialized spinlock.
How can exposure be reduced before applying the fix?
The provided information identifies the race as involving IR decoding concurrent with rc_dev registration or unregistration. Reducing or avoiding such concurrent operations would reduce exposure, but no specific configuration workaround is provided.