🇰🇷 한글 설명
Intel ALH 디지털 오디오 인터페이스 드라이버의 dai_alh_get_properties() 함수에서 stream_id 값에 대한 범위 검증이 누락되어 발생한 취약점입니다. 공격자가 조작된 stream_id를 사용하여 커널 메모리의 특정 위치를 읽어 정보를 유출하거나, 잘못된 주소 접근을 유도하여 시스템을 중단시킬 수 있습니다.
💡 쉬운 설명
오디오 드라이버가 사용자가 입력한 번호를 제대로 확인하지 않아, 시스템의 중요한 비밀 정보가 밖으로 새어나가거나 컴퓨터가 멈출 수 있는 문제입니다. 권한이 있는 사용자가 잘못된 번호를 입력하여 시스템 내부를 들여다보는 방식입니다.
🇺🇸 원문 (English)
The Intel ALH digital-audio-interface driver function dai_alh_get_properties() in drivers/dai/intel/alh/alh.c used a caller-supplied int stream_id with no range validation. The value indexes the fixed-size static const uint8_t alh_handshake_map[64] array and scales a FIFO register address, so an out-of-range stream_id produces an out-of-bounds read of one byte at an attacker-chosen signed offset from the array. That byte is written into prop->dma_hs_id and the resulting struct dai_properties is copied back to the caller, leaking it.
dai_get_properties_copy() is a Zephyr __syscall, and its verifier z_vrfy_dai_get_properties_copy() (drivers/dai/dai_handlers.c) validates only the device-object permission and the destination buffer, not stream_id. A user-mode thread that has been granted access to the ALH DAI device object can therefore call the syscall with an arbitrary stream_id, crossing the userspace/kernel sandbox boundary.
The impact is a one-byte-per-call arbitrary-offset kernel information disclosure (and leakage of a computed kernel address via fifo_address); a stream_id that resolves to an unmapped page faults in kernel context, giving a local denial of service. Exploitation requires CONFIG_USERSPACE and device access, making this a local, moderate-severity issue. The fix rejects negative and too-large stream_id values up front and returns NULL, which the copy wrapper maps to -ENOENT.
📍 영향받는 시스템
Zephyr OS 기반 시스템 중 Intel ALH DAI 드라이버를 사용하는 환경 (CONFIG_USERSPACE 활성화 시)
⚔️ 공격 벡터
사용자 모드 스레드가 권한이 부여된 DAI 장치 객체를 통해 조작된 stream_id를 포함한 시스템 콜(syscall)을 호출
🛡️ 대응 방법
stream_id의 범위를 검증하여 음수 또는 배열 크기를 초과하는 값을 차단하도록 드라이버 코드를 업데이트
🔧 검증 코드
해당 함수 내에 stream_id에 대한 유효성 검사 로직(예: if (stream_id < 0 || stream_id >= 64))이 있는지 확인
grep -r "dai_alh_get_properties" drivers/dai/intel/alh/alh.c