🇰🇷 한글 설명
Linux 커널의 amdgpu 디스플레이 드라이버에서 DM I2C 어댑터 해제 과정 중 레이스 컨디션이 발생합니다. 장치 제거 시 I2C 어댑터가 사용자 공간에 남아 있는 상태에서 데이터 전송이 시도되면 NULL 포인터 역참조로 인해 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 제거하는 과정에서 소프트웨어가 부품이 이미 사라졌다고 착각하여 잘못된 메모리 주소에 접근하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 블루스크린(커널 패닉)이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Fix DM I2C teardown race
DM I2C adapters can remain visible to userspace while DM teardown is
already in progress. A concurrent i2c-dev transfer may then enter
amdgpu_dm_i2c_xfer() after the backing DM state has been torn down,
leading to a NULL pointer dereference.
Create a devres group around the DM I2C adapter lifetime and release it
at the start of dm_hw_fini(), before HPD, IRQ, and DM state are torn
down. This removes the I2C adapters first and waits for in-flight users
to drain before the structures used by amdgpu_dm_i2c_xfer() disappear.
This fixes a teardown ordering race seen during device removal:
BUG: kernel NULL pointer dereference
RIP: amdgpu_dm_i2c_xfer+0x122/0x1c0 [amdgpu]
Call Trace:
__i2c_transfer
i2c_transfer
i2cdev_ioctl_rdwr
📍 영향받는 시스템
AMD GPU를 사용하는 Linux 커널 시스템 (amdgpu 드라이버 포함)
⚔️ 공격 벡터
장치 제거(Device Removal) 시 발생하는 레이스 컨디션을 이용한 로컬 공격 또는 시스템 불안정 유발
🛡️ 대응 방법
amdgpu 드라이버의 DM I2C 어댑터 생명주기 관리를 위해 devres 그룹을 적용한 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 메인라인 커널 버전인지 확인합니다.