CVE-2021-47048
published high CVSS 3.1 · 7.8spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < 1231279389b5e638bc3b66b9741c94077aed4b5a · 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < d67e0d6bd92ebbb0294e7062bbf5cdc773764e62 · 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < 23269ac9f123eca3aea7682d3345c02e71ed696c · 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < a2c5bedb2d55dd27c642c7b9fb6886d7ad7bdb58 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.10 (affected) · 0 to < 5.10 (unaffected · semver) · 5.10.37 through 5.10.* (unaffected · semver) · 5.11.21 through 5.11.* (unaffected · semver) · 5.12.4 through 5.12.* (unaffected · semver) · 5.13 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op When handling op->addr, it is using the buffer "tmpbuf" which has been freed. This will trigger a use-after-free KASAN warning. Let's use temporary variables to store op->addr.val and op->cmd.opcode to fix this issue.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerable code is in the Xilinx ZynqMP GQSPI controller's spi-mem exec_op path, reached only via local syscalls that perform SPI NOR/MTD flash operations (e.g., reading /dev/mtd* or files on a SPI-NOR-backed filesystem), not via network packets or physical plug-in buses. AC:L - Any SPI memory operation with both a command and address (the common case for flash reads/writes/erases) reliably frees tmpbuf then immediately reuses xqspi->txbuf pointing at that freed buffer; no race or attacker-uncontrollable condition is required. PR:L - On realistic ZynqMP embedded deployments, QSPI flash is commonly mounted or otherwise readable by unprivileged local users (SPI-NOR-backed filesystems, relaxed /dev/mtd permissions), so basic user privileges suffice to trigger exec_op without requiring real root. UI:N - The attacker triggers the UAF solely through their own flash/filesystem accesses; no separate victim action is needed. S:U - This is standard kernel memory corruption within the host kernel's security authority and does not cross a VM, IOMMU, or other security boundary. C:H - Use-after-free of the kmalloc'd tmpbuf allows reclaim and control of the freed object contents, which per kernel CVSS guidance enables arbitrary information disclosure. I:H - The UAF writes attacker-influenced address bytes into freed slab memory that is subsequently consumed by filltxfifo, enabling heap corruption and potential control-flow hijacking primitives. A:H - Use-after-free in this kernel driver path can cause kernel oops/panic or otherwise crash the system when the freed buffer is corrupted or reused.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < 1231279389b5e638bc3b66b9741c94077aed4b5a (affected · git)1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < d67e0d6bd92ebbb0294e7062bbf5cdc773764e62 (affected · git)1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < 23269ac9f123eca3aea7682d3345c02e71ed696c (affected · git)1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e to < a2c5bedb2d55dd27c642c7b9fb6886d7ad7bdb58 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.10 (affected)0 to < 5.10 (unaffected · semver)5.10.37 through 5.10.* (unaffected · semver)5.11.21 through 5.11.* (unaffected · semver)5.12.4 through 5.12.* (unaffected · semver)5.13 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
3Linux · cna
spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 8ae5909e2e752392f3272d739adbe31708560d98170bf97869c13fdb264a531e
- Ingested
- 23 Sep 2026, 07:57:04 UTC
- Source record
- Official CVE record