{"id":"CVE-2026-142843","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-12-03T04:18:20.727","lastModified":"2026-12-03T04:18:20.727","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: stm32: fix double free of SRAM buffer on MDMA fallback\n\nWhen the \"rxm2m\" MDMA channel cannot be obtained, the driver frees the\nSRAM buffer and falls back to DMA-only mode. However, sram_rx_buf is\nleft pointing to the freed buffer.\n\nAs a result, stm32_spi_unprepare_msg() may clear the released SRAM\narea, while stm32_spi_remove() or a later probe error path may free the\nbuffer again, triggering BUG_ON() in gen_pool_free_owner().\n\nThe probe error path also checks sram_pool instead of sram_rx_buf. If\nthe SRAM allocation failed and a later probe step fails,\ngen_pool_free() may therefore be called with an unallocated buffer.\n\nClear sram_rx_buf after freeing it on the MDMA fallback path and use\nthe buffer pointer to determine whether cleanup is needed."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/spi/spi-stm32.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"d17dd2f1d8a1d919e39c6302b024f135a2f90773","lessThan":"66cb7a60e0aa81c3426895ca1f98deb33411c47d","versionType":"git","status":"affected"},{"version":"d17dd2f1d8a1d919e39c6302b024f135a2f90773","lessThan":"fa00fa501717427bd4335ec7261f7e668bdbb4ff","versionType":"git","status":"affected"},{"version":"d17dd2f1d8a1d919e39c6302b024f135a2f90773","lessThan":"0c5b0c3eb1d6daa1117dacd32589196f52109cab","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/spi/spi-stm32.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.17","status":"affected"},{"version":"0","lessThan":"6.17","versionType":"semver","status":"unaffected"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/0c5b0c3eb1d6daa1117dacd32589196f52109cab","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/66cb7a60e0aa81c3426895ca1f98deb33411c47d","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/fa00fa501717427bd4335ec7261f7e668bdbb4ff","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}