Skip to main content

CVE-2021-47548: Vulnerability in Linux Linux

Critical
VulnerabilityCVE-2021-47548cvecve-2021-47548
Published: Fri May 24 2024 (05/24/2024, 15:09:52 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port() The if statement: if (port >= DSAF_GE_NUM) return; limits the value of port less than DSAF_GE_NUM (i.e., 8). However, if the value of port is 6 or 7, an array overflow could occur: port_rst_off = dsaf_dev->mac_cb[port]->port_rst_off; because the length of dsaf_dev->mac_cb is DSAF_MAX_PORT_NUM (i.e., 6). To fix this possible array overflow, we first check port and if it is greater than or equal to DSAF_MAX_PORT_NUM, the function returns.

AI-Powered Analysis

AILast updated: 07/03/2025, 05:25:49 UTC

Technical Analysis

CVE-2021-47548 is a critical vulnerability found in the Linux kernel's ethernet driver for HiSilicon hardware, specifically within the hns_dsaf_misc component. The flaw is an array overflow caused by improper bounds checking on the 'port' variable in the function hns_dsaf_ge_srst_by_port(). The code initially checks if the port value is greater than or equal to DSAF_GE_NUM (which is 8) and returns early to prevent out-of-bounds access. However, the array dsaf_dev->mac_cb has a length defined by DSAF_MAX_PORT_NUM (which is 6). If the port value is 6 or 7, the code proceeds to access dsaf_dev->mac_cb[port], resulting in an out-of-bounds array access. This can lead to memory corruption, potentially allowing an attacker to execute arbitrary code, cause denial of service, or escalate privileges. The vulnerability is classified under CWE-129 (Improper Validation of Array Index). The fix involves adding an additional check to ensure the port value is less than DSAF_MAX_PORT_NUM before accessing the array, preventing the overflow. The vulnerability has a CVSS 3.1 score of 9.8 (critical), indicating it is remotely exploitable without authentication or user interaction, and impacts confidentiality, integrity, and availability. No known exploits are currently reported in the wild, but the severity and nature of the flaw make it a high-risk issue for affected Linux systems running on HiSilicon ethernet hardware.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for those using Linux-based systems with HiSilicon network interface hardware, which is common in certain enterprise and telecom environments. Exploitation could allow attackers to execute arbitrary code at the kernel level, leading to full system compromise, data breaches, or disruption of critical network services. This could affect data confidentiality, integrity, and availability, impacting sectors such as telecommunications, cloud service providers, and enterprises relying on Linux servers for networking. Given the critical CVSS score and the kernel-level nature of the flaw, exploitation could facilitate lateral movement within networks, persistent access, or denial of service attacks, potentially disrupting business operations and critical infrastructure. The absence of known exploits in the wild provides a window for proactive patching, but the vulnerability's severity demands immediate attention to prevent future attacks.

Mitigation Recommendations

European organizations should prioritize the following mitigation steps: 1) Identify and inventory Linux systems using HiSilicon ethernet hardware, particularly those running kernel versions containing the vulnerable code. 2) Apply the official Linux kernel patches that fix CVE-2021-47548 as soon as they are available from trusted sources or Linux distribution vendors. 3) If immediate patching is not possible, consider isolating affected systems from untrusted networks to reduce exposure. 4) Implement network-level monitoring for unusual traffic patterns or kernel-level anomalies that could indicate exploitation attempts. 5) Employ kernel integrity monitoring tools to detect unauthorized modifications or memory corruption. 6) Regularly update and audit network device drivers and firmware to ensure all components are up to date. 7) Educate system administrators about the specific nature of this vulnerability to improve detection and response capabilities. These targeted actions go beyond generic advice by focusing on hardware-specific identification, patch prioritization, and layered defense strategies.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-24T15:02:54.829Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe9429

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

Last enriched: 7/3/2025, 5:25:49 AM

Last updated: 8/14/2025, 1:15:20 AM

Views: 23

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