🇰🇷 한글 설명
Linux 커널의 ch9200 네트워크 드라이버에서 mii_nway_restart() 호출 시 ch9200_mdio_read()가 control_read()의 반환값을 확인하지 않아, 읽기 실패 시 초기화되지 않은 버퍼(buff)를 사용하는 문제입니다. 이로 인해 미초기화 메모리 접근이 발생할 수 있으며, 반환값을 검사하고 오류 시 조기 반환하도록 수정되었습니다.
💡 쉬운 설명
USB 이더넷 장치 드라이버가 장치 읽기에 실패했는데도 빈 메모리 값을 그대로 사용하는 실수가 있었습니다. 이 문제는 오류를 확인하고 즉시 중단하도록 고쳐졌습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: ch9200: fix uninitialised access during mii_nway_restart
In mii_nway_restart() the code attempts to call
mii->mdio_read which is ch9200_mdio_read(). ch9200_mdio_read()
utilises a local buffer called "buff", which is initialised
with control_read(). However "buff" is conditionally
initialised inside control_read():
if (err == size) {
memcpy(data, buf, size);
}
If the condition of "err == size" is not met, then
"buff" remains uninitialised. Once this happens the
uninitialised "buff" is accessed and returned during
ch9200_mdio_read():
return (buff[0] | buff[1] << 8);
The problem stems from the fact that ch9200_mdio_read()
ignores the return value of control_read(), leading to
uinit-access of "buff".
To fix this we should check the return value of
control_read() and return early on error.
📍 영향받는 시스템
ch9200 USB 이더넷 드라이버를 포함한 수정 이전의 Linux 커널 버전 (CH9200 칩셋 사용 장치)
⚔️ 공격 벡터
로컬 또는 물리적으로 연결된 악성 USB 장치가 제어 읽기 응답을 조작·실패시켜 미초기화 메모리 값을 유도할 수 있음
🛡️ 대응 방법
Linux 커널을 해당 취약점이 수정된 최신 안정 버전으로 업데이트하거나 배포판 보안 패치를 적용
🔧 검증 코드
커널 버전이 패치된 버전 이상이면 안전하며, ch9200 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -i ch9200 || echo 'ch9200 module not loaded')