🇰🇷 한글 설명
Linux kernel의 pegasus USB 드라이버가 엔드포인트 타입 검증 없이 URB를 초기화하여 악의적 USB 장치의 잘못된 엔드포인트로 인한 assertion 유발 가능성이 있습니다. 이를 해결하기 위해 probe 단계에서 usb_check_bulk_endpoints()와 usb_check_int_endpoints()를 호출하여 엔드포인트 타입 검증을 추가합니다.
💡 쉬운 설명
Linux USB 드라이버가 가짜 USB 장치의 잘못된 엔드포인트 타입을 검증하지 않아 시스템 오류가 발생할 수 있습니다. 기기 연결 시 엔드포인트 타입을 미리 확인하여 문제를 방지하는 패치입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: usb: pegasus: enable basic endpoint checking
pegasus_probe() fills URBs with hardcoded endpoint pipes without
verifying the endpoint descriptors:
- usb_rcvbulkpipe(dev, 1) for RX data
- usb_sndbulkpipe(dev, 2) for TX data
- usb_rcvintpipe(dev, 3) for status interrupts
A malformed USB device can present these endpoints with transfer types
that differ from what the driver assumes.
Add a pegasus_usb_ep enum for endpoint numbers, replacing magic
constants throughout. Add usb_check_bulk_endpoints() and
usb_check_int_endpoints() calls before any resource allocation to
verify endpoint types before use, rejecting devices with mismatched
descriptors at probe time, and avoid triggering assertion.
Similar fix to
- commit 90b7f2961798 ("net: usb: rtl8150: enable basic endpoint checking")
- commit 9e7021d2aeae ("net: usb: catc: enable basic endpoint checking")
📍 영향받는 시스템
Linux kernel pegasus USB 드라이버 (Realtek RTL8150 기반 USB 이더넷 어댑터)
⚔️ 공격 벡터
악의적으로 제작된 USB 장치를 시스템에 연결하여 잘못된 엔드포인트 타입 제시
🛡️ 대응 방법
Linux kernel을 pegasus 드라이버 엔드포인트 검증 패치가 포함된 버전으로 업데이트
🔧 검증 코드
출력에서 usb_check_bulk_endpoints와 usb_check_int_endpoints 함수 호출이 보이면 패치가 적용된 상태입니다.
grep -n 'usb_check_bulk_endpoints\|usb_check_int_endpoints' /usr/src/linux*/drivers/net/usb/pegasus.c 2>/dev/null | head -2