🇰🇷 한글 설명
Linux 커널의 ALSA USB 오디오 드라이버에서 ump_to_endpoint() 함수 호출 시 Use-After-Free 취약점이 발생합니다. USB MIDI 2.0 장치 생성 과정에서 오류가 발생할 경우, 이미 등록된 엔드포인트가 해제된 메모리 주소를 계속 참조하게 되어 메모리 읽기 오류를 유발할 수 있습니다.
💡 쉬운 설명
특수한 USB 악기(MIDI 장치)를 연결했을 때 컴퓨터의 메모리 관리 오류를 일으켜 시스템 정보를 훔쳐볼 수 있는 보안 약점입니다. 장치가 연결되는 과정에서 잘못된 메모리 주소를 참조하기 때문에 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: fix use-after-free in ump_to_endpoint()
create_midi2_ump() registers a card-owned snd_ump_endpoint and stores a
back-pointer to its per-interface snd_usb_midi2_ump object in
ump->private_data, but it never installs an ump->private_free hook and
never clears that pointer.
If a later step of snd_usb_midi_v2_create() fails, its error path calls
free_all_midi2_umps(), which kfree()s the snd_usb_midi2_ump object while
the already-registered endpoint keeps pointing at it. The created
/dev/snd/umpC*D* node stays exposed, so the first operation of any UMP
open, ump_to_endpoint(), dereferences the dangling ump->private_data and
reads rmidi->eps[dir] out of freed memory.
A malicious USB MIDI 2.0 device that makes creation fail after the
endpoint is registered can thus trigger a slab use-after-free read on a
subsequent open of the UMP node.
Clear the endpoint's back-pointer before freeing the object, and let
ump_to_endpoint() tolerate a NULL private_data so the open/close/trigger
callbacks fail cleanly (their callers already handle a NULL endpoint)
instead of dereferencing a stale pointer.
Discovered by XBOW, triaged by Baul Lee <
[email protected]>
📍 영향받는 시스템
Linux Kernel (ALSA usb-audio driver component)
⚔️ 공격 벡터
악의적으로 설계된 USB MIDI 2.0 장치를 연결하여 장치 생성 과정에서 오류를 유도한 뒤, 생성된 노드를 열어 메모리 읽기 시도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 엔드포인트의 백포인터 해제 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인