🇰🇷 한글 설명
Linux 커널의 usb gadget f_ncm 드라이버에서 ndp_index 변수가 부호 있는 정수(signed int)로 선언되어 발생하는 취약점입니다. 악의적인 호스트가 큰 오프셋 값을 전달하면 ndp_index가 음수로 오버플로우되어 경계 검사를 우회하고, 결과적으로 메모리 범위 외 읽기(out-of-bounds read)를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 숫자를 계산할 때 실수로 음수 값을 처리하게 만들어, 허용되지 않은 메모리 영역을 몰래 읽을 수 있는 보안 약점입니다. 공격자가 특수한 값을 보내면 시스템의 중요한 정보를 훔쳐볼 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_ncm: Use unsigned int for ndp_index
The variable ndp_index is declared as a signed integer, but it stores
the return value of get_ncm(), which is unsigned.
A malicious host can supply a large offset that overflows the signed
ndp_index, making it negative. Because ndp_index is compared against
unsigned bounds, this negative value bypasses sanity checks and leads
to an out-of-bounds read when calculating the address of the NDP
block (ntb_ptr + ndp_index).
Fix this by changing ndp_index to unsigned int to ensure consistent
unsigned comparisons throughout the function.
📍 영향받는 시스템
Linux kernel (usb gadget f_ncm 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
악의적인 USB 호스트 장치를 통해 조작된 대규모 오프셋 값을 전달하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ndp_index를 unsigned int로 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인