🇰🇷 한글 설명
리눅스 커널의 k230 핀 컨트롤 드라이버에서 디바이스 트리를 파싱하는 도중 NULL 포인터 역참조로 인한 크래시가 발생합니다. 이는 pctl_dev가 초기화되기 전에 해당 구조체의 디바이스 포인터를 접근함으로써 발생합니다.
💡 쉬운 설명
시스템 초기화 과정에서 필요한 데이터가 준비되기 전에 이를 사용하려고 해 프로그램이 충돌합니다. 이는 하드웨어 설정 정보를 읽는 과정에서 발생하는 버그입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: canaan: k230: Fix NULL pointer dereference when parsing devicetree
When probing the k230 pinctrl driver, the kernel triggers a NULL pointer
dereference. The crash trace showed:
[ 0.732084] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000068
[ 0.740737] ...
[ 0.776296] epc : k230_pinctrl_probe+0x1be/0x4fc
In k230_pinctrl_parse_functions(), we attempt to retrieve the device
pointer via info->pctl_dev->dev, but info->pctl_dev is only initialized
after k230_pinctrl_parse_dt() completes.
At the time of DT parsing, info->pctl_dev is still NULL, leading to
the invalid dereference of info->pctl_dev->dev.
Use the already available device pointer from platform_device
instead of accessing through uninitialized pctl_dev.
📍 영향받는 시스템
Linux kernel k230 pinctrl driver
⚔️ 공격 벡터
로컬 물리적 접근 또는 초기화 단계에서의 디바이스 트리오버레이
🛡️ 대응 방법
리눅스 커널 최신 버전으로 업데이트하여 패치 적용
🔧 검증 코드
출력된 커널 버전이 패치가 적용된 최신 버전인지 확인