CVE-2021-4441: spi: spi-zynq-qspi: Fix a NULL pointer dereference in zynq_qspi_exec_mem_op()
In the Linux kernel, the following vulnerability has been resolved:
spi: spi-zynq-qspi: Fix a NULL pointer dereference in zynq_qspi_exec_mem_op()
In zynq_qspi_exec_mem_op(), kzalloc() is directly used in memset(),
which could lead to a NULL pointer dereference on failure of
kzalloc().
Fix this bug by adding a check of tmpbuf.
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_SPI_ZYNQ_QSPI=m show no new warnings,
and our static analyzer no longer warns about this code.
Security readout for executives and security teams
Plain-English summary
CVE-2021-4441 is a Linux kernel bug in the Zynq QSPI SPI driver. If memory allocation fails, the driver could dereference a null pointer and crash that code path. The source notes this was found by static analysis and may be hard to trigger.
Executive priority
Treat as a targeted kernel reliability risk, not an internet-scale emergency based on current evidence. Prioritize patch verification for embedded Zynq deployments and managed appliances using vendor kernels.
Technical view
The issue is in zynq_qspi_exec_mem_op(), where kzalloc() output was passed into memset() without checking for allocation failure. Kernel stable fixes add a tmpbuf null check. The affected evidence points to Linux kernel versions around 5.2 through 5.17-era stable lines, but downstream backports must be verified.
Likely exposure
Exposure is most likely on Linux systems using the Xilinx Zynq QSPI driver, especially embedded or SoC platforms with CONFIG_SPI_ZYNQ_QSPI enabled or loaded. General Linux servers without this driver path are less likely exposed.
Exploitation context
No CISA KEV listing or source-bundle evidence indicates active exploitation. The CVE text says the bug was found by static analysis, may be a false positive or hard to trigger, and was cross-reviewed by researchers.
Researcher notes
The fix addresses missing error handling after kzalloc() in zynq_qspi_exec_mem_op(). The source bundle provides no CVSS, CWE, crash trace, proof of exploitation, or complete downstream product matrix, so exposure assessment depends on kernel configuration and vendor backports.
Mitigation direction
Update to a kernel or vendor package containing the referenced stable fix.
For vendor kernels, confirm the tmpbuf null-check patch was backported.
Prioritize embedded Zynq systems using the QSPI driver.
Check Linux distribution and device vendor advisories for supported updates.
Validation and detection
Inventory systems running Linux kernels in the affected version range.
Check whether CONFIG_SPI_ZYNQ_QSPI is enabled as built-in or module.
Verify installed kernel source includes the tmpbuf allocation failure check.
Confirm device vendor kernels include one of the stable fix commits.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-4441 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.