🇰🇷 한글 설명
Linux 커널의 Qualcomm SCM 드라이버에서 __scm 객체가 완전히 공개되기 전에 인터럽트 핸들러가 호출되어 NULL 포인터 역참조가 발생하는 취약점입니다. 이로 인해 시스템 충돌이나 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 부품인 커널이 준비가 채 끝나기도 전에 특정 명령을 처리하려다 길을 잃어 시스템이 멈추는 문제입니다. 장치가 완전히 켜지기 전에 작동을 시도할 때 발생하는 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
firmware: qcom: scm: Fix NULL dereference in IRQ handler before __scm is published
In qcom_scm_probe(), devm_request_threaded_irq() is called before
smp_store_release(&__scm, scm). Two paths can dereference __scm before
it is published, both causing a NULL pointer dereference.
The IRQ handler receives scm via its data argument but passes only wq_ctx
to qcom_scm_waitq_wakeup() and qcom_scm_get_completion(), which then
dereference __scm directly. Thread scm through both functions so the IRQ
handler path never touches __scm.
Non-atomic SMC calls made during probe (e.g. from qcom_tzmem_init via
qcom_scm_shm_bridge_enable) can return WAITQ_SLEEP, causing
qcom_scm_wait_for_wq_completion() to run before __scm is published and
dereference it. Add platform_set_drvdata(pdev, scm) early in probe and
change qcom_scm_wait_for_wq_completion() to take the device pointer and
use dev_get_drvdata() to reach scm, removing any dependency on __scm.
📍 영향받는 시스템
Qualcomm SCM 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 시스템에서 특정 하드웨어 초기화 과정 중 비원자적 SMC 호출을 유도하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인