🇰🇷 한글 설명
Linux 커널의 slimbus qcom-ngd-ctrl 드라이버에서 NGD 생성 후 콜백을 등록하기 전에 인터럽트나 remoteproc가 실행될 경우 초기화되지 않은 데이터에 접근하는 취약점이 있습니다. 이로 인해 NULL 포인터 참조가 발생하여 시스템 부팅 실패나 커널 경고가 발생할 수 있습니다.
💡 쉬운 설명
장치가 준비되기도 전에 명령이 전달되어 컴퓨터의 핵심 부품이 제대로 작동하지 못하고 멈추는 문제입니다. 시스템이 켜지는 과정에서 데이터가 준비되지 않은 상태로 일을 시키려다 발생하는 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
slimbus: qcom-ngd-ctrl: Register callbacks after creating the ngd
When the remoteproc starts in parallel with the NGD driver being probed,
or the remoteproc is already up when the PDR lookup is being registered,
or in the theoretical event that we get an interrupt from the hardware,
these callbacks will operate on uninitialized data. This result in
issues to boot the affected boards.
One such example can be seen in the following fault, where
qcom_slim_ngd_ssr_pdr_notify() schedules work on the NULL ngd_up_work.
[ 21.858578] ------------[ cut here ]------------
[ 21.858745] WARNING: kernel/workqueue.c:2338 at __queue_work+0x5e0/0x790, CPU#2: kworker/2:2/116
...
[ 21.859251] Call trace:
[ 21.859255] __queue_work+0x5e0/0x790 (P)
[ 21.859265] queue_work_on+0x6c/0xf0
[ 21.859273] qcom_slim_ngd_ssr_pdr_notify+0x110/0x150 [slim_qcom_ngd_ctrl]
[ 21.859304] qcom_slim_ngd_ssr_notify+0x24/0x40 [slim_qcom_ngd_ctrl]
[ 21.859318] notifier_call_chain+0xa4/0x230
[ 21.859329] srcu_notifier_call_chain+0x64/0xb8
[ 21.859338] ssr_notify_start+0x40/0x78 [qcom_common]
[ 21.859355] rproc_start+0x130/0x230
[ 21.859367] rproc_boot+0x3d4/0x518
...
Move the enablement of interrupts, and the registration of SSR and PDR
until after the NGD device has been registered.
This could be further refined by moving initialization to the control
driver probe and by removing the platform driver model from the picture.
📍 영향받는 시스템
Linux kernel (slimbus: qcom-ngd-ctrl 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 시스템의 하드웨어 초기화 과정 중 레이스 컨디션(Race Condition) 유발
🛡️ 대응 방법
NGD 장치 등록이 완료된 후 SSR 및 PDR 등록과 인터럽트 활성화가 이루어지도록 커널 패치 적용
🔧 검증 코드
현재 사용 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.