🇰🇷 한글 설명
Linux 커널의 ptp: ocp 드라이버에서 리소스 해제 순서 오류로 인해 Use-After-Free 취약점이 발생합니다. 드라이버 제거 시 하드웨어 이벤트가 비활성화되기 전에 리소스가 먼저 해제되어 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 제거할 때, 사용 중인 기능을 먼저 끄지 않고 부품을 먼저 빼버려서 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ptp: ocp: fix resource freeing order
Commit a60fc3294a37 ("ptp: rework ptp_clock_unregister() to disable
events") added a call to ptp_disable_all_events() which changes the
configuration of pins if they support EXTTS events. In ptp_ocp_detach()
pins resources are freed before ptp_clock_unregister() and it leads to
use-after-free during driver removal. Fix it by changing the order of
free/unregister calls. To avoid irq handler running on the other core
while ptp device unregistering, call synchronize_irq() after HW is
configured to stop producing irqs and no irqs are in-flight.
📍 영향받는 시스템
Linux kernel (ptp: ocp driver 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 드라이버 제거 프로세스를 유도하여 메모리 오류를 일으킴
🛡️ 대응 방법
커널 패치(Commit a60fc3294a37 적용 버전)를 통해 리소스 해제 및 unregister 순서 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인