🇰🇷 한글 설명
Linux 커널의 hi311x CAN 드라이버에서 네트워크 인터페이스가 활성화되기 전에 절전 모드에서 복귀할 경우 Null 포인터 역참조가 발생하는 취약점입니다. 이 문제는 워크큐(workqueue)가 초기화되기 전에 호출되어 시스템 충돌을 유발할 수 있습니다.
💡 쉬운 설명
기기가 잠자기 모드에서 깨어날 때, 준비가 덜 된 상태에서 특정 작업을 수행하려다 컴퓨터가 멈추거나 오류가 발생하는 문제입니다. 이를 해결하기 위해 기기가 깨어나기 전 미리 필요한 준비 과정을 완료하도록 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled
This issue is similar to the vulnerability in the `mcp251x` driver,
which was fixed in commit 03c427147b2d ("can: mcp251x: fix resume from
sleep before interface was brought up").
In the `hi311x` driver, when the device resumes from sleep, the driver
schedules `priv->restart_work`. However, if the network interface was
not previously enabled, the `priv->wq` (workqueue) is not allocated and
initialized, leading to a null pointer dereference.
To fix this, we move the allocation and initialization of the workqueue
from the `hi3110_open` function to the `hi3110_can_probe` function.
This ensures that the workqueue is properly initialized before it is
used during device resume. And added logic to destroy the workqueue
in the error handling paths of `hi3110_can_probe` and in the
`hi3110_can_remove` function to prevent resource leaks.
📍 영향받는 시스템
hi311x 드라이버를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
로컬 공격자가 시스템의 절전 모드 진입 및 복귀를 유도하여 커널 패닉(Kernel Panic)을 일으킬 수 있음
🛡️ 대응 방법
hi311x 드라이버의 수정 사항이 반영된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인