CVE-2026-46202

Source
https://cve.org/CVERecord?id=CVE-2026-46202
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-46202.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-46202
Downstream
Related
Published
2026-05-28T09:40:18.687Z
Modified
2026-07-11T03:54:56.683180421Z
Summary
HID: appletb-kbd: run inactivity autodim from workqueues
Details

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 timer_list 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> __might_resched __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 backlightdeviceset_brightness() directly to restore brightness, producing the same warning.

Both call sites hit the same mutex_lock()-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 mutex_lock() 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".

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46202.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
93a0fc48948107e0cc34e1de22c3cb363a8f2783
Fixed
5c0830323689ef15224f0025276176988861b3b0
Fixed
2473a334c292af257ef68e33bc7760f4a8251812
Fixed
1654e53349d4e657b331de354313461f401f5063

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-46202.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.15.0
Fixed
6.18.32
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.0.9

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-46202.json"