CVE-2026-142843

Source
https://cve.org/CVERecord?id=CVE-2026-142843
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142843.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-142843
Downstream
Published
2026-12-03T03:20:53Z
Modified
2026-12-03T05:00:49Z
Summary
spi: stm32: fix double free of SRAM buffer on MDMA fallback
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142843.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d17dd2f1d8a1d919e39c6302b024f135a2f90773
Fixed
66cb7a60e0aa81c3426895ca1f98deb33411c47d
Fixed
fa00fa501717427bd4335ec7261f7e668bdbb4ff
Fixed
0c5b0c3eb1d6daa1117dacd32589196f52109cab

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142843.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.17.0
Fixed
6.18.63
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142843.json"