🇰🇷 한글 설명
Linux 커널의 leds: led-class 모듈에서 LED가 완전히 준비되기 전에 leds_list에 추가되는 레이스 컨디션 취약점이 발견되었습니다. 이로 인해 led_classdev.set_brightness_work가 초기화되기 전 호출될 경우 커널 경고 및 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
LED 장치가 작동 준비를 마치기도 전에 시스템 목록에 먼저 등록되어 발생하는 문제입니다. 이로 인해 장치를 제어하려는 명령이 준비되지 않은 기능을 호출하여 시스템에 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
Linux Kernel (lenovo-thinkpad-t14s EC 드라이버 및 snd_ctl_led 모듈 사용 환경)
⚔️ 공격 벡터
특정 하드웨어 드라이버 로드 시 발생하는 레이스 컨디션을 이용한 로컬 시스템 불안정 유도
🛡️ 대응 방법
LED가 leds_list에 추가되는 시점을 led_init_core() 호출 이후로 변경한 최신 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.