🇰🇷 한글 설명
Linux 커널의 ip6_gre 모듈에서, tc tunnel_key 액션으로 생성된 METADATA_IP_TUNNEL dst가 mirred를 통해 ip6erspan 장치로 전달될 때 출력 장치가 없는 dst를 라우트처럼 취급하여 NULL 포인터 역참조가 발생합니다. 이 문제는 오래된 ERSPAN PMTU 갱신 코드를 제거하는 방식으로 수정되었습니다.
💡 쉬운 설명
리눅스 커널의 가상 터널(ERSPAN) 처리 코드에 잘못된 메모리 접근 버그가 있어 시스템이 패닉으로 멈출 수 있습니다. 이미 다른 방식으로 대체된 오래된 코드를 삭제하여 문제를 해결했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ip6_gre: remove obsolete ERSPAN PMTU update
A tc tunnel_key action can attach a METADATA_IP_TUNNEL dst to an skb,
and mirred can redirect it to a native ip6erspan device. The legacy PMTU
update in ip6erspan_tunnel_xmit() treats that metadata dst as a route.
Since it has no output device, dst_dev(dst)->mtu dereferences NULL.
On v7.2 with KASAN, an initial UID/GID 65534 process with CapEff 0 used
self-created user and network namespaces to trigger:
KASAN: null-ptr-deref
RIP: ip6erspan_tunnel_xmit+0x10fc/0x2cc0
Kernel panic - not syncing: Fatal exception in interrupt
The update is obsolete. Commit fe1a4ca0a2b7 ("ip6_gre: process toobig
in a better way") changed IPv6 GRE Too Big handling to update the
underlay route and removed the equivalent block from __gre6_xmit().
ip6_tnl_xmit() then propagates the underlay PMTU to the overlay route.
Remove the stale ERSPAN copy and its now-unused dst variable. This
eliminates the metadata-dst dereference and keeps ERSPAN aligned with
IPv6 GRE PMTU handling.
📍 영향받는 시스템
패치가 적용되지 않은 Linux 커널 (v7.2 개발 버전에서 확인, ip6erspan 및 tc/mirred 사용 환경)
⚔️ 공격 벡터
로컬 비특권 사용자가 사용자/네트워크 네임스페이스를 생성한 뒤 tc tunnel_key와 mirred로 ip6erspan 장치에 패킷을 전달하여 커널 패닉을 유발
🛡️ 대응 방법
수정 커밋이 포함된 최신 Linux 커널로 업데이트하거나 배포판 보안 패치를 적용하고 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지 또는 수정 커밋(fe1a4ca0a2b7 이후 및 본 패치 포함) 적용 여부와 대조하여 패치 반영 여부를 판단하며, lsmod | grep ip6_gre 로 모듈 로드 여부도 함께 확인할 수 있습니다.