🇰🇷 한글 설명
Linux 커널의 ALSA caiaq 드라이버 내 setup_card() 함수에서 오류 발생 시 적절한 예외 처리를 하지 못하는 취약점이 발견되었습니다. 이로 인해 snd_card_register() 오류 시 snd_card_free()를 호출한 후에도 프로세스가 계속 진행되어 Use-After-Free(UAF) 취약점이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 소리를 담당하는 드라이버 프로그램이 오류가 났을 때, 이미 사용을 중단한 메모리 영역에 다시 접근하려고 시도하는 문제입니다. 이로 인해 시스템이 불안정해지거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: caiaq: Handle probe errors properly
The probe procedure of setup_card() in caiaq driver doesn't treat the
error cases gracefully, e.g. the error from snd_card_register() calls
snd_card_free() but continues. This would lead to a UAF for the
further calls like snd_usb_caiaq_control_init(), as Berk suggested in
another patch in the link below.
However, the problem is not only that; in general, this function drops
the all error handlings (as it's a void function) although its caller
can propagate an error to snd_probe(), which eventually calls
snd_card_free() as a proper error path. That said, we should treat
each error case in setup_card(), and just return the error code
promptly, which is then handled later as a fatal error in snd_probe().
This patch achieves it by changing the setup_card() to return an error
code. Also, the superfluous snd_card_free() call is removed, too.
Note that card->private_free can be set still safely at returning an
error. All called functions in card_free() have checks of the
unassigned resources or NULL checks.
📍 영향받는 시스템
Linux Kernel (ALSA caiaq driver 포함 버전)
⚔️ 공격 벡터
특수하게 조작된 하드웨어 또는 드라이버 초기화 과정의 오류를 유도하여 메모리 오류 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인