🇰🇷 한글 설명
Linux 커널의 DS28E17 1-Wire to I2C 브리지 드라이버에서 I2C 블록 읽기 시 허용 범위를 초과하는 길이를 검증하지 않는 취약점이 발견되었습니다. 장치가 제공하는 길이 값이 버퍼 크기를 초과할 경우, 최대 222바이트의 메모리 영역에서 경계 외 읽기(Out-of-bounds read)가 발생할 수 있습니다.
💡 쉬운 설명
특정 하드웨어 장치가 컴퓨터에게 '데이터를 아주 많이 보내겠다'고 거짓말을 하면, 컴퓨터가 준비된 공간보다 더 많은 데이터를 읽으려다 메모리 오류를 일으키는 문제입니다. 이로 인해 시스템이 불안정해지거나 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
w1: ds28e17: reject an oversize length on an I2C block read
w1_f19_i2c_master_transfer() is the master_xfer for the DS28E17 1-Wire
to I2C bridge. On an I2C_M_RECV_LEN read, it takes the length from the
device. The downstream slave puts a length byte in buf[0]. The driver
then reads that many bytes into buf[1] with w1_f19_i2c_read().
buf[0] is controlled by the device and can be 0 to 255.
w1_f19_i2c_read() only rejects a zero count. The caller buffer is
I2C_SMBUS_BLOCK_MAX + 2, so 34 bytes. A length above 32 makes the read
run past it, up to about 222 bytes out of bounds.
The SMBus core does check buf[0] against I2C_SMBUS_BLOCK_MAX. That
check runs after master_xfer returns. By then the write is already
done. i2c-algo-bit rejects an oversize length before it copies, and
returns -EPROTO.
Reject a length above I2C_SMBUS_BLOCK_MAX at both RECV_LEN sites, the
same way i2c-algo-bit does.
📍 영향받는 시스템
DS28E17 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
조작된 길이를 전달하는 악의적인 I2C 슬레이브 장치를 통한 메모리 경계 외 읽기 공격
🛡️ 대응 방법
I2C_SMBUS_BLOCK_MAX를 초과하는 길이를 거부하도록 커널 드라이버를 업데이트하십시오.
🔧 검증 코드
현재 사용 중인 커널 버전을 확인하여 해당 취약점이 패치된 최신 버전인지 확인합니다.