🇰🇷 한글 설명
Linux 커널의 hwmon(pmbus/adm1266) 드라이버에서 PDIO 스캔 시 반복 범위 설정 오류로 인해 발생하는 취약점입니다. 잘못된 상수를 사용하여 마스크 범위를 초과하는 메모리 영역을 읽거나 쓸 수 있는 Out-of-bounds 취약점이 존재합니다.
💡 쉬운 설명
하드웨어 제어 프로그램이 정해진 범위를 넘어서 메모리의 엉뚱한 곳을 읽거나 쓰는 오류입니다. 이로 인해 시스템이 불안정해지거나 잘못된 데이터가 기록될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (pmbus/adm1266) cap PDIO scan in get_multiple at ADM1266_PDIO_NR
adm1266_gpio_get_multiple() iterates the PDIO portion of the
caller-supplied mask using
for_each_set_bit_from(gpio_nr, mask,
ADM1266_GPIO_NR + ADM1266_PDIO_STATUS) {
...
}
where ADM1266_PDIO_STATUS is the PMBus command code (0xE9, i.e. 233),
not the number of PDIO pins. The intended upper bound is
ADM1266_GPIO_NR + ADM1266_PDIO_NR = 25.
gpiolib hands in a mask sized for gc.ngpio (= 25 bits on this chip),
so the iteration walks find_next_bit() up to 242, reading up to 217
extra bits (a handful of unsigned-long words: four on 64-bit, seven
on 32-bit) of whatever lives past the end of the mask in the
caller's stack. Any incidental set bit in that range then drives a
set_bit(gpio_nr, bits) call that writes past the end of the
caller-supplied bits array too -- both out-of-bounds.
Substitute ADM1266_PDIO_NR for the constant so the scan stops at the
last real PDIO bit.
📍 영향받는 시스템
Linux kernel (adm1266 driver components)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 제어 명령을 통해 메모리 범위를 벗어난 읽기/쓰기 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ADM1266_PDIO_NR 상수가 올바르게 적용되도록 수정해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.