CVE-2021-47548
ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port()
Check your servers for CVE-2021-47548
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47548 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.36%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 72.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 5 Jun 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-129 Improper Validation of Array Index
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before 948968f8747650447c8f21c9fdba0e1973be040b affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before abbd5faa0748d0aa95d5191d56ff7a17a6275bd1 affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before dd07f8971b81ad98cc754b179b331b57f35aa1ff affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before 99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before 22519eff7df2d88adcc2568d86046ce1e2b52803 affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before fc7ffa7f10b9454a86369405d9814bf141b30627 affected from 850bfa3b78ea8849fef78ed74f5f2ccf947db0ca, before a66998e0fbf213d47d02813b9679426129d0d114
Other versions: unaffected
|
| Linux |
affected 4.7 unaffected before 4.7 unaffected from 4.9.292 up to and including 4.9.* unaffected from 4.14.257 up to and including 4.14.* unaffected from 4.19.220 up to and including 4.19.* unaffected from 5.4.164 up to and including 5.4.* unaffected from 5.10.84 up to and including 5.10.* unaffected from 5.15.7 up to and including 5.15.* unaffected 5.16 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47548 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47548
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-47548
trivy image --scanners vuln IMAGE | grep CVE-2021-47548
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/948968f8747650447c8f21c9fdba0e1973be040b git.kernel.org
- https://git.kernel.org/stable/c/abbd5faa0748d0aa95d5191d56ff7a17a6275bd1 git.kernel.org
- https://git.kernel.org/stable/c/dd07f8971b81ad98cc754b179b331b57f35aa1ff git.kernel.org
- https://git.kernel.org/stable/c/99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d git.kernel.org
- https://git.kernel.org/stable/c/22519eff7df2d88adcc2568d86046ce1e2b52803 git.kernel.org
- https://git.kernel.org/stable/c/fc7ffa7f10b9454a86369405d9814bf141b30627 git.kernel.org
- https://git.kernel.org/stable/c/a66998e0fbf213d47d02813b9679426129d0d114 git.kernel.org
Source: the record CVE-2021-47548 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse