🇰🇷 한글 설명
Linux 커널의 ALSA bcd2000 드라이버에서 USB 연결 해제 시 rawmidi 작업과 해제 처리 간의 경쟁 상태(Race Condition)가 발생합니다. 이로 인해 USB 해제 중에도 실행 중인 rawmidi 함수가 이미 해제된 URB에 접근하여 Use-After-Free(UAF) 취약점이 발생할 수 있습니다.
💡 쉬운 설명
USB 장치를 뽑는 순간에 음악 관련 데이터가 처리되고 있으면, 컴퓨터가 이미 사라진 장치의 메모리에 접근하려다 오류가 발생하는 문제입니다. 이를 방지하기 위해 데이터 처리와 장치 해제 작업이 서로 충돌하지 않도록 잠금 장치를 추가했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: bcd2000: Fix race between rawmidi and disconnect
Although we tried to fix the potential UAF issues at USB disconnect on
bcd2000 driver, there is still an overlooked case -- namely, when a
rawmidi trigger callback has been already running at USB disconnect
handling, the in-flight function (e.g. bcd2000_midi_send()) could
still access the URB, because the previous URB NULL-check & clearance
was considered only for the URB complete callbacks, but not about the
parallel rawmidi operations.
For addressing the race, this patch introduced a new spinlock that
covers each rawmidi operation as well as the rawmidi handling in the
complete callback. The URB is cleared with the lock, so it guarantees
that the pending rawmidi task already finished or a NULL check is
effective.
📍 영향받는 시스템
Linux kernel (ALSA bcd2000 driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 특정 USB 장치의 연결 및 해제를 반복하여 커널 메모리 오류를 유도할 수 있음
🛡️ 대응 방법
ALSA bcd2000 드라이버의 race condition 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux