CVE-2026-74579: netfilter: nft_payload: fix mask build for partial field offload
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftpayload: fix mask build for partial field offload
nftpayloadoffloadmask() builds the offload match mask for a payload expression that covers only part of a header field. For a partial IPv6 address match (fieldlen = 16, privlen = 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 privlen 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/nftpayload.c:278:20 shift exponent 120 is too large for 32-bit type 'int' ...
The match is byte-granular and struct nftdata is zero-initialised, so the correct mask is simply the first privlen 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.