🇰🇷 한글 설명
Linux 커널의 pca953x 드라이버에서 regmap 잠금 메커니즘 오류로 인해 발생하는 취약점입니다. 특정 함수가 I2C 잠금을 적절히 유지하지 않아, 여러 스레드가 동시에 레지스터에 접근할 경우 잘못된 읽기 또는 쓰기가 발생할 수 있습니다.
💡 쉬운 설명
여러 작업이 동시에 하드웨어 설정을 바꾸려고 할 때, 순서를 맞춰주는 '잠금 장치'가 제대로 작동하지 않는 문제입니다. 이로 인해 데이터가 꼬이거나 하드웨어가 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gpio: pca953x: fix pca953x_irq_bus_sync_unlock regmap lock
Locking is disabled in the regmap config as this driver uses its own
lock. This means that all calls to regmap functions (read or write) must
hold the i2c_lock. The function pca953x_irq_bus_sync_unlock() did not do
this, and it was therefore possible that multiple threads could cause an
incorrect register to be read/written.
A previous patch partly fixed this, but only protected the write to the
interrupt mask register, and not the read from the direction register.
📍 영향받는 시스템
Linux kernel (pca953x driver 포함 버전)
⚔️ 공격 벡터
멀티스레드 환경에서 특정 시점에 동시 접근을 유도하는 레이스 컨디션(Race Condition) 공격
🛡️ 대응 방법
pca953x_irq_bus_sync_unlock 함수에 I2C 잠금이 적용된 최신 커널 패치로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인