# CVE-2021-47542: net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2024-05-24T15:09:48.578Z
- Modified: 2026-06-17T04:17:43.670Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 7f9664525f9cb507de9198a395a111371413f230 before 3a061d54e260b701b538873b43e399d9b8b83e03; from 7f9664525f9cb507de9198a395a111371413f230 before b4f217d6fcc00c3fdc0921a7691f30be7490b073; from 7f9664525f9cb507de9198a395a111371413f230 before 550658a2d61e4eaf522c8ebc7fad76dc376bfb45; from 7f9664525f9cb507de9198a395a111371413f230 before 57af54a56024435d83e44c78449513b414eb6edf; from 7f9664525f9cb507de9198a395a111371413f230 before bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f; from 7f9664525f9cb507de9198a395a111371413f230 before 15fa12c119f869173f9b710cbe6a4a14071d2105; from 7f9664525f9cb507de9198a395a111371413f230 before c5ef33c1489b2cd74368057fa00b5d2183bb5853; from 7f9664525f9cb507de9198a395a111371413f230 before e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572; 3.9 (not affected: before 3.9; from 4.4.294 up to 4.4.*; from 4.9.292 up to 4.9.*; from 4.14.257 up to 4.14.*; from 4.19.220 up to 4.19.*; from 5.4.164 up to 5.4.*; from 5.10.84 up to 5.10.*; from 5.15.7 up to 5.15.*; from 5.16 up to *)
- linux linux_kernel: from 3.9 before 4.4.294; from 4.5 before 4.9.292; from 4.10 before 4.14.257; from 4.15 before 4.19.220; from 4.20 before 5.4.164; from 5.5 before 5.10.84; from 5.11 before 5.15.7

## References

- <https://git.kernel.org/stable/c/3a061d54e260b701b538873b43e399d9b8b83e03> (patch)
- <https://git.kernel.org/stable/c/b4f217d6fcc00c3fdc0921a7691f30be7490b073> (patch)
- <https://git.kernel.org/stable/c/550658a2d61e4eaf522c8ebc7fad76dc376bfb45> (patch)
- <https://git.kernel.org/stable/c/57af54a56024435d83e44c78449513b414eb6edf> (patch)
- <https://git.kernel.org/stable/c/bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f> (patch)
- <https://git.kernel.org/stable/c/15fa12c119f869173f9b710cbe6a4a14071d2105> (patch)
- <https://git.kernel.org/stable/c/c5ef33c1489b2cd74368057fa00b5d2183bb5853> (patch)
- <https://git.kernel.org/stable/c/e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572> (patch)

## Sources

- CVE List: [CVE-2021-47542](https://www.cve.org/CVERecord?id=CVE-2021-47542), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47542](https://nvd.nist.gov/vuln/detail/CVE-2021-47542), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47542 · Whole record: https://cve.day/CVE-2021-47542.json · Rebuilt by cve.day 2026-11-25T22:58:08.907Z
