🇰🇷 한글 설명
리눅스 커널의 skb_tunnel_info() 함수가 lwtstate->data를 반환할 때 적절한 검증을 수행하지 않아 발생하는 취약점입니다. 이로 인해 서로 호환되지 않는 데이터 타입이 처리될 경우 메모리 경계 외 읽기(out-of-bounds read)가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 데이터를 처리하는 과정에서 데이터의 종류를 제대로 확인하지 않아, 잘못된 메모리 영역을 읽어 시스템 오류를 일으킬 수 있는 문제입니다. 이는 시스템의 안정성을 해치거나 비정상적인 동작을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: validate lwtstate->data before returning from skb_tunnel_info()
skb_tunnel_info() returns pointer of lwtstate->data as ip_tunnel_info
type without validation. lwtstate->data can have various types such as
mpls_iptunnel_encap, etc and these are not compatible.
So skb_tunnel_info() should validate before returning that pointer.
Splat looks like:
BUG: KASAN: slab-out-of-bounds in vxlan_get_route+0x418/0x4b0 [vxlan]
Read of size 2 at addr ffff888106ec2698 by task ping/811
CPU: 1 PID: 811 Comm: ping Not tainted 5.13.0+ #1195
Call Trace:
dump_stack_lvl+0x56/0x7b
print_address_description.constprop.8.cold.13+0x13/0x2ee
? vxlan_get_route+0x418/0x4b0 [vxlan]
? vxlan_get_route+0x418/0x4b0 [vxlan]
kasan_report.cold.14+0x83/0xdf
? vxlan_get_route+0x418/0x4b0 [vxlan]
vxlan_get_route+0x418/0x4b0 [vxlan]
[ ... ]
vxlan_xmit_one+0x148b/0x32b0 [vxlan]
[ ... ]
vxlan_xmit+0x25c5/0x4780 [vxlan]
[ ... ]
dev_hard_start_xmit+0x1ae/0x6e0
__dev_queue_xmit+0x1f39/0x31a0
[ ... ]
neigh_xmit+0x2f9/0x940
mpls_xmit+0x911/0x1600 [mpls_iptunnel]
lwtunnel_xmit+0x18f/0x450
ip_finish_output2+0x867/0x2040
[ ... ]
📍 영향받는 시스템
Linux kernel version 5.13.0 및 이전 버전 (vxlan 모듈 사용 시)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 전송하여 커널의 메모리 경계 외 읽기를 유도함
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 skb_tunnel_info()의 검증 로직을 적용함
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전(5.13.x 이후의 수정 버전)인지 확인합니다.