🇰🇷 한글 설명
Linux 커널의 ALSA usb-audio 드라이버에서 RME Digiface 상태 정보를 읽을 때 스택 정보가 유출되는 취약점이 발견되었습니다. 장치가 요청된 데이터보다 적은 양의 데이터를 반환할 경우, 초기화되지 않은 스택 메모리의 잔여 데이터가 사용자 공간으로 복사될 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리 일부가 제대로 지워지지 않은 상태로 외부로 노출되는 문제입니다. 이를 통해 해커가 시스템 내부의 민감한 정보를 훔쳐볼 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: fix stack info leak in RME Digiface status
snd_rme_digiface_read_status() reads a four-word status block from the
device into an uninitialised on-stack __le32 buf[4] and, whenever the
vendor control-IN transfer does not return a negative error, copies all
four words into the caller's status[].
snd_usb_ctl_msg() copies the full requested size back into the caller's
buffer regardless of how many bytes the data stage actually delivered:
buf = kmemdup(data, size, GFP_KERNEL);
err = usb_control_msg(dev, pipe, request, requesttype,
value, index, buf, size, timeout);
memcpy(data, buf, size);
usb_control_msg() returns the transferred length on a short control-IN,
which is a non-negative value, and writes only that many bytes. The
remainder of the copy back is the kmemdup()ed image of the caller's
buffer, so a device answering with a short data stage leaves the
trailing words of buf[] holding leftover kernel stack. The only guard
in the caller is err < 0, so those words are stored into status[].
They then reach user space: snd_rme_digiface_get_status_val() selects a
16-bit halfword of status[] per the control's reg/mask, and the eight
Digiface status controls together expose the whole 16-byte frame to an
unprivileged reader of /dev/snd/controlC*.
Zero-initialise the buffer so a short read yields zeros instead of stack
residue. This mirrors snd_rme_get_status1(), which already clears its
output word before the same kind of vendor read.
Discovered by XBOW, triaged by Baul Lee <
[email protected]>
📍 영향받는 시스템
Linux kernel (ALSA usb-audio driver with RME Digiface support)
⚔️ 공격 벡터
특수하게 조작된 USB 장치를 연결하여 짧은 데이터 응답(short control-IN)을 유도함으로써 커널 스택 정보를 탈취
🛡️ 대응 방법
커널 패치를 적용하여 상태 정보를 읽기 전 버퍼를 0으로 초기화(Zero-initialise)해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.