netfilter: reject zero shift in nft_bitwise
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 · < 6f820139d16a4c9865a145d4a9cf9c92cc632c14| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: reject zero shift in nft_bitwise
Reject zero shift operands for nft_bitwise left and right shift expressions during initialization.
The carry propagation logic computes the carry from the adjacent 32-bit word using BITS_PER_TYPE(u32) - shift. A zero shift operand turns this into a 32-bit shift, which is undefined behaviour.
Reject zero shift operands in the control plane, alongside the existing check for values greater than or equal to 32, so malformed rules never reach the packet path.
From the CVE record · Linux
The Linux kernel’s netfilter nft_bitwise expressions allow a zero shift operand, which can cause undefined behavior when a malformed rule reaches the packet path. Exploitation would require a rule with a zero shift operand; the input does not specify access requirements or user interaction.
Engineers running Linux kernels with netfilter nft_bitwise should check their kernel version; affected versions are not specified.