CVE-2021-47080 in Linux
Summary
by MITRE • 03/02/2024
In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Prevent divide-by-zero error triggered by the user
The user_entry_size is supplied by the user and later used as a denominator to calculate number of entries. The zero supplied by the user will trigger the following divide-by-zero error:
divide error: 0000 [#1] SMP KASAN PTI
CPU: 4 PID: 497 Comm: c_repro Not tainted 5.13.0-rc1+ #281 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:ib_uverbs_handler_UVERBS_METHOD_QUERY_GID_TABLE+0x1b1/0x510 Code: 87 59 03 00 00 e8 9f ab 1e ff 48 8d bd a8 00 00 00 e8 d3 70 41 ff 44 0f b7 b5 a8 00 00 00 e8 86 ab 1e ff 31 d2 4c 89 f0 31 ff f7 f5 48 89 d6 48 89 54 24 10 48 89 04 24 e8 1b ad 1e ff 48 8b RSP: 0018:ffff88810416f828 EFLAGS: 00010246 RAX: 0000000000000008 RBX: 1ffff1102082df09 RCX: ffffffff82183f3d RDX: 0000000000000000 RSI: ffff888105f2da00 RDI: 0000000000000000 RBP: ffff88810416fa98 R08: 0000000000000001 R09: ffffed102082df5f R10: ffff88810416faf7 R11: ffffed102082df5e R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000008 R15: ffff88810416faf0 FS: 00007f5715efa740(0000) GS:ffff88811a700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000840 CR3: 000000010c2e0001 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? ib_uverbs_handler_UVERBS_METHOD_INFO_HANDLES+0x4b0/0x4b0 ib_uverbs_cmd_verbs+0x1546/0x1940 ib_uverbs_ioctl+0x186/0x240 __x64_sys_ioctl+0x38a/0x1220 do_syscall_64+0x3f/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 06/19/2025
The vulnerability CVE-2021-47080 represents a critical divide-by-zero error within the Linux kernel's RDMA/core subsystem, specifically affecting the ib_uverbs_handler_UVERBS_METHOD_QUERY_GID_TABLE function. This flaw occurs when user-supplied data is directly utilized as a denominator in arithmetic calculations without proper validation, creating a potential crash condition that can be exploited to cause system instability. The issue manifests in the context of InfiniBand user verbs interface where applications interact with RDMA hardware through kernel interfaces, making it particularly concerning for high-performance computing environments and network infrastructure systems.
The technical implementation of this vulnerability stems from inadequate input validation within the kernel's RDMA driver component. When a user application submits a query for GID table information through the ib_uverbs interface, it provides a user_entry_size parameter that should represent the size of entries in the table. However, the kernel code fails to verify that this value is non-zero before using it as a divisor in calculations determining the number of entries to process. This oversight allows an attacker to craft malicious input with a zero value for user_entry_size, which when processed by the kernel's handler function triggers an immediate divide-by-zero exception, causing the kernel to crash and potentially leading to a system panic or denial of service condition.
The operational impact of CVE-2021-47080 extends beyond simple system crashes, as it can be leveraged to disrupt critical infrastructure services that rely on RDMA connectivity for high-speed data transfer operations. This vulnerability affects systems running Linux kernel versions prior to the patch release, particularly impacting data centers, high-performance computing clusters, and network equipment that utilize InfiniBand technology. The divide-by-zero condition can be triggered through legitimate user-space applications that interface with the RDMA subsystem, making it difficult to distinguish between legitimate usage and malicious exploitation attempts. From a cybersecurity perspective, this vulnerability aligns with CWE-369: Divide by Zero, which is classified under the weakness category of input validation and error handling issues.
Mitigation strategies for CVE-2021-47080 primarily involve applying the official kernel patches released by the Linux kernel development team, which implement proper input validation to prevent zero values from being used as divisors. System administrators should prioritize updating their kernel versions to patched releases, particularly those containing fixes for the RDMA subsystem. Additional protective measures include implementing proper access controls and monitoring for unusual patterns in RDMA interface usage, as well as employing intrusion detection systems that can identify potential exploitation attempts. The vulnerability also highlights the importance of robust input validation practices in kernel space code, aligning with ATT&CK technique T1068: Exploitation for Privilege Escalation, where improper error handling can lead to system instability and potential privilege escalation opportunities. Organizations should also consider implementing kernel hardening measures and regularly reviewing kernel security patches to maintain defense in depth against similar vulnerabilities.