🔍 CVE-2021-47515

7.5
CVSS Score
HIGH
2024-05-24
2026-08-04 10:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 Segment Routing IPv6(SRv6) 구현 중 IPv4 패킷을 IPv6+SRH로 캡슐화할 때 IPv6 소켓 제어 블록을 초기화하면서 수신 인터페이스 인덱스 정보가 손실되는 취약점입니다. 이로 인해 특정 조건에서 NULL 포인터 역참조가 발생하여 시스템이 충돌할 수 있습니다.

💡 쉬운 설명

네트워크 패킷을 처리하는 과정에서 중요한 정보가 실수로 지워져 컴퓨터가 길을 잃고 멈춰버리는 오류입니다. 공격자가 특수한 패킷을 보내 시스템을 강제로 종료시킬 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: seg6: fix the iif in the IPv6 socket control block When an IPv4 packet is received, the ip_rcv_core(...) sets the receiving interface index into the IPv4 socket control block (v5.16-rc4, net/ipv4/ip_input.c line 510): IPCB(skb)->iif = skb->skb_iif; If that IPv4 packet is meant to be encapsulated in an outer IPv6+SRH header, the seg6_do_srh_encap(...) performs the required encapsulation. In this case, the seg6_do_srh_encap function clears the IPv6 socket control block (v5.16-rc4 net/ipv6/seg6_iptunnel.c line 163): memset(IP6CB(skb), 0, sizeof(*IP6CB(skb))); The memset(...) was introduced in commit ef489749aae5 ("ipv6: sr: clear IP6CB(skb) on SRH ip4ip6 encapsulation") a long time ago (2019-01-29). Since the IPv6 socket control block and the IPv4 socket control block share the same memory area (skb->cb), the receiving interface index info is lost (IP6CB(skb)->iif is set to zero). As a side effect, that condition triggers a NULL pointer dereference if commit 0857d6f8c759 ("ipv6: When forwarding count rx stats on the orig netdev") is applied. To fix that issue, we set the IP6CB(skb)->iif with the index of the receiving interface once again.

📍 영향받는 시스템

Linux kernel v5.16-rc4 및 관련 SRv6 기능이 활성화된 시스템

⚔️ 공격 벡터

특수하게 조작된 IPv4 패킷을 SRv6 캡슐화가 적용된 네트워크 인터페이스로 전송

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel