🇰🇷 한글 설명
Linux 커널의 ASoC SDCA 드라이버에서 NULL 포인터 역참조 취약점이 발견되었습니다. 함수 등록 과정이 중간에 실패하거나 장치 정리 과정에서 경합이 발생할 경우, NULL 상태인 함수 디스크립터를 참조하여 커널 오류(Kernel Oops)가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 소리 관련 장치를 정리하는 과정에서, 존재하지 않는 정보를 참조하려고 시도하여 시스템이 갑자기 멈추거나 오류가 발생하는 문제입니다. 특정 하드웨어 설정이 제대로 완료되지 않았을 때 시스템이 충돌할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ASoC: SDCA: fix NULL pointer dereference in sdca_dev_unregister_functions
sdca_dev_unregister_functions() iterates over all SDCA function
descriptors and calls sdca_dev_unregister() on each func_dev without
checking for NULL. When a function registration has failed partway
through, or the device cleanup races with probe deferral, func_dev
entries may be NULL, leading to a kernel oops:
BUG: kernel NULL pointer dereference, address: 0000000000000040
RIP: 0010:device_del+0x1e/0x3e0
Call Trace:
sdca_dev_unregister_functions+0x37/0x60 [snd_soc_sdca]
release_nodes+0x35/0xb0
devres_release_all+0x90/0x100
device_unbind_cleanup+0xe/0x80
device_release_driver_internal+0x1c1/0x200
bus_remove_device+0xc6/0x130
device_del+0x161/0x3e0
device_unregister+0x17/0x60
sdw_delete_slave+0xb6/0xd0 [soundwire_bus]
sdw_bus_master_delete+0x1e/0x50 [soundwire_bus]
...
sof_probe_work+0x19/0x30 [snd_sof]
This was observed on a Lenovo ThinkPad X1 Carbon G14 (Panther Lake)
with the SOF audio driver probe failing due to missing Panther Lake
firmware, causing the subsequent cleanup of SoundWire devices to
trigger the crash.
Fix this with three changes:
1) Add a NULL guard in sdca_dev_unregister() so that callers do not
need to pre-validate the pointer (defense in depth).
2) In sdca_dev_unregister_functions(), skip NULL func_dev entries
and clear func_dev to NULL after unregistration, making the
function idempotent and safe against double-invocation.
3) In sdca_dev_register_functions(), roll back all previously
registered functions when a later one fails, so the function
array is never left in a partially-populated state.
📍 영향받는 시스템
Linux Kernel (ASoC SDCA driver component)
⚔️ 공격 벡터
로컬 환경에서 장치 드라이버 프로브 실패 또는 특정 하드웨어 구성 시 발생하는 경합 조건 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 NULL 가드 및 등록 롤백 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.