🇰🇷 한글 설명
Linux 커널의 dwc3 USB 컨트롤러에서 EndTransfer 명령 시 forceRM 비트 설정 오류로 인해 발생하는 취약점입니다. 특정 컨트롤러에서 전송 중단 후에도 이전 전송이 활성 상태로 남아, 이후 전송 시 메모리 매핑 오류로 인한 SMMU 결함을 유발할 수 있습니다.
💡 쉬운 설명
USB 데이터 전송을 강제로 중단할 때 설정값이 잘못되어, 컴퓨터가 이미 사용하지 않는 메모리 영역에 데이터를 쓰려고 시도하는 문제입니다. 이로 인해 시스템에 오류가 발생하거나 프로그램이 갑자기 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: clear forceRM when issuing EndTransfer
The forceRM bit of the DEPCMD register controls the behavior of the
EndTransfer command used to stop an active transfer. Older DWC3
programming guide revisions recommended setting forceRM=1 when
issuing EndTransfer. Newer programming guide revisions recommend
issuing EndTransfer with forceRM cleared.
With forceRM=1 on DWC_usb31 v2.00a and v2.10a controllers, a transfer
aborted through the ep_dequeue path was observed to remain active
after EndTransfer completion. A subsequent StartTransfer issued on the
same endpoint triggered writes associated with the aborted transfer.
This resulted in an SMMU fault because the transfer buffer had already
been unmapped during EndTransfer command-completion cleanup.
Using forceRM=0 eliminates the issue. Although older DWC3 programming
guide revisions recommended setting forceRM=1, no issues are known
from using forceRM=0. Clear forceRM when issuing EndTransfer to provide
consistent EndTransfer behavior and align with newer programming guide
recommendations.
📍 영향받는 시스템
Linux kernel (DWC3 USB controller 사용 시스템, 특히 DWC_usb31 v2.00a 및 v2.10a 컨트롤러)
⚔️ 공격 벡터
특정 USB 장치를 통해 비정상적인 전송 중단(ep_dequeue)을 유도하여 SMMU 결함을 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 EndTransfer 시 forceRM 비트를 0으로 설정하도록 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인