CVE-2026-46202: HID: appletb-kbd: run inactivity autodim from workqueues
In the Linux kernel, the following vulnerability has been resolved:
HID: appletb-kbd: run inactivity autodim from workqueues
The autodim code in hid-appletb-kbd takes backlightdevice->opslock via backlightdevicesetbrightness() -> mutexlock() from two different atomic contexts:
appletbinactivitytimer() is a struct timerlist callback, so it runs in softirq context. Every expiry triggers
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:591 Call Trace: <IRQ> mightresched mutexlock backlightdevicesetbrightness appletbinactivitytimer calltimerfn runtimersoftirq
resetinactivitytimer() is called from appletbkbdhidevent() and appletbkbdinpevent(). On real USB hardware these run in softirq/IRQ context (URB completion and input-event dispatch). When the Touch Bar has already been dimmed or turned off, the reset path calls backlightdevicesetbrightness() directly to restore brightness, producing the same warning.
Both call sites hit the same mutexlock()-from-atomic bug. Fix them together by moving the blocking work onto the system workqueue:
Convert the inactivity timer from struct timerlist to struct delayedwork; the callback (appletbinactivitywork) now runs in process context where mutexlock() is legal. Add a dedicated struct workstruct restorebrightnesswork and have resetinactivitytimer() schedule it instead of calling backlightdevicesetbrightness() directly.
Cancel both works synchronously during driver tear-down alongside the existing backlight reference drop.
The semantics are unchanged (same delays, same state transitions on dim, turn-off and user activity); only the execution context of the sleeping call changes. The timer field and callback are renamed to match their new type; resetinactivitytimer() keeps its name because it is invoked from input event paths that read naturally as "reset the inactivity timer".
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Operational
Apply the upstream kernel fix for HID appletb-kbd inactivity autodim: convert the inactivity timer from struct timer_list to struct delayed_work so the inactivity callback runs in process context; add a dedicated struct work_struct restore_brightness_work and modify reset_inactivity_timer() to schedule that work instead of calling backlight_device_set_brightness() directly from atomic contexts; cancel both works synchronously during driver teardown alongside the existing backlight reference drop. Rebuild and deploy the updated kernel/module containing these changes.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-46202?
The severity of CVE-2026-46202 is rated at 4.
How do I fix CVE-2026-46202?
The fix for CVE-2026-46202 requires updating to the latest version of the Linux kernel where the vulnerability is resolved.
What systems are affected by CVE-2026-46202?
CVE-2026-46202 affects Linux systems that utilize the HID: appletb-kbd component in the kernel.
What type of vulnerability is CVE-2026-46202?
CVE-2026-46202 is a concurrency flaw due to improper handling of locks in the Linux kernel.
When was CVE-2026-46202 published?
CVE-2026-46202 was published on May 28, 2026.