🇰🇷 한글 설명
Linux 커널 USB DWC3 드라이버의 엔드포인트 명령 타임아웃으로 인해 panic_on_warn 활성화 시 커널 패닉이 발생하는 문제를 해결합니다. 빠른 USB connect/disconnect 시나리오에서 제어 전송이 완료되지 않은 상태의 엔드 전송 명령이 타임아웃되며, WARN_ON 제거로 불필요한 패닉을 방지합니다.
💡 쉬운 설명
USB 장치를 빠르게 연결/해제할 때 Linux 시스템이 예상하지 못한 상황에서 커널이 충돌할 수 있습니다. 이 패치는 그러한 충돌을 방지하는 업데이트입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: Remove WARN_ON for device endpoint command timeouts
This commit addresses a rarely observed endpoint command timeout
which causes kernel panic due to warn when 'panic_on_warn' is enabled
and unnecessary call trace prints when 'panic_on_warn' is disabled.
It is seen during fast software-controlled connect/disconnect testcases.
The following is one such endpoint command timeout that we observed:
1. Connect
=======
->dwc3_thread_interrupt
->dwc3_ep0_interrupt
->configfs_composite_setup
->composite_setup
->usb_ep_queue
->dwc3_gadget_ep0_queue
->__dwc3_gadget_ep0_queue
->__dwc3_ep0_do_control_data
->dwc3_send_gadget_ep_cmd
2. Disconnect
==========
->dwc3_thread_interrupt
->dwc3_gadget_disconnect_interrupt
->dwc3_ep0_reset_state
->dwc3_ep0_end_control_data
->dwc3_send_gadget_ep_cmd
In the issue scenario, in Exynos platforms, we observed that control
transfers for the previous connect have not yet been completed and end
transfer command sent as a part of the disconnect sequence and
processing of USB_ENDPOINT_HALT feature request from the host timeout.
This maybe an expected scenario since the controller is processing EP
commands sent as a part of the previous connect. It maybe better to
remove WARN_ON in all places where device endpoint commands are sent to
avoid unnecessary kernel panic due to warn.
📍 영향받는 시스템
Linux kernel (특히 Exynos 플랫폼), USB DWC3 컨트롤러 기반 임베디드 시스템 및 모바일 기기
⚔️ 공격 벡터
로컬 공격자가 USB 장치를 반복적으로 빠르게 연결/해제하여 커널 패닉 유발 (로컬 DoS)
🛡️ 대응 방법
Linux 커널을 패치된 버전 이상으로 업그레이드하거나 배포판의 보안 업데이트를 설치합니다.
🔧 검증 코드
커널 소스 코드에서 해당 패치 문구가 존재하는지 확인하거나, 커널 버전이 충분히 최신 버전인지 검증합니다.
grep -E 'Remove WARN_ON for device endpoint' /usr/src/linux-$(uname -r)/.config 2>/dev/null || uname -r | grep -q '[5-9]\.[0-9]' && echo 'Check kernel source for patch'