🇰🇷 한글 설명
Linux 커널의 netfilter 구성 요소 중 nft_payload에서 부분 필드 오프로드 시 마스크 생성 오류가 발생합니다. IPv6 주소와 같이 특정 비트 길이만 매칭할 때 32비트 정수 범위를 초과하는 시프트 연산이 발생하여 정의되지 않은 동작을 유발하고, 마스크가 실제 매칭 범위보다 넓게 설정되는 취약점입니다.
💡 쉬운 설명
네트워크 필터링 규칙을 처리할 때 특정 데이터만 골라내야 하는데, 계산 오류로 인해 엉뚱한 데이터까지 포함하여 검사하게 되는 문제입니다. 이로 인해 보안 규칙이 의도치 않게 작동하거나 시스템 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_payload: fix mask build for partial field offload
nft_payload_offload_mask() builds the offload match mask for a payload
expression that covers only part of a header field. For a partial IPv6
address match (field_len = 16, priv_len = 1) that shift is 1 << 120, which
is undefined on the 32-bit int operand. It also trims only one word, so
the remaining words stay 0xffffffff (and when priv_len is a multiple of 4
the trim is skipped entirely), leaving the mask covering more bytes than
the rule matches.
UBSAN: shift-out-of-bounds in net/netfilter/nft_payload.c:278:20
shift exponent 120 is too large for 32-bit type 'int'
...
The match is byte-granular and struct nft_data is zero-initialised, so the
correct mask is simply the first priv_len bytes set to 0xff. Set those
bytes directly and drop the word/shift trimming; this removes the undefined
shift and no longer over-masks the trailing bytes.
📍 영향받는 시스템
Linux Kernel (netfilter/nft_payload 모듈 사용 시스템)
⚔️ 공격 벡터
조작된 네트워크 패킷을 통해 특정 조건의 nftables 규칙을 트리거하여 커널 내 정의되지 않은 동작 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인