🇰🇷 한글 설명
MCTP-over-I2C+GPIO 타겟 바인딩에서 I2C STOP 신호 발생 시 레지스터 주소와 데이터 페이즈 플래그가 초기화되지 않는 취약점이 발견되었습니다. 이로 인해 공격자가 특정 시퀀스로 I2C 트랜잭션을 수행하면 NULL 포인터 역참조를 유발하여 시스템을 중단시키거나 패킷 손실을 일으킬 수 있습니다.
💡 쉬운 설명
통신 장치 간의 데이터 교환 과정에서 이전 작업의 흔적이 제대로 지워지지 않아 발생하는 오류입니다. 공격자가 특수한 신호를 보내면 시스템이 갑자기 멈추거나 통신이 끊어지는 서비스 거부(DoS) 공격이 가능합니다.
🇺🇸 원문 (English)
The MCTP-over-I2C+GPIO target binding in subsys/pmci/mctp/mctp_i2c_gpio_target.c emulates a small pseudo-register file, where the bus controller first writes a register number and then writes or reads payload bytes. The selected register (b->reg_addr) and the data-phase flag (b->rxtx) were never cleared when the controller issued an I2C STOP, so after a completed transfer the target still had a data register selected while the packet buffer that register refers to had already been consumed and set to NULL by mctp_i2c_gpio_target_stop().
A controller on the bus can re-enter the same branch of mctp_i2c_gpio_target_stop() with a NULL buffer using two ordinary transactions and no authentication: first a normal packet write to MCTP_I2C_GPIO_RX_MSG_ADDR followed by STOP (which delivers and frees b->rx_pkt), then a bare read transaction followed by STOP. The failing read_requested() call leaves the stale state untouched and the I2C driver still delivers the STOP callback, which then calls mctp_bus_rx() with a NULL packet. The symmetric case exists on the transmit side, where the stale MCTP_I2C_GPIO_TX_MSG_ADDR selection dereferences b->tx_pkt->end after b->tx_pkt has been cleared and additionally signals b->tx_complete a second time, causing the next outbound packet to be dropped.
The dereference happens in the I2C target interrupt handler, so on any target that traps accesses to address 0 the result is a fatal exception and a device reset or halt — a denial of service inflicted by any device able to act as controller on the shared management bus (for example compromised firmware on a peer MCTP endpoint or on the BMC). On parts where address 0 is readable, the impact degrades to a malformed packet buffer being handed to the MCTP stack and lost transmit packets. No attacker-controlled value is written and no confidentiality or integrity boundary is crossed.
The fix resets b->reg_addr to MCTP_I2C_GPIO_INVALID_ADDR and clears b->rxtx at every STOP, so a new register must be selected before any data phase can run again. Only builds that opt into the experimental CONFIG_MCTP subsystem with CONFIG_MCTP_I2C_GPIO_TARGET=y are affected.
📍 영향받는 시스템
CONFIG_MCTP_I2C_GPIO_TARGET=y 옵션이 활성화된 실험적 CONFIG_MCTP 서브시스템을 사용하는 시스템
⚔️ 공격 벡터
공유 관리 버스(I2C) 상에서 인증 없이 특정 시퀀스(RX 메시지 쓰기 후 즉시 읽기 시도)의 I2C 트랜잭션 수행
🛡️ 대응 방법
I2C STOP 콜백 시 b->reg_addr를 무효화하고 b->rxtx 플래그를 초기화하도록 커널 패치 적용
🔧 검증 코드
명령어 결과에 CONFIG_MCTP_I2C_GPIO_TARGET=y가 포함되어 있으면 해당 취약점에 노출된 설정입니다.
zcat /proc/config.gz | grep -E 'CONFIG_MCTP_I2C_GPIO_TARGET=y'
📊 CVSS Vector String
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
💻 영향받는 소프트웨어
Windows iSCSI Target Service