🇰🇷 한글 설명
Linux 커널의 hwmon(pmbus/adm1266) 드라이버에서 버퍼 크기 할당 오류로 인한 오버플로우 취약점이 발견되었습니다. 데이터 읽기 시 PEC(Packet Error Checking) 바이트를 포함하기 위해 할당된 버퍼보다 더 많은 데이터를 읽어 들여 메모리 경계를 초과하게 됩니다.
💡 쉬운 설명
하드웨어 정보를 읽어오는 과정에서 데이터를 담는 그릇의 크기를 실제 데이터보다 작게 설정하여 발생한 문제입니다. 이로 인해 데이터가 그릇 밖으로 넘쳐흘러 시스템의 다른 메모리 영역을 침범할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (pmbus/adm1266) include PEC byte in pmbus_block_xfer read buffer
adm1266_pmbus_block_xfer() sets up the read transaction with
.buf = data->read_buf,
.len = ADM1266_PMBUS_BLOCK_MAX + 2,
but read_buf in struct adm1266_data is declared as
u8 read_buf[ADM1266_PMBUS_BLOCK_MAX + 1];
For a max-length block response (length byte = 255 + up to 1 PEC
byte), the i2c controller is told to write 257 bytes into a 256-byte
buffer, putting one byte past the end of read_buf. The same response
also makes the subsequent PEC compare
if (crc != msgs[1].buf[msgs[1].buf[0] + 1])
read a byte beyond the array.
Bump the read_buf declaration to ADM1266_PMBUS_BLOCK_MAX + 2 so the
buffer can hold the length byte, up to 255 payload bytes, and the PEC
byte the i2c_msg length already accounts for.
📍 영향받는 시스템
Linux kernel (hwmon/adm1266 driver 포함 버전)
⚔️ 공격 벡터
I2C 통신을 통해 조작된 최대 길이의 PMBus 블록 응답을 전송하여 메모리 오버플로우 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 adm1266_data 구조체의 read_buf 크기를 수정
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인