CVE-2021-46992: netfilter: nftables: avoid overflows in nft_hash_buckets()
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftables: avoid overflows in nfthashbuckets()
Number of buckets being stored in 32bit variables, we have to ensure that no overflows occur in nfthashbuckets()
syzbot injected a size == 0x40000000 and reported:
UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 1 PID: 29539 Comm: syz-executor.4 Not tainted 5.12.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: dumpstack lib/dumpstack.c:79 [inline] dumpstack+0x141/0x1d7 lib/dumpstack.c:120 ubsanepilogue+0xb/0x5a lib/ubsan.c:148 ubsanhandleshiftoutofbounds.cold+0xb1/0x181 lib/ubsan.c:327 rounduppowoftwo include/linux/log2.h:57 [inline] nfthashbuckets net/netfilter/nftsethash.c:411 [inline] nfthashestimate.cold+0x19/0x1e net/netfilter/nftsethash.c:652 nftselectsetops net/netfilter/nftablesapi.c:3586 [inline] nftablesnewset+0xe62/0x3110 net/netfilter/nftablesapi.c:4322 nfnetlinkrcvbatch+0xa09/0x24b0 net/netfilter/nfnetlink.c:488 nfnetlinkrcvskbbatch net/netfilter/nfnetlink.c:612 [inline] nfnetlinkrcv+0x3af/0x420 net/netfilter/nfnetlink.c:630 netlinkunicastkernel net/netlink/afnetlink.c:1312 [inline] netlinkunicast+0x533/0x7d0 net/netlink/afnetlink.c:1338 netlinksendmsg+0x856/0xd90 net/netlink/afnetlink.c:1927 socksendmsgnosec net/socket.c:654 [inline] socksendmsg+0xcf/0x120 net/socket.c:674 syssendmsg+0x6e8/0x810 net/socket.c:2350 syssendmsg+0xf3/0x170 net/socket.c:2404 syssendmsg+0xe5/0x1b0 net/socket.c:2433 dosyscall64+0x2d/0x70 arch/x86/entry/common.c:46
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2021-46992?
CVE-2021-46992 is considered to have a medium severity level due to the potential for overflow issues in the Linux kernel.
How do I fix CVE-2021-46992?
To fix CVE-2021-46992, update your Linux kernel to a version that includes the patch for this vulnerability.
Which Linux kernel versions are affected by CVE-2021-46992?
CVE-2021-46992 affects Linux kernel versions from 4.9 up to 5.12.5.
What impact does CVE-2021-46992 have on system security?
CVE-2021-46992 can lead to potential overflow vulnerabilities that may compromise the integrity and security of the affected systems.
Is there a known exploit for CVE-2021-46992?
There are currently no widely known exploits for CVE-2021-46992, but it is advisable to apply patches to mitigate potential risks.