🇰🇷 한글 설명
Linux 커널의 net/sched: act_skbmod 구성 요소에서 헤더 길이 계산 오류로 인해 발생하는 취약점입니다. TC ingress 환경에서 잘못된 헤더 길이를 참조하거나 불필요하게 큰 메모리 공간을 요청하여 유효한 패킷이 드롭되거나 경고가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 데이터를 처리하는 과정에서 데이터의 길이를 잘못 계산하여 정상적인 인터넷 신호를 차단하거나 시스템에 오류 경고를 발생시키는 문제입니다. 이로 인해 네트워크 연결이 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: act_skbmod: fix length calculations and avoid invalid header warnings
syzbot reported a warning in skb_network_header_len() triggered
by tcf_skbmod_act():
!skb_transport_header_was_set(skb)
WARNING: CPU: 0 PID: 14949 at include/linux/skbuff.h:3243 skb_network_header_len include/linux/skbuff.h:3243 [inline]
WARNING: CPU: 0 PID: 14949 at net/sched/act_skbmod.c:55 tcf_skbmod_act+0xfe8/0x1810 net/sched/act_skbmod.c:55
There are a few issues in tcf_skbmod_act():
1. Calling skb_network_header_len() assumes skb->transport_header is set,
which is not guaranteed when tcf_skbmod_act() runs at TC ingress.
2. Unconditionally calling skb_mac_header_len() at the beginning of
tcf_skbmod_act() triggers a warning on L3 devices (e.g. TUN) where the
MAC header is unset, evaluating to an underflowed garbage length.
3. On TC ingress, skb->data points to the network header. Adding the MAC
header length to the IP header length causes skb_ensure_writable() to
request more bytes than the actual IP packet length, dropping valid
short packets (e.g. 28-byte UDP/IPv4 packets).
Fix these by:
- Using skb_network_offset(skb) + sizeof(struct iphdr/ipv6hdr) for
SKBMOD_F_ECN so that the required length is correctly calculated on
both ingress (offset == 0) and egress (offset == mac_len).
- Setting max_edit_len to ETH_HLEN for Ethernet header modifications
after validating ARPHRD_ETHER.
📍 영향받는 시스템
Linux Kernel (act_skbmod 모듈을 사용하는 버전)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 TC ingress 인터페이스로 전송하여 트리거
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인