CVE-2021-47542 json
net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()
published 2024-05-24 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-34544
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 16%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 4.4.294, 4.9.292, 4.14.257, 4.19.220, 5.4.164, 5.10.84, 5.15.7, 5.16
- linux Debian 14, Debian 13, Debian 12 5.15.15-1
debian advisories DEBIAN-CVE-2021-47542
- linux Ubuntu 18.04 LTS 4.15.0-169.177
- linux Ubuntu 20.04 LTS 5.4.0-100.113
- linux-aws Ubuntu 18.04 LTS 4.15.0-1121.129
- linux-aws Ubuntu 20.04 LTS 5.4.0-1066.69
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1065.69
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1015.16
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1107.109
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1056.58
ubuntu advisories UBUNTU-CVE-2021-47542
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-syms SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-122.225.1
- kernel-source SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-122.225.1
- kernel-default SLES for SAP 12 SP5, SLES 12 SP5, SLE Workstation Extension 12 SP5 +2 more 4.12.14-122.225.1
- kernel-obs-build SLE Software Development Kit 12 SP5 4.12.14-122.225.1
- kernel-azure SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-16.194.1
- kernel-syms-azure SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-16.194.1
- kernel-source-azure SLES for SAP 12 SP5, SLES 12 SP5 4.12.14-16.194.1
- kernel-rt SLE Real Time 12 SP5 4.12.14-10.197.1
suse advisories SUSE-SU-2024:2940-1SUSE-SU-2024:2901-1SUSE-SU-2024:2892-1SUSE-SU-2024:2190-1SUSE-SU-2024:2189-1SUSE-SU-2024:2185-1
- git.kernel.org/stable/c/3a061d54e260b701b538873b43e399d9b8b83e03 commit
- git.kernel.org/stable/c/b4f217d6fcc00c3fdc0921a7691f30be7490b073 commit
- git.kernel.org/stable/c/550658a2d61e4eaf522c8ebc7fad76dc376bfb45 commit
- git.kernel.org/stable/c/57af54a56024435d83e44c78449513b414eb6edf commit
- git.kernel.org/stable/c/bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f commit
- git.kernel.org/stable/c/15fa12c119f869173f9b710cbe6a4a14071d2105 commit
- git.kernel.org/stable/c/c5ef33c1489b2cd74368057fa00b5d2183bb5853 commit
- git.kernel.org/stable/c/e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47542 updated cvss 4.1
kernel: net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.25% chance of exploitation in the next 30 days, higher than 16% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
- Technology feeds
References
-
git.kernel.org
/stable/c/3a061d54e260b701b538873b43e399d9b8b83e03
patch
-
git.kernel.org
/stable/c/b4f217d6fcc00c3fdc0921a7691f30be7490b073
patch
-
git.kernel.org
/stable/c/550658a2d61e4eaf522c8ebc7fad76dc376bfb45
patch
-
git.kernel.org
/stable/c/57af54a56024435d83e44c78449513b414eb6edf
patch
-
git.kernel.org
/stable/c/bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f
patch
-
git.kernel.org
/stable/c/15fa12c119f869173f9b710cbe6a4a14071d2105
patch
-
git.kernel.org
/stable/c/c5ef33c1489b2cd74368057fa00b5d2183bb5853
patch
-
git.kernel.org
/stable/c/e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572
patch
Sources
- CVE List CVE-2021-47542
- NVD CVE-2021-47542
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.