🇰🇷 한글 설명
Linux 커널의 airoha 네트워크 드라이버에서 metadata_dst 구조체를 해제할 때 RCU grace period를 무시하고 즉시 kfree()를 호출하여 발생하는 Use-After-Free 취약점입니다. 이로 인해 skb가 해당 포인터를 참조하고 있는 동안 메모리가 해제되어 시스템 불안정이나 권한 상승이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 데이터를 처리하는 과정에서 사용 중인 메모리를 너무 빨리 삭제해버리는 오류가 발견되었습니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템을 조작할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: airoha: Fix use-after-free in metadata dst teardown
airoha_metadata_dst_free() runs metadata_dst_free() which frees the
metadata_dst with kfree() immediately, bypassing the RCU grace period.
In the RX path, skb_dst_set_noref() sets a non-refcounted pointer from
the skb to the metadata_dst. This function requires RCU read-side
protection and the dst must remain valid until all RCU readers complete.
Since metadata_dst_free() calls kfree() directly, an use-after-free can
occur if any skb still holds a noref pointer to the dst when the driver
tears it down.
Replace metadata_dst_free() with dst_release() which properly goes
through the refcount path: when the refcount drops to zero, it schedules
the actual free via call_rcu_hurry(), ensuring all RCU readers have
completed before the memory is freed.
📍 영향받는 시스템
Linux kernel (airoha network driver 포함 버전)
⚔️ 공격 벡터
네트워크 패킷 처리 과정에서 특정 타이밍에 발생하는 Race Condition을 이용한 메모리 참조 공격
🛡️ 대응 방법
metadata_dst_free() 대신 RCU 보호를 지원하는 dst_release()를 사용하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 보안 패치 버전인지 확인