CVE-2021-47542

net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()

No CVSS score yet EPSS 0.25%

Published 24 May 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2021-47542

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-47542 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.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()

In qlcnic_83xx_add_rings(), the indirect function of ahw->hw_ops->alloc_mbx_args will be called to allocate memory for cmd.req.arg, and there is a dereference of it in qlcnic_83xx_add_rings(), which could lead to a NULL pointer dereference on failure of the indirect function like qlcnic_83xx_alloc_mbx_args().

Fix this bug by adding a check of alloc_mbx_args(), this patch imitates the logic of mbx_cmd()'s failure handling.

This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs.

Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug.

Builds with CONFIG_QLCNIC=m show no new warnings, and our static analyzer no longer warns about this code.

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 17.6% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 24 May 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 7f9664525f9cb507de9198a395a111371413f230, before 3a061d54e260b701b538873b43e399d9b8b83e03
affected from 7f9664525f9cb507de9198a395a111371413f230, before b4f217d6fcc00c3fdc0921a7691f30be7490b073
affected from 7f9664525f9cb507de9198a395a111371413f230, before 550658a2d61e4eaf522c8ebc7fad76dc376bfb45
affected from 7f9664525f9cb507de9198a395a111371413f230, before 57af54a56024435d83e44c78449513b414eb6edf
affected from 7f9664525f9cb507de9198a395a111371413f230, before bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f
affected from 7f9664525f9cb507de9198a395a111371413f230, before 15fa12c119f869173f9b710cbe6a4a14071d2105
affected from 7f9664525f9cb507de9198a395a111371413f230, before c5ef33c1489b2cd74368057fa00b5d2183bb5853
affected from 7f9664525f9cb507de9198a395a111371413f230, before e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572
Other versions: unaffected
Linux
affected 3.9
unaffected before 3.9
unaffected from 4.4.294 up to and including 4.4.*
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-47542 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47542

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-47542
trivy image --scanners vuln IMAGE | grep CVE-2021-47542

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

Source: the record CVE-2021-47542 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.