🇰🇷 한글 설명
Linux 커널의 USB Type-C UCSI 드라이버에서 하드웨어가 보고한 CCI 필드의 커넥터 번호를 검증하지 않아, 범위를 벗어난 값이 커넥터 배열 접근 시 경계 밖 메모리 접근을 일으킬 수 있습니다. 이를 해결하기 위해 ucsi_notify_common()에서 커넥터 번호에 대한 경계 검사를 추가하였습니다.
💡 쉬운 설명
USB-C 포트를 관리하는 커널 드라이버가 장치에서 받은 잘못된 포트 번호를 확인하지 않는 문제입니다. 악의적이거나 오작동하는 장치가 이를 악용해 시스템 메모리를 잘못 건드릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: validate connector number in ucsi_notify_common()
The connector number extracted from CCI via UCSI_CCI_CONNECTOR() is a
7-bit field (0-127) that is used to index into the connector array in
ucsi_connector_change(). However, the array is only allocated for the
number of connectors reported by the device (typically 2-4 entries).
A malicious or malfunctioning device could report an out-of-range
connector number in the CCI, causing an out-of-bounds array access in
ucsi_connector_change().
Add a bounds check in ucsi_notify_common(), the central point where CCI
is parsed after arriving from hardware, so that bogus connector numbers
are rejected before they propagate further.
📍 영향받는 시스템
UCSI(USB Type-C Connector System Software Interface) 드라이버를 포함한 수정 전 Linux 커널 버전
⚔️ 공격 벡터
악성 또는 오작동하는 USB-C 장치가 CCI 응답에 범위를 벗어난 커넥터 번호를 담아 커널의 경계 밖 배열 접근을 유발
🛡️ 대응 방법
배포판 제공 커널 보안 업데이트를 적용하거나, 커널 버전을 CVE 수정이 포함된 버전 이상으로 업그레이드
🔧 검증 코드
첫 줄은 현재 커널 버전이며 해당 배포판의 보안 권고에서 수정 버전과 비교합니다. 둘째 줄은 UCSI 드라이버 설정이 y 또는 m이면 취약 코드가 포함된 것이므로 패치 적용 여부를 확인해야 하고, 설정이 없으면 영향이 없습니다.
uname -r; grep -E 'CONFIG_TYPEC_UCSI' /boot/config-$(uname -r) 2>/dev/null