🇰🇷 한글 설명
리눅스 커널의 USB 스토리지 드라이버에서 USB 벌크 전송 시 메모리 누수 취약점이 발견되었습니다. USB 장치가 데이터 단계를 건너뛸 때 CSW(Command Status Wrapper) 데이터를 검증한 후 메모리를 초기화하지 않아, USB 프로토콜 데이터가 사용자 공간의 SCSI generic 인터페이스(/dev/sg*)를 통해 유출될 수 있습니다.
💡 쉬운 설명
USB 저장 장치를 사용할 때 컴퓨터 메모리의 일부 데이터가 제대로 지워지지 않고 남는 문제가 있습니다. 이로 인해 민감한 USB 통신 정보가 일반 사용자 프로그램에 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: storage: Fix memory leak in USB bulk transport
A kernel memory leak was identified by the 'ioctl_sg01' test from Linux
Test Project (LTP). The following bytes were mainly observed: 0x53425355.
When USB storage devices incorrectly skip the data phase with status data,
the code extracts/validates the CSW from the sg buffer, but fails to clear
it afterwards. This leaves status protocol data in srb's transfer buffer,
such as the US_BULK_CS_SIGN 'USBS' signature observed here. Thus, this can
lead to USB protocols leaks to user space through SCSI generic (/dev/sg*)
interfaces, such as the one seen here when the LTP test requested 512 KiB.
Fix the leak by zeroing the CSW data in srb's transfer buffer immediately
after the validation of devices that skip data phase.
Note: Differently from CVE-2018-1000204, which fixed a big leak by zero-
ing pages at allocation time, this leak occurs after allocation, when USB
protocol data is written to already-allocated sg pages.
📍 영향받는 시스템
USB 스토리지 드라이버를 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
악의적인 USB 장치를 연결하여 SCSI generic(/dev/sg*) 인터페이스를 통해 메모리 내 프로토콜 데이터를 읽어냄
🛡️ 대응 방법
데이터 단계 건너뛰기 검증 직후 srb 전송 버퍼의 CSW 데이터를 0으로 초기화하는 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 보안 패치 버전인지 확인