🇰🇷 한글 설명
Linux 커널의 BPF 테스트 인프라에서 잘못된 GSO(Generic Segmentation Offload) 유형을 생성하여 스택으로 전달할 수 있는 취약점이 발견되었습니다. BPF 프로그램이 bpf_clone_redirect()를 통해 패킷을 루프백 장치로 보낼 때 GSO 속성이 불완전하게 설정되어 경고가 발생하고 기능이 비활성화되는 문제가 있었습니다.
💡 쉬운 설명
리눅스 시스템의 특정 기능을 사용할 때, 네트워크 패킷의 형식이 잘못 만들어져 시스템이 이를 비정상적인 것으로 인식하는 문제입니다. 이로 인해 네트워크 성능을 높여주는 기능이 의도치 않게 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Do not let BPF test infra emit invalid GSO types to stack
Yinhao et al. reported that their fuzzer tool was able to trigger a
skb_warn_bad_offload() from netif_skb_features() -> gso_features_check().
When a BPF program - triggered via BPF test infra - pushes the packet
to the loopback device via bpf_clone_redirect() then mentioned offload
warning can be seen. GSO-related features are then rightfully disabled.
We get into this situation due to convert___skb_to_skb() setting
gso_segs and gso_size but not gso_type. Technically, it makes sense
that this warning triggers since the GSO properties are malformed due
to the gso_type. Potentially, the gso_type could be marked non-trustworthy
through setting it at least to SKB_GSO_DODGY without any other specific
assumptions, but that also feels wrong given we should not go further
into the GSO engine in the first place.
The checks were added in 121d57af308d ("gso: validate gso_type in GSO
handlers") because there were malicious (syzbot) senders that combine
a protocol with a non-matching gso_type. If we would want to drop such
packets, gso_features_check() currently only returns feature flags via
netif_skb_features(), so one location for potentially dropping such skbs
could be validate_xmit_unreadable_skb(), but then otoh it would be
an additional check in the fast-path for a very corner case. Given
bpf_clone_redirect() is the only place where BPF test infra could emit
such packets, lets reject them right there.
📍 영향받는 시스템
Linux Kernel (BPF test infra를 사용하는 환경)
⚔️ 공격 벡터
BPF 프로그램을 통해 조작된 GSO 유형을 가진 패킷을 루프백 장치로 리다이렉션하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인하십시오.