🇰🇷 한글 설명
Linux 커널의 libata-scsi 구성 요소에서 ATA PASS-THROUGH 명령 실패 시 센스 버퍼의 길이를 검증하지 않는 취약점이 발견되었습니다. 악의적인 장치가 조작된 길이를 전달할 경우 커널이 96바이트 버퍼 범위를 벗어나 읽거나 쓰는 메모리 오버런이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터에 연결된 저장 장치가 가짜 정보를 보내 컴퓨터의 메모리 영역을 침범할 수 있는 보안 결함입니다. 이를 통해 공격자가 시스템의 중요한 데이터를 읽거나 조작할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ata: libata-scsi: bound the ATA passthru sense descriptor writes
When an ATA PASS-THROUGH command to an ATAPI device fails, the sense
buffer holds the device's REQUEST SENSE reply, and
ata_scsi_set_passthru_sense_fields() trusts its additional length
byte, sb[7], when adding the ATA Status Return descriptor. A faulty
or malicious device can use that to make the kernel read and write
past the 96-byte buffer in three ways:
- scsi_sense_desc_find() is passed sb[7] + 8 as the buffer length, so
its clamp against sb[7] does nothing and the walk runs off the end.
- A type-9 descriptor found near the end is filled in unchecked.
- A new descriptor at sb[8 + len] needs len + 22 bytes, not len + 14,
so len 75..82 writes up to 8 bytes past the end.
Reproduced with KASAN under qemu, with the emulated ATAPI REQUEST SENSE
reply patched:
BUG: KASAN: slab-out-of-bounds in scsi_sense_desc_find+0x1a5/0x210
BUG: KASAN: slab-out-of-bounds in ata_scsi_qc_complete+0x1a15/0x1a50
Both are gone with this patch, and a valid descriptor is still filled
in.
📍 영향받는 시스템
ATA/ATAPI 장치를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
조작된 응답을 보내는 악의적인 또는 결함이 있는 ATAPI 장치를 통한 로컬 공격
🛡️ 대응 방법
해당 취약점이 해결된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 배포판의 보안 업데이트 버전인지 확인