4.7medium
leds: led-class: Only Add LED to leds_list when it is fully ready
- Severity
- 4.7medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.11% (higher than 1% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: leds: led-class: Only Add LED to leds_list when it is fully ready Before this change the LED was added to leds_list before led_init_core() gets called adding it the list before led_classdev.set_brightness_work gets initialized. This leaves a window where led_trigger_register() of a LED's default trigger will call led_trigger_set() which calls led_set_brightness() which in turn will end up queueing the *uninitialized* led_classdev.set_brightness_work. This race gets hit by the lenovo-thinkpad-t14s EC driver which registers 2 LEDs with a default trigger provided by snd_ctl_led.ko in quick succession. The first led_classdev_register() causes an async modprobe of snd_ctl_led to run and that async modprobe manages to exactly hit the window where the second LED is on the leds_list without led_init_core() being called for it, resulting in: ------------[ cut here ]------------ WARNING: CPU: 11 PID: 5608 at kernel/workqueue.c:4234 __flush_work+0x344/0x390 Hardware name: LENOVO 21N2S01F0B/21N2S01F0B, BIOS N42ET93W (2.23 ) 09/01/2025 ... Call trace: __flush_work+0x344/0x390 (P) flush_work+0x2c/0x50 led_trigger_set+0x1c8/0x340 led_trigger_register+0x17c/0x1c0 led_trigger_register_simple+0x84/0xe8 snd_ctl_led_init+0x40/0xf88 [snd_ctl_led] do_one_initcall+0x5c/0x318 do_init_module+0x9c/0x2b8 load_module+0x7e0/0x998 Close the race window by moving the adding of the LED to leds_list to after the led_init_core() call.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from d23a22a74fded23a12434c9463fe66cec2b0afcd before f7a6df659af777058833802c29b3b7974db5e78a, from d23a22a74fded23a12434c9463fe66cec2b0afcd before d117fdcb21b05c0e0460261d017b92303cd9ba77, from d23a22a74fded23a12434c9463fe66cec2b0afcd before e90c861411fc84629a240384b0a72830539d3386, from d23a22a74fded23a12434c9463fe66cec2b0afcd before 2757f7748ce2d0fa44112024907bafb37e104d6e, from d23a22a74fded23a12434c9463fe66cec2b0afcd before da565bf98c9ad0eabcb09fc97859e0b52f98b7c3, from d23a22a74fded23a12434c9463fe66cec2b0afcd before 78822628165f3d817382f67f91129161159ca234, from d23a22a74fded23a12434c9463fe66cec2b0afcd before d1883cefd31752f0504b94c3bcfa1f6d511d6e87, 3.7 Not affected: before 3.7, from 5.10.249 up to 5.10.*, from 5.15.199 up to 5.15.*, from 6.1.162 up to 6.1.*, from 6.6.122 up to 6.6.*, from 6.12.68 up to 6.12.* | CVE List |
| linux linux_kernel | from 3.7 before 5.10.249, from 5.11 before 5.15.199, from 5.16 before 6.1.162, from 6.2 before 6.6.122, from 6.7 before 6.12.68, from 6.13 before 6.18.8, 6.19 | NVD |
Classification
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: leds: led-class: Only Add LED to leds_list when it is fully ready Before this change the LED was added to leds_list before led_init_core() gets called adding it the list before led_classdev.set_brightness_work gets initialized. This leaves a window where led_trigger_register() of a LED's default trigger will call led_trigger_set() which calls led_set_brightness() which in turn will end up queueing the *uninitialized* led_classdev.set_brightness_work. This race gets hit by the lenovo-thinkpad-t14s EC driver which registers 2 LEDs with a default trigger provided by snd_ctl_led.ko in quick succession. The first led_classdev_register() causes an async modprobe of snd_ctl_led to run and that async modprobe manages to exactly hit the window where the second LED is on the leds_list without led_init_core() being called for it, resulting in: ------------[ cut here ]------------ WARNING: CPU: 11 PID: 5608 at kernel/workqueue.c:4234 __flush_work+0x344/0x390 Hardware name: LENOVO 21N2S01F0B/21N2S01F0B, BIOS N42ET93W (2.23 ) 09/01/2025 ... Call trace: __flush_work+0x344/0x390 (P) flush_work+0x2c/0x50 led_trigger_set+0x1c8/0x340 led_trigger_register+0x17c/0x1c0 led_trigger_register_simple+0x84/0xe8 snd_ctl_led_init+0x40/0xf88 [snd_ctl_led] do_one_initcall+0x5c/0x318 do_init_module+0x9c/0x2b8 load_module+0x7e0/0x998 Close the race window by moving the adding of the LED to leds_list to after the led_init_core() call.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: leds: led-class: Solo añadir el LED a leds_list cuando esté completamente listo Antes de este cambio, el LED se añadía a leds_list antes de que se llamara a led_init_core(), añadiéndolo a la lista antes de que se inicializara led_classdev.set_brightness_work. Esto deja una ventana donde led_trigger_register() del disparador predeterminado de un LED llamará a led_trigger_set(), que llama a led_set_brightness(), lo que a su vez terminará encolando el led_classdev.set_brightness_work *no inicializado*. Esta condición de carrera es activada por el controlador EC de lenovo-thinkpad-t14s, que registra 2 LEDs con un disparador predeterminado proporcionado por snd_ctl_led.ko en rápida sucesión. La primera llamada a led_classdev_register() provoca la ejecución de un modprobe asíncrono de snd_ctl_led y ese modprobe asíncrono logra alcanzar exactamente la ventana donde el segundo LED está en leds_list sin que se haya llamado a led_init_core() para él, resultando en: ------------[ cut here ]------------ ADVERTENCIA: CPU: 11 PID: 5608 at kernel/workqueue.c:4234 __flush_work+0x344/0x390 Hardware name: LENOVO 21N2S01F0B/21N2S01F0B, BIOS N42ET93W (2.23 ) 09/01/2025 ... Rastreo de llamadas: __flush_work+0x344/0x390 (P) flush_work+0x2c/0x50 led_trigger_set+0x1c8/0x340 led_trigger_register+0x17c/0x1c0 led_trigger_register_simple+0x84/0xe8 snd_ctl_led_init+0x40/0xf88 [snd_ctl_led] do_one_initcall+0x5c/0x318 do_init_module+0x9c/0x2b8 load_module+0x7e0/0x998 Cerrar la ventana de la condición de carrera moviendo la adición del LED a leds_list a después de la llamada a led_init_core().
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23101 changed 2026-10-19 | CVE Terms of Use |
| NVD | CVE-2026-23101 changed 2026-10-19 | Public domain |