🇰🇷 한글 설명
Linux 커널의 rtl9300 I2C 드라이버에서 데이터 길이가 0일 때 하드웨어가 지원하지 않는 범위로 처리되는 취약점이 발견되었습니다. 데이터 길이가 0인 SMBus Quick Operation 수행 시 언더플로우가 발생하여 의도치 않게 16바이트 쓰기 작업이 수행될 수 있습니다. 이로 인해 쓰기 보호가 되지 않은 SFP 모듈의 EEPROM이 손상되어 장치가 벽돌 상태가 될 수 있습니다.
💡 쉬운 설명
I2C 통신 장치에 '데이터 없음' 신호를 보냈을 때, 시스템이 이를 잘못 해석하여 엉뚱한 데이터를 16바이트나 강제로 써버리는 문제입니다. 이 과정에서 중요한 설정값이 저장된 메모리가 덮어씌워져 장치가 고장 날 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
i2c: rtl9300: ensure data length is within supported range
Add an explicit check for the xfer length to 'rtl9300_i2c_config_xfer'
to ensure the data length isn't within the supported range. In
particular a data length of 0 is not supported by the hardware and
causes unintended or destructive behaviour.
This limitation becomes obvious when looking at the register
documentation [1]. 4 bits are reserved for DATA_WIDTH and the value
of these 4 bits is used as N + 1, allowing a data length range of
1 <= len <= 16.
Affected by this is the SMBus Quick Operation which works with a data
length of 0. Passing 0 as the length causes an underflow of the value
due to:
(len - 1) & 0xf
and effectively specifying a transfer length of 16 via the registers.
This causes a 16-byte write operation instead of a Quick Write. For
example, on SFP modules without write-protected EEPROM this soft-bricks
them by overwriting some initial bytes.
For completeness, also add a quirk for the zero length.
[1] https://svanheule.net/realtek/longan/register/i2c_mst1_ctrl2
📍 영향받는 시스템
rtl9300 I2C 드라이버를 사용하는 Linux 커널 기반 시스템 (SFP 모듈 포함)
⚔️ 공격 벡터
SMBus Quick Operation을 통해 데이터 길이를 0으로 설정하여 비정상적인 I2C 쓰기 명령을 유도
🛡️ 대응 방법
rtl9300_i2c_config_xfer 함수에 데이터 길이 검증 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인