CVE-2026-46101: netfilter: reject zero shift in nft_bitwise
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-46101 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.6 with commit 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 and fixed in 6.6.140 with commit bffef0acec9c3b837a785248a893137fb7f26c95 Issue introduced in 5.6 with commit 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 and fixed in 6.12.86 with commit ca24f1243ad1a4d12d6a23876bbbe3ed02099853 Issue introduced in 5.6 with commit 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 and fixed in 6.18.27 with commit 6f820139d16a4c9865a145d4a9cf9c92cc632c14 Issue introduced in 5.6 with commit 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 and fixed in 7.0.4 with commit f370205974f171a5868c13ff30d7642fed46e47b Issue introduced in 5.6 with commit 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 and fixed in 7.1-rc2 with commit fe11e5c40817b84abaa5d83bfb6586d8412bfd07
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-46101
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/netfilter/nft_bitwise.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/bffef0acec9c3b837a785248a893137fb7f26c95 https://git.kernel.org/stable/c/ca24f1243ad1a4d12d6a23876bbbe3ed02099853 https://git.kernel.org/stable/c/6f820139d16a4c9865a145d4a9cf9c92cc632c14 https://git.kernel.org/stable/c/f370205974f171a5868c13ff30d7642fed46e47b https://git.kernel.org/stable/c/fe11e5c40817b84abaa5d83bfb6586d8412bfd07