Skip to main content

CVE-2021-47404: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47404cvecve-2021-47404
Published: Tue May 21 2024 (05/21/2024, 15:03:58 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: HID: betop: fix slab-out-of-bounds Write in betop_probe Syzbot reported slab-out-of-bounds Write bug in hid-betopff driver. The problem is the driver assumes the device must have an input report but some malicious devices violate this assumption. So this patch checks hid_device's input is non empty before it's been used.

AI-Powered Analysis

AILast updated: 06/30/2025, 12:27:01 UTC

Technical Analysis

CVE-2021-47404 is a vulnerability identified in the Linux kernel's HID (Human Interface Device) subsystem, specifically within the betop driver (hid-betopff). The issue arises from an assumption in the driver code that any connected device must have an input report. However, some maliciously crafted devices can violate this assumption by not providing an input report. This leads to a slab-out-of-bounds write vulnerability during the probe phase of the device initialization (betop_probe function). The vulnerability was discovered and reported by Syzbot, an automated kernel fuzzing tool. The root cause is that the driver attempts to access and write to memory regions without verifying that the input report data exists, which can corrupt kernel memory. The fix involves adding a check to ensure that the hid_device's input report is non-empty before it is accessed or used, preventing out-of-bounds memory writes. This vulnerability affects certain versions of the Linux kernel identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and was published on May 21, 2024. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with the affected betop HID driver enabled. The impact includes potential kernel memory corruption, which can lead to system instability, crashes (denial of service), or potentially privilege escalation if exploited by a malicious device. Since the attack vector requires physical or logical access to connect a malicious HID device, the threat is more relevant in environments where USB or HID devices are frequently connected, such as corporate desktops, laptops, or embedded Linux systems. Industrial control systems or IoT devices running Linux kernels with this driver could also be at risk. The confidentiality, integrity, and availability of affected systems could be compromised if an attacker leverages this vulnerability to execute arbitrary code in kernel space or cause system failures. However, the lack of known exploits and the requirement for device connection reduce the immediacy of the threat. Still, organizations with high security requirements or those in sensitive sectors should consider this vulnerability seriously.

Mitigation Recommendations

European organizations should take the following specific actions: 1) Identify and inventory all Linux systems running kernels with the affected betop driver, focusing on versions around the specified commit hash. 2) Apply the official Linux kernel patches that include the fix for CVE-2021-47404 as soon as they are available and tested. 3) Implement strict device control policies to restrict or monitor the connection of USB and HID devices, especially in sensitive environments, to prevent unauthorized or malicious devices from being connected. 4) Use kernel hardening features such as Kernel Address Space Layout Randomization (KASLR) and SELinux/AppArmor to limit the impact of potential kernel exploits. 5) Monitor system logs and kernel messages for unusual HID device activity or errors related to the betop driver. 6) For embedded or IoT devices, coordinate with vendors to ensure firmware updates include the patched kernel. 7) Educate IT staff and users about the risks of connecting untrusted devices to corporate systems.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T14:58:30.816Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe9030

Added to database: 5/21/2025, 9:09:07 AM

Last enriched: 6/30/2025, 12:27:01 PM

Last updated: 7/26/2025, 10:25:46 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats