🇰🇷 한글 설명
리눅스 커널의 USB Type-C UCSI CCG 드라이버에서 펌웨어 이미지 내 ':' 레코드 헤더를 검증하지 않아 발생하는 취약점입니다. ':' 문자가 없는 조작된 펌웨어 파일을 사용하면 커널 포인터 오류로 인해 시스템이 충돌(Kernel Oops)할 수 있습니다.
💡 쉬운 설명
잘못된 형식의 펌웨어 파일을 시스템에 입력하면 컴퓨터의 핵심 부분인 커널이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 공격자가 특수하게 만든 파일을 통해 시스템을 강제로 중단시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: ccg: reject firmware images without a ':' record header
do_flash() locates the first .cyacd record with
p = strnchr(fw->data, fw->size, ':');
while (p < eof) {
s = strnchr(p + 1, eof - p - 1, ':');
...
}
If the firmware image contains no ':' byte, strnchr() returns NULL.
NULL compares less than the valid kernel pointer eof, so the loop body
runs and strnchr() is called with p + 1 == (void *)1 and a length of
roughly (unsigned long)eof, causing a wonderful crash.
The not_signed_fw fallthrough earlier in do_flash() and the chip-state
branches in ccg_fw_update_needed() allow an unsigned blob to reach this
loop, so a root user who can place a crafted file under /lib/firmware
and write the do_flash sysfs attribute can trigger the oops.
Bail out with -EINVAL when the initial strnchr() returns NULL.
📍 영향받는 시스템
Linux kernel (USB Type-C UCSI CCG driver 관련 버전)
⚔️ 공격 벡터
루트 권한을 가진 사용자가 /lib/firmware에 조작된 파일을 배치하고 sysfs 속성을 통해 업데이트를 시도하여 발생
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 펌웨어 헤더 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.