CVE-2021-46992: netfilter: nftables: avoid overflows in nft_hash_buckets()

Published Feb 28, 2024
·
Updated

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

6 affected components
Linux Linux kernel>=4.9<4.14.233
Linux Linux kernel>=4.15<4.19.191
Linux Linux kernel>=4.20<5.4.120
Linux Linux kernel>=5.5<5.10.38
Linux Linux kernel>=5.11<5.11.22
Linux Linux kernel>=5.12<5.12.5

Event History

Feb 28, 2024
CVE Published
via MITRE·08:13 AM
Data Sourced
via MITRE·08:13 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203