CVE-2021-46992: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: netfilter: nftables: avoid overflows in nft_hash_buckets() Number of buckets being stored in 32bit variables, we have to ensure that no overflows occur in nft_hash_buckets() 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: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327 __roundup_pow_of_two include/linux/log2.h:57 [inline] nft_hash_buckets net/netfilter/nft_set_hash.c:411 [inline] nft_hash_estimate.cold+0x19/0x1e net/netfilter/nft_set_hash.c:652 nft_select_set_ops net/netfilter/nf_tables_api.c:3586 [inline] nf_tables_newset+0xe62/0x3110 net/netfilter/nf_tables_api.c:4322 nfnetlink_rcv_batch+0xa09/0x24b0 net/netfilter/nfnetlink.c:488 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:612 [inline] nfnetlink_rcv+0x3af/0x420 net/netfilter/nfnetlink.c:630 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
AI Analysis
Technical Summary
CVE-2021-46992 is a vulnerability found in the Linux kernel's netfilter nftables subsystem, specifically within the nft_hash_buckets() function. The issue arises due to improper handling of the number of hash buckets, which are stored in 32-bit variables without adequate overflow checks. This can lead to integer overflow conditions when large values are processed, as demonstrated by the syzbot fuzzing tool injecting a size value of 0x40000000 (1,073,741,824). The overflow causes undefined behavior, including a shift-out-of-bounds error detected by the Undefined Behavior Sanitizer (UBSAN) in the kernel's log2.h implementation. The vulnerability is rooted in the calculation of hash bucket sizes, where the shift exponent exceeds the limits of a 64-bit unsigned long integer, potentially leading to memory corruption or kernel crashes. The call trace indicates that the flaw occurs during the creation of new nftables sets via netfilter's nf_tables_api, triggered by netlink socket messages. Although no known exploits are reported in the wild, the vulnerability could be triggered by a local or remote attacker with the ability to send crafted netlink messages to the kernel's netfilter subsystem. This could result in denial of service (kernel panic) or potentially escalate to arbitrary code execution if exploited with additional conditions. The vulnerability affects Linux kernel versions prior to the patch that introduced proper overflow checks in nft_hash_buckets().
Potential Impact
For European organizations, this vulnerability poses a significant risk to systems running vulnerable Linux kernel versions, especially those utilizing nftables for firewalling and network packet filtering. Many European enterprises, government agencies, and critical infrastructure providers rely on Linux-based servers and network appliances. Exploitation could lead to denial of service, disrupting business operations, critical services, or network security enforcement. In worst-case scenarios, if combined with other vulnerabilities, it could allow privilege escalation or remote code execution, compromising confidentiality and integrity of sensitive data. The impact is heightened in environments with exposed netlink interfaces or where untrusted users have local access. Given the widespread deployment of Linux in cloud infrastructure, data centers, and embedded devices across Europe, the vulnerability could affect a broad range of sectors including finance, healthcare, telecommunications, and public administration.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to the latest patched versions that address CVE-2021-46992. Specifically, apply vendor-supplied kernel updates or backported patches that fix the overflow checks in nft_hash_buckets(). Additionally, organizations should audit their use of nftables and netfilter configurations to minimize exposure to untrusted netlink messages. Restrict local user privileges to prevent unauthorized access to netlink sockets. Employ kernel hardening techniques such as enabling kernel lockdown modes and using security modules like SELinux or AppArmor to limit the impact of potential exploitation. Monitoring kernel logs for unusual netlink activity or kernel warnings related to nftables can provide early detection. For cloud environments, ensure that virtual machines and containers run updated kernels and that network namespaces are properly isolated. Finally, conduct penetration testing and vulnerability scanning focused on netfilter components to verify remediation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2021-46992: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: netfilter: nftables: avoid overflows in nft_hash_buckets() Number of buckets being stored in 32bit variables, we have to ensure that no overflows occur in nft_hash_buckets() 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: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327 __roundup_pow_of_two include/linux/log2.h:57 [inline] nft_hash_buckets net/netfilter/nft_set_hash.c:411 [inline] nft_hash_estimate.cold+0x19/0x1e net/netfilter/nft_set_hash.c:652 nft_select_set_ops net/netfilter/nf_tables_api.c:3586 [inline] nf_tables_newset+0xe62/0x3110 net/netfilter/nf_tables_api.c:4322 nfnetlink_rcv_batch+0xa09/0x24b0 net/netfilter/nfnetlink.c:488 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:612 [inline] nfnetlink_rcv+0x3af/0x420 net/netfilter/nfnetlink.c:630 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
AI-Powered Analysis
Technical Analysis
CVE-2021-46992 is a vulnerability found in the Linux kernel's netfilter nftables subsystem, specifically within the nft_hash_buckets() function. The issue arises due to improper handling of the number of hash buckets, which are stored in 32-bit variables without adequate overflow checks. This can lead to integer overflow conditions when large values are processed, as demonstrated by the syzbot fuzzing tool injecting a size value of 0x40000000 (1,073,741,824). The overflow causes undefined behavior, including a shift-out-of-bounds error detected by the Undefined Behavior Sanitizer (UBSAN) in the kernel's log2.h implementation. The vulnerability is rooted in the calculation of hash bucket sizes, where the shift exponent exceeds the limits of a 64-bit unsigned long integer, potentially leading to memory corruption or kernel crashes. The call trace indicates that the flaw occurs during the creation of new nftables sets via netfilter's nf_tables_api, triggered by netlink socket messages. Although no known exploits are reported in the wild, the vulnerability could be triggered by a local or remote attacker with the ability to send crafted netlink messages to the kernel's netfilter subsystem. This could result in denial of service (kernel panic) or potentially escalate to arbitrary code execution if exploited with additional conditions. The vulnerability affects Linux kernel versions prior to the patch that introduced proper overflow checks in nft_hash_buckets().
Potential Impact
For European organizations, this vulnerability poses a significant risk to systems running vulnerable Linux kernel versions, especially those utilizing nftables for firewalling and network packet filtering. Many European enterprises, government agencies, and critical infrastructure providers rely on Linux-based servers and network appliances. Exploitation could lead to denial of service, disrupting business operations, critical services, or network security enforcement. In worst-case scenarios, if combined with other vulnerabilities, it could allow privilege escalation or remote code execution, compromising confidentiality and integrity of sensitive data. The impact is heightened in environments with exposed netlink interfaces or where untrusted users have local access. Given the widespread deployment of Linux in cloud infrastructure, data centers, and embedded devices across Europe, the vulnerability could affect a broad range of sectors including finance, healthcare, telecommunications, and public administration.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to the latest patched versions that address CVE-2021-46992. Specifically, apply vendor-supplied kernel updates or backported patches that fix the overflow checks in nft_hash_buckets(). Additionally, organizations should audit their use of nftables and netfilter configurations to minimize exposure to untrusted netlink messages. Restrict local user privileges to prevent unauthorized access to netlink sockets. Employ kernel hardening techniques such as enabling kernel lockdown modes and using security modules like SELinux or AppArmor to limit the impact of potential exploitation. Monitoring kernel logs for unusual netlink activity or kernel warnings related to nftables can provide early detection. For cloud environments, ensure that virtual machines and containers run updated kernels and that network namespaces are properly isolated. Finally, conduct penetration testing and vulnerability scanning focused on netfilter components to verify remediation.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-02-27T18:42:55.949Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9834c4522896dcbe99dc
Added to database: 5/21/2025, 9:09:08 AM
Last enriched: 6/30/2025, 6:54:32 PM
Last updated: 7/11/2025, 4:21:05 AM
Views: 6
Related Threats
CVE-2025-7558: SQL Injection in code-projects Voting System
MediumCVE-2025-7557: SQL Injection in code-projects Voting System
MediumCVE-2025-7556: SQL Injection in code-projects Voting System
MediumCVE-2025-7555: SQL Injection in code-projects Voting System
MediumCVE-2025-7554: Cross Site Scripting in Sapido RB-1802
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.