🇰🇷 한글 설명
Linux 커널의 net 서브시스템에서 AF_PACKET 소켓의 패킷 처리 방식 오류로 인해 발생하는 취약점입니다. 특정 조건에서 타임스탬프 처리 과정 중 잘못된 메모리 영역을 참조하여 커널 힙의 인접 데이터를 노출하거나 hardened usercopy를 트리거할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 네트워크 처리 과정에서 데이터가 저장된 위치를 잘못 판단하여, 시스템의 중요한 내부 정보를 외부로 유출할 수 있는 결함입니다. 공격자가 이를 이용하면 컴퓨터 메모리에 숨겨진 민감한 정보를 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: guard timestamp cmsgs to real error queue skbs
skb_is_err_queue() treats PACKET_OUTGOING as the sole marker for an skb
from sk_error_queue. That assumption is not true for AF_PACKET sockets:
outgoing packet taps are also delivered to packet sockets with
skb->pkt_type == PACKET_OUTGOING, but their skb->cb is owned by AF_PACKET
instead of struct sock_exterr_skb.
If such an skb is received with timestamping enabled, the generic
timestamp cmsg path can read AF_PACKET control-buffer state as
sock_exterr_skb::opt_stats. With SO_RXQ_OVFL enabled, the packet drop
counter overlaps opt_stats. An odd drop count makes the path emit
SCM_TIMESTAMPING_OPT_STATS with skb->len and skb->data. For non-linear
skbs this copies past the linear head and can trigger hardened usercopy or
disclose adjacent heap contents.
Keep skb_is_err_queue() local to net/socket.c, but make it verify that
the PACKET_OUTGOING marker is paired with the sock_rmem_free destructor
installed by sock_queue_err_skb(). AF_PACKET receive skbs use normal
receive ownership and no longer pass as error-queue skbs, while legitimate
sk_error_queue entries keep the PACKET_OUTGOING marker and sock_rmem_free
ownership.
📍 영향받는 시스템
Linux Kernel (AF_PACKET 소켓을 사용하는 시스템)
⚔️ 공격 벡터
AF_PACKET 소켓을 통해 조작된 패킷을 전송하여 타임스탬프 처리 로직의 메모리 읽기 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인