🇰🇷 한글 설명
Linux 커널의 testdrv_probe() 함수에서 사용 후 해제(Use-After-Free) 취약점이 발견되었습니다. PCI 장치로부터 device_node를 가져온 후 즉시 참조를 해제하여, 이후 동일한 포인터를 사용할 때 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
프로그램이 이미 사용이 끝나서 삭제된 메모리 주소를 다시 사용하려고 할 때 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
of: unittest: fix use-after-free in testdrv_probe()
The function testdrv_probe() retrieves the device_node from the PCI
device, applies an overlay, and then immediately calls of_node_put(dn).
This releases the reference held by the PCI core, potentially freeing
the node if the reference count drops to zero. Later, the same freed
pointer 'dn' is passed to of_platform_default_populate(), leading to a
use-after-free.
The reference to pdev->dev.of_node is owned by the device model and
should not be released by the driver. Remove the erroneous of_node_put()
to prevent premature freeing.
📍 영향받는 시스템
Linux Kernel (testdrv 관련 모듈이 포함된 버전)
⚔️ 공격 벡터
특수하게 조작된 PCI 장치를 연결하거나 관련 드라이버를 로드하여 메모리 오류 유도
🛡️ 대응 방법
커널 패치를 적용하여 testdrv_probe() 함수 내의 잘못된 of_node_put() 호출을 제거
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인