CVE-2021-47542

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

MEDIUM
5.5
CVSS Score
Published: May 24, 2024 at 03:09 PM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.9 ≤ v < 4.14.2573.9 ≤ v < 4.19.2203.9 ≤ v < 4.4.2943.9 ≤ v < 4.9.2923.9 ≤ v < 5.10.843.9 ≤ v < 5.15.73.9 ≤ v < 5.163.9 ≤ v < 5.4.1644.10 ≤ v < 4.14.2574.15 ≤ v < 4.19.2204.20 ≤ v < 5.4.1644.5 ≤ v < 4.9.2925.11 ≤ v < 5.15.75.5 ≤ v < 5.10.843.97f9664525f9cb507de9198a395a111371413f230
Vendor states this is fixed in 15fa12c119f869173f9b710cbe6a4a14071d2105 (fixed)
Vendor states this is fixed in 3a061d54e260b701b538873b43e399d9b8b83e03 (fixed)
Vendor states this is fixed in 550658a2d61e4eaf522c8ebc7fad76dc376bfb45 (fixed)
Vendor states this is fixed in 57af54a56024435d83e44c78449513b414eb6edf (fixed)
Vendor states this is fixed in b4f217d6fcc00c3fdc0921a7691f30be7490b073 (fixed)
Vendor states this is fixed in bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f (fixed)
Vendor states this is fixed in c5ef33c1489b2cd74368057fa00b5d2183bb5853 (fixed)
Vendor states this is fixed in e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572 (fixed)
Vendor states this is fixed in 3.9 (unaffected)
Vendor states this is fixed in 4.14.257 (unaffected)
Vendor states this is fixed in 4.19.220 (unaffected)
Vendor states this is fixed in 4.4.294 (unaffected)
Vendor states this is fixed in 4.9.292 (unaffected)
Vendor states this is fixed in 5.10.84 (unaffected)
Vendor states this is fixed in 5.15.7 (unaffected)
Vendor states this is fixed in 5.16 (unaffected)
Vendor states this is fixed in 5.4.164 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/15fa12c119f869173f9b710cbe6a4a14071d2105
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3a061d54e260b701b538873b43e399d9b8b83e03
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/550658a2d61e4eaf522c8ebc7fad76dc376bfb45
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/57af54a56024435d83e44c78449513b414eb6edf
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b4f217d6fcc00c3fdc0921a7691f30be7490b073
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c5ef33c1489b2cd74368057fa00b5d2183bb5853
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card