🇰🇷 한글 설명
Linux 커널 hwmon occ 드라이버의 occ_show_power_1() 함수에서 update_tag 값을 확인하지 않고 나누기를 수행하여 0으로 나누기 오류가 발생합니다. 특히 초기 부팅 단계에서 센서 블록이 아직 업데이트되지 않은 경우 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
Linux 커널의 전원 모니터링 기능에서 데이터가 없을 때 0으로 나누려고 하면 시스템이 충돌합니다. 주로 컴퓨터 부팅 직후 이 문제가 자동으로 트리거될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (occ) Fix division by zero in occ_show_power_1()
In occ_show_power_1() case 1, the accumulator is divided by
update_tag without checking for zero. If no samples have been
collected yet (e.g. during early boot when the sensor block is
included but hasn't been updated), update_tag is zero, causing
a kernel divide-by-zero crash.
The 2019 fix in commit 211186cae14d ("hwmon: (occ) Fix division by
zero issue") only addressed occ_get_powr_avg() used by
occ_show_power_2() and occ_show_power_a0(). This separate code
path in occ_show_power_1() was missed.
Fix this by reusing the existing occ_get_powr_avg() helper, which
already handles the zero-sample case and uses mul_u64_u32_div()
to multiply before dividing for better precision. Move the helper
above occ_show_power_1() so it is visible at the call site.
[groeck: Fix alignment problems reported by checkpatch]
📍 영향받는 시스템
Linux kernel hwmon occ driver (POWER ISA systems: IBM POWER8/POWER9 등) - 2019년 CVE-2019 관련 부분 패치 이후 버전에서도 영향
⚔️ 공격 벡터
로컬 서비스 거부 (Local Denial of Service) - 부팅 단계 또는 센서 모니터링 중 자동 트리거
🛡️ 대응 방법
Linux 커널을 이 CVE 패치가 포함된 최신 버전으로 업그레이드 (일반적으로 stable/LTS 커널 최신 버전)
🔧 검증 코드
CONFIG_SENSORS_OCC가 enabled 상태이면 해당 커널 버전의 official security advisory 또는 git changelog에서 CVE-2026-31770 패치 적용 확인
grep -E 'CONFIG_SENSORS_OCC' /boot/config-$(uname -r) 2>/dev/null && uname -r