🇰🇷 한글 설명
Linux 커널의 davinci I2C 드라이버에서 clock-frequency 속성이 누락될 경우 0으로 나누기 오류가 발생하여 커널 패닉이 유발되는 취약점입니다. 기본 주파수 단위가 Hz가 아닌 kHz로 정의되어 있어, 이를 Hz로 변환하는 과정에서 값이 0이 되어 시스템이 중단됩니다.
💡 쉬운 설명
장치 설정 정보가 빠져 있을 때 컴퓨터가 계산을 잘못하여 0으로 나누기를 시도하게 됩니다. 이로 인해 시스템이 갑자기 멈추거나 재부팅되는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
i2c: davinci: fix division by zero on missing clock-frequency
When the 'clock-frequency' property is missing from the device tree,
the driver falls back to DAVINCI_I2C_DEFAULT_BUS_FREQ. However, this
macro was defined in kHz (100), whereas the device tree property is
expected in Hz.
The probe function divided the fallback value by 1000, causing
integer truncation that resulted in dev->bus_freq = 0. This triggered
a deterministic division-by-zero kernel panic when calculating clock
dividers later in the probe sequence.
Fix this by redefining DAVINCI_I2C_DEFAULT_BUS_FREQ in Hz (100000)
to match the expected device tree property unit, allowing the existing
division logic to work correctly for both cases.
📍 영향받는 시스템
Linux kernel (davinci I2C driver 사용 시스템)
⚔️ 공격 벡터
로컬 설정(Device Tree) 조작을 통한 시스템 서비스 거부(DoS)
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 DAVINCI_I2C_DEFAULT_BUS_FREQ 정의를 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.