🇰🇷 한글 설명
Linux 커널의 i3c 마스터 드라이버에서 device_register() 실패 시 발생하는 오류 처리 결함입니다. 장치 등록 실패 시 참조 카운트가 해제되면서 i3c_device가 조기 해제되고, 이 과정에서 해제된 메모리를 가리키는 포인터가 남아 있어 시스템 경고 및 잘못된 메모리 참조를 유발할 수 있습니다.
💡 쉬운 설명
장치를 등록하려다 실패했을 때, 컴퓨터가 이미 삭제된 메모리 주소를 계속 붙잡고 있어 오류가 발생하는 문제입니다. 이로 인해 시스템에 경고가 뜨거나 프로그램이 비정상적으로 작동할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
i3c: master: Fix device_register() error path
When device_register() fails in i3c_master_register_new_i3c_devs(),
put_device() is called to drop the reference taken by
device_register(). That drops the last reference, so the device's
release callback i3c_device_release() runs and frees the i3c_device.
Two problems follow from that:
i3c_device_release() does WARN_ON(i3cdev->desc), so it warns because
desc->dev->desc still points back at the descriptor. Clear it before
calling put_device().
After put_device() frees the i3c_device, desc->dev is left pointing at
freed memory, so clear desc->dev as well. That prevents, for example,
i3c_master_unregister_i3c_devs() seeing desc->dev as non-NULL and
dereferencing it.
📍 영향받는 시스템
Linux kernel (i3c master driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 i3c 장치 등록 실패를 유도하여 커널 메모리 오류를 발생시킬 수 있음
🛡️ 대응 방법
i3c 관련 커널 패치를 적용하여 device_register() 실패 시 포인터를 적절히 초기화하도록 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인