🇰🇷 한글 설명
Linux 커널의 hwmon(pt5161l) 드라이버에서 버퍼 오버런 및 잘못된 반환 값 처리 취약점이 발견되었습니다. I2C 장치가 예상보다 많은 데이터를 반환할 경우 스택 버퍼 오버런이 발생할 수 있으며, 데이터 길이 불일치 시에도 오류를 성공으로 오인하여 잘못된 데이터를 처리할 수 있습니다.
💡 쉬운 설명
하드웨어 정보를 읽어오는 과정에서 준비된 그릇보다 더 많은 데이터가 들어와 메모리가 넘치거나, 잘못된 정보를 정상적인 정보로 착각하는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (pt5161l) Fix bugs in pt5161l_read_block_data()
Fix two bugs in pt5161l_read_block_data():
1. Buffer overrun: The local buffer rbuf is declared as u8 rbuf[24],
but i2c_smbus_read_block_data() can return up to
I2C_SMBUS_BLOCK_MAX (32) bytes. The i2c-core copies the data into
the caller's buffer before the return value can be checked, so
the post-read length validation does not prevent a stack overrun
if a device returns more than 24 bytes. Resize the buffer to
I2C_SMBUS_BLOCK_MAX.
2. Unexpected positive return on length mismatch: When all three
retries are exhausted because the device returns data with an
unexpected length, i2c_smbus_read_block_data() returns a positive
byte count. The function returns this directly, and callers treat
any non-negative return as success, processing stale or incomplete
buffer contents. Return -EIO when retries are exhausted with a
positive return value, preserving the negative error code on I2C
failure.
📍 영향받는 시스템
Linux kernel (pt5161l driver 포함 버전)
⚔️ 공격 벡터
조작된 데이터를 반환하는 악의적인 I2C 장치를 통해 메모리 오버런 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 pt5161l 취약점이 수정된 최신 패치 버전인지 확인