Double free of SRAM buffer in Linux kernel STM32 SPI driver
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The Linux kernel from 6.17 contains a double free in the STM32 SPI driver. After the driver falls back from MDMA to DMA-only mode, it frees the SRAM receive buffer but leaves its pointer set, so the buffer can be freed again during removal or a later probe error path. The probe error path also checks the wrong pointer, so it may free a buffer that was never allocated.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: spi: stm32: fix double free of SRAM buffer on MDMA fallback When the "rxm2m" MDMA channel cannot be obtained, the driver frees the SRAM buffer and falls back to DMA-only mode. However, sram_rx_buf is left pointing to the freed buffer. As a result, stm32_spi_unprepare_msg() may clear the released SRAM area, while stm32_spi_remove() or a later probe error path may free the buffer again, triggering BUG_ON() in gen_pool_free_owner(). The probe error path also checks sram_pool instead of sram_rx_buf. If the SRAM allocation failed and a later probe step fails, gen_pool_free() may therefore be called with an unallocated buffer. Clear sram_rx_buf after freeing it on the MDMA fallback path and use the buffer pointer to determine whether cleanup is needed.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Fixed versions of the Linux kernel are 6.18.63, 7.3.4 and 7.4-rc1.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
- Fix · CNA Linux (Linux) Fixed in 6.18.63, 7.3.4, 7.4-rc1
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
Not affected: 7 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 5
Timeline
- 2026-12-03 Threatist record created from CVE-2026-142843
- 2026-12-03 Alias added: GHSA-25p6-4w3m-8p4f
- 2026-12-03 Affected versions changed · Red Hat
- 2026-12-03 CVSS score added · Red Hat
- 2026-12-04 Affected versions changed · Red Hat
- 2026-12-04 Affected versions changed · Red Hat
References
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-142843 · CVE Program
- CVE-2026-142843 · NVD
- FIRST EPSS
- GHSA-25p6-4w3m-8p4f · GitHub Advisory Database · CC BY 4.0
- CVE-2026-142843 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences