🇰🇷 한글 설명
Linux 커널의 ALSA usbusx2y 드라이버에서 in04_last 배열 크기와 in04_buf 할당 크기가 일치하지 않는 취약점이 발견되었습니다. 초기화 과정에서 21바이트 크기의 버퍼로부터 24바이트를 복사하면서, 소스 객체의 범위를 3바이트 초과하여 읽는 메모리 정보 유출 문제가 발생할 수 있습니다.
💡 쉬운 설명
데이터를 담는 그릇의 크기가 서로 맞지 않아, 정해진 범위를 넘어서는 데이터를 읽어오는 오류가 있습니다. 이로 인해 시스템의 민감한 정보가 의도치 않게 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usbusx2y: fix in04_last array size mismatch with in04_buf
The in04_last array in struct usx2ydev is declared as char[24], but
in04_buf is allocated as sizeof(struct us428_ctls) which is 21 bytes.
In i_usx2y_in04_int(), when ctl_snapshot_last == -2 (initialization
path):
memcpy(usx2y->in04_last, usx2y->in04_buf, sizeof(usx2y->in04_last));
This copies 24 bytes from a 21-byte slab allocation, reading 3 bytes
past the end of the source object.
Introduce a USX2Y_IN04_SIZE constant defined as sizeof(struct
us428_ctls) and use it consistently for the in04_last array, the
in04_buf allocation, the URB transfer length, and the comparison loop,
replacing the bare 24 and 21 literals throughout.
📍 영향받는 시스템
ALSA usbusx2y 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특수하게 조작된 USB 장치를 연결하여 커널 메모리의 범위를 초과하여 읽도록 유도
🛡️ 대응 방법
USX2Y_IN04_SIZE 상수를 도입하여 배열 크기와 버퍼 할당 크기를 일치시킨 최신 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 확인