🇰🇷 한글 설명
리눅스 커널의 lwt_bpf 구성 요소에서 LWT_XMIT BPF 프로그램이 skb 헤드룸을 수정할 때 발생하는 취약점입니다. 기존의 헤드룸 재검사 로직이 하드웨어 헤더 길이만을 사용하여, 캐시된 헤더를 사용하는 경로에서 헤드룸 부족으로 인해 패킷이 드롭되는 문제가 발생합니다.
💡 쉬운 설명
네트워크 데이터를 처리하는 과정에서 데이터의 여유 공간을 계산하는 방식이 잘못되어, 정상적인 데이터임에도 불구하고 시스템이 이를 오류로 판단하여 버리는 문제입니다. 이는 네트워크 통신 성능 저하나 연결 끊김을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
lwt_bpf: Restore reserved headroom after xmit program
ip_finish_output2() expands an skb to LL_RESERVED_SPACE(dev) before LWT
xmit. An LWT_XMIT BPF program can then modify the skb head and still
return BPF_OK, so bpf_xmit() rechecks the remaining headroom before the
skb continues to neighbour output.
That recheck uses dst->dev->hard_header_len. This is not enough for the
neighbour cached-header path: neigh_hh_output() copies the cached hardware
header using the aligned hh_cache size, HH_DATA_MOD for short headers or
HH_DATA_ALIGN(hh_len) otherwise.
On Ethernet, hard_header_len is 14 but the cached copy needs 16 bytes. If
an LWT_XMIT BPF program calls bpf_skb_change_head(skb, 1, 0), the skb can
still have 15 bytes of headroom after the program. The existing check
accepts that, after which neigh_hh_output() hits its headroom warning and
drops the skb.
Use LL_RESERVED_SPACE(dst->dev) in the post-BPF headroom check to match
the reservation made before LWT xmit.
📍 영향받는 시스템
Linux Kernel (LWT_XMIT BPF 사용 환경)
⚔️ 공격 벡터
LWT_XMIT BPF 프로그램을 통해 skb 헤드룸을 조작하여 패킷 드롭 유도
🛡️ 대응 방법
LL_RESERVED_SPACE(dst->dev)를 사용하여 헤드룸 검사 로직을 수정하는 최신 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인