🔍 CVE-2026-19571

6.7
CVSS Score
MEDIUM
2026-10-09
2026-10-09 18:17
✅ 완료

🇰🇷 한글 설명

ITE IT8xxx2 SHI 호스트 명령 백엔드에서 헤더를 수신 버퍼에 먼저 복사한 후 길이를 검증하는 로직 결함으로 인해 발생합니다. 공격자가 특정 타이밍에 조작된 헤더를 전송하면 버퍼 크기를 초과하는 데이터 길이를 전달하여 메모리 외부 읽기(Out-of-bounds read) 또는 시스템 장애를 유발할 수 있습니다.

💡 쉬운 설명

데이터의 크기를 확인하기 전에 데이터를 먼저 저장하는 과정에서 발생하는 보안 허점입니다. 이를 통해 공격자가 시스템의 중요한 메모리 내용을 훔쳐보거나 시스템을 멈추게 할 수 있습니다.

🇺🇸 원문 (English)

The ITE IT8xxx2 SHI host-command backend (subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c) copied the 8-byte host-command request header from the SPI Rx FIFO directly into the shared receive buffer data->in_msg and only afterwards checked the protocol version and the derived packet length. The interrupt handler also accepted a chip-select assertion and an Rx-valid-length (RVLI) interrupt in any driver state other than SHI_STATE_DISABLED, so a new header could be parsed while the host-command thread was still processing the previous request out of the very same buffer. The host processor is the SPI controller and drives both chip select and the clock. After sending a well-formed request it can immediately de-assert chip select — which returns the driver to the ready state and re-enables the FIFO — and start a second transaction carrying a header with data_len = 0xFFFF. Those eight bytes are written into in_msg before the oversized length is rejected, so they land in a buffer whose contents verify_rx() in subsys/mgmt/ec_host_cmd/ec_host_cmd_handler.c has already validated. If this lands in the window before the host-command thread executes args.input_buf_size = rx_header->data_len, the framework hands the registered command handler a 65535-byte input length over a 256-byte buffer. The result is an out-of-bounds read of up to roughly 64 KiB beyond the request buffer: command handlers that copy or echo input_buf_size bytes disclose adjacent embedded-controller memory back to the host or overflow the response buffer, and a read past the end of SRAM faults the controller. The same race also allows cmd_id and cmd_ver to be swapped after checksum verification and after handler lookup. Exploitation requires the ability to drive the inter-processor SHI bus (a compromised host OS or physical access to the SPI lines) and winning a timing race, which the SPI controller can retry indefinitely. The fix parses the header into a local struct ec_host_cmd_request_header and copies it into in_msg only after the length has been bounded by sizeof(data->in_msg), and ignores chip-select and RVLI interrupts outside SHI_STATE_READY_TO_RECV/SHI_STATE_RECEIVING. A residual, bounded race remains: an end-of-transaction interrupt still resets the state to ready while the host-command thread owns the buffer, so a valid second request can still overwrite the in-flight request's contents, unlike the NPCX backend which parks in SHI_STATE_CNL_RESP_NOT_RDY while the buffer is in use.

📍 영향받는 시스템

ITE IT8xxx2 SHI host-command backend (subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_ite.c 포함 시스템)

⚔️ 공격 벡터

호스트 OS 탈취 또는 SPI 라인에 대한 물리적 접근을 통해 SHI 버스 타이밍 레이스 공격 수행

🛡️ 대응 방법

헤더를 로컬 구조체에 먼저 파싱하여 길이를 검증한 후 버퍼에 복사하도록 드라이버를 업데이트하고, 상태 머신 제어를 강화해야 합니다.

🔧 검증 코드

해당 소스 파일이 존재하고, 헤더 검증 로직이 로컬 구조체를 사용하는 방식으로 수정되었는지 확인합니다.

Shell / Script
grep -r "ec_host_cmd_backend_shi_ite.c" /path/to/kernel/source/subsys/mgmt/ec_host_cmd/backends/

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H

💻 영향받는 소프트웨어

IBM Security Verify Access