🇰🇷 한글 설명
Linux 커널의 cros_usbpd-charger 드라이버에서 EC(Embedded Controller)가 보고하는 포트 개수를 검증하는 과정에 결함이 있습니다. 공격자가 조작된 EC를 통해 허용된 배열 크기보다 큰 포트 개수를 전달할 경우, 커널 메모리의 슬랩 영역에 경계 외 쓰기(Out-of-bounds write)가 발생하여 시스템 권한 탈취나 서비스 거부가 가능합니다.
💡 쉬운 설명
기기 내부의 제어 장치가 실제 수용 가능한 공간보다 더 많은 연결 장치가 있다고 거짓말을 하여 시스템 메모리를 망가뜨릴 수 있는 보안 약점입니다. 이를 통해 해커가 시스템의 제어권을 뺏거나 컴퓨터를 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
power: supply: cros_usbpd-charger: bound the EC-reported port count
cros_usbpd_charger_probe() reads two port counts from the EC and uses
one of them, num_charger_ports, as the loop bound when populating a
fixed-size array:
struct port_data *ports[EC_USB_PD_MAX_PORTS]; /* 8 entries */
...
for (i = 0; i < charger->num_charger_ports; i++)
charger->ports[charger->num_registered_psy++] = port;
Both num_usbpd_ports (from EC_CMD_USB_PD_PORTS) and num_charger_ports
(from EC_CMD_CHARGE_PORT_COUNT) are u8 values reported by the EC. The
only validation is a sanity check that compares the two EC-reported
values against each other:
if (num_charger_ports < num_usbpd_ports ||
num_charger_ports > num_usbpd_ports + 1)
return -EPROTO;
It never checks either count against EC_USB_PD_MAX_PORTS, the size of
the ports[] array. A malfunctioning, malicious or compromised EC that
reports num_usbpd_ports == num_charger_ports == N for any N > 8 (for
example both 255) passes this check, and the loop then writes N pointers
into the 8-entry ports[] array embedded in the devm_kzalloc()'d
charger_data, overflowing it by up to 255 - 8 = 247 entries (~1976
bytes): a slab out-of-bounds write.
Reject a port count larger than the ports[] array can hold.
📍 영향받는 시스템
Linux kernel (cros_usbpd-charger 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
악의적으로 조작되거나 손상된 EC(Embedded Controller)를 통한 메모리 오버플로우 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 포트 개수 검증 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 보안 공지(CVE-2026-89471)와 대조합니다.