🇰🇷 한글 설명
Linux 커널의 media: ivsc 드라이버에서 ACE 및 CSI 드라이버의 remove() 함수 호출 시 mei_cldev_disable()이 누락되어 발생하는 취약점입니다. 이로 인해 메모리가 해제된 후에도 mei_cl 클라이언트가 파일 리스트에 남아 있어, 시스템 종료 시 Use-After-Free(UAF) 오류와 커널 크래시를 유발합니다.
💡 쉬운 설명
컴퓨터를 끌 때 특정 장치 정보가 메모리에서 완전히 삭제되지 않고 남아 있어, 이미 사라진 정보를 다시 읽으려다 시스템이 멈추거나 오류가 발생하는 문제입니다. 이는 시스템 종료 과정에서 발생하는 메모리 관리 실수입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: ivsc: Fix crash at shutdown due to missing mei_cldev_disable() calls
Both the ACE and CSI driver are missing a mei_cldev_disable() call in
their remove() function.
This causes the mei_cl client to stay part of the mei_device->file_list
list even though its memory is freed by mei_cl_bus_dev_release() calling
kfree(cldev->cl).
This leads to a use-after-free when mei_vsc_remove() runs mei_stop()
which first removes all mei bus devices calling mei_ace_remove() and
mei_csi_remove() followed by mei_cl_bus_dev_release() and then calls
mei_cl_all_disconnect() which walks over mei_device->file_list dereferecing
the just freed cldev->cl.
And mei_vsc_remove() it self is run at shutdown because of the
platform_device_unregister(tp->pdev) in vsc_tp_shutdown()
When building a kernel with KASAN this leads to the following KASAN report:
[ 106.634504] ==================================================================
[ 106.634623] BUG: KASAN: slab-use-after-free in mei_cl_set_disconnected (drivers/misc/mei/client.c:783) mei
[ 106.634683] Read of size 4 at addr ffff88819cb62018 by task systemd-shutdow/1
[ 106.634729]
[ 106.634767] Tainted: [E]=UNSIGNED_MODULE
[ 106.634770] Hardware name: Dell Inc. XPS 16 9640/09CK4V, BIOS 1.12.0 02/10/2025
[ 106.634773] Call Trace:
[ 106.634777] <TASK>
...
[ 106.634871] kasan_report (mm/kasan/report.c:221 mm/kasan/report.c:636)
[ 106.634901] mei_cl_set_disconnected (drivers/misc/mei/client.c:783) mei
[ 106.634921] mei_cl_all_disconnect (drivers/misc/mei/client.c:2165 (discriminator 4)) mei
[ 106.634941] mei_reset (drivers/misc/mei/init.c:163) mei
...
[ 106.635042] mei_stop (drivers/misc/mei/init.c:348) mei
[ 106.635062] mei_vsc_remove (drivers/misc/mei/mei_dev.h:784 drivers/misc/mei/platform-vsc.c:393) mei_vsc
[ 106.635066] platform_remove (drivers/base/platform.c:1424)
Add the missing mei_cldev_disable() calls so that the mei_cl gets removed
from mei_device->file_list before it is freed to fix this.
📍 영향받는 시스템
Linux Kernel (media: ivsc 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
시스템 종료(Shutdown) 과정에서 발생하는 로컬 취약점 (직접적인 원격 공격은 어려움)
🛡️ 대응 방법
커널 패치를 통해 ACE 및 CSI 드라이버의 remove() 함수 내에 mei_cldev_disable() 호출을 추가하여 업데이트해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.