🇰🇷 한글 설명
Linux 커널의 dummy-hcd 드라이버에서 요청 완료 핸들러 호출 시 콜백 사용 카운터를 증가시키지 않는 결함이 발견되었습니다. 이로 인해 가젯 드라이버의 unbind 루틴이 모든 요청 완료가 끝나기 전에 실행되어, 완료 핸들러가 실행 중인 상태에서 모듈이 언로드될 수 있는 위험이 있습니다.
💡 쉬운 설명
USB 장치를 흉내 내는 소프트웨어가 작업이 완전히 끝났는지 확인하는 과정에서 실수가 있었습니다. 이 때문에 작업이 아직 진행 중인데도 관련 프로그램을 강제로 종료시켜 시스템 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
USB: gadget: dummy-hcd: Fix wait for outstanding request completions
The dummy-hcd driver emulates synchronize_irq() by waiting until its
private callback_usage counter drops to 0 (with the private lock not
held). This counter is incremented whenever a gadget driver callback
occurs (which requires the private lock to be dropped), but not when a
request completion handler is called.
This is an oversight. Request completion is triggered by timer
interrupts (emulating device IRQs in a real UDC), and the interrupt
handlers are supposed to have completed when the synchronize_irq()
emulation routine returns -- they aren't supposed to be in the middle
of a completion callback. If this happens it can lead to a gadget
driver's unbind routine running before all outstanding request
completions have finished, maybe even allowing the gadget driver's
module to be unloaded while a completion handler is still running.
Fix the oversight by incrementing the callback_usage value across
request completion callbacks.
📍 영향받는 시스템
Linux kernel (dummy-hcd driver 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 가젯 드라이버의 언바인드(unbind)를 유도하여 커널 모듈 언로드 시 레이스 컨디션 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인