🇰🇷 한글 설명
Linux 커널의 mediatek pmdomain 드라이버 내 scpsys_get_bus_protection_legacy() 함수에서 Use-After-Free 취약점이 발견되었습니다. 오류 발생 시 노드 참조 카운트를 먼저 감소시킨 후 해당 노드 포인터를 참조하여 진단 정보를 출력함으로써 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 사용 중인 메모리를 미리 해제해 버린 후, 다시 그 메모리에 접근하려고 할 때 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안 공격에 악용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
pmdomain: mediatek: fix use-after-free in scpsys_get_bus_protection_legacy()
In scpsys_get_bus_protection_legacy(), of_find_node_with_property()
returns a device node with its reference count incremented. The function
then calls of_node_put(node) before checking whether
syscon_regmap_lookup_by_phandle() returns an error. If an error occurs,
dev_err_probe() dereferences the node pointer to print diagnostic
information, but the node memory may have already been freed due to the
earlier of_node_put(), leading to a use-after-free vulnerability.
Fix this by moving the of_node_put() call after the error check, ensuring
the node is still valid when accessed in the error path.
📍 영향받는 시스템
MediaTek SoC를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
특정 하드웨어 구성에서 오류를 유도하여 메모리 해제 후 참조를 발생시키는 방식
🛡️ 대응 방법
커널 패치를 적용하여 of_node_put() 호출 시점을 오류 체크 이후로 변경
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인