{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-142843",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.332Z",
        "datePublished": "2026-12-03T03:20:53.702Z",
        "dateUpdated": "2026-12-03T03:20:53.702Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T03:20:53.702Z"
            },
            "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": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/spi/spi-stm32.c"
                    ],
                    "versions": [
                        {
                            "version": "d17dd2f1d8a1d919e39c6302b024f135a2f90773",
                            "lessThan": "66cb7a60e0aa81c3426895ca1f98deb33411c47d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d17dd2f1d8a1d919e39c6302b024f135a2f90773",
                            "lessThan": "fa00fa501717427bd4335ec7261f7e668bdbb4ff",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "d17dd2f1d8a1d919e39c6302b024f135a2f90773",
                            "lessThan": "0c5b0c3eb1d6daa1117dacd32589196f52109cab",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/spi/spi-stm32.c"
                    ],
                    "versions": [
                        {
                            "version": "6.17",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.17",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.63",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.4",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.17",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.17",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.17",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/66cb7a60e0aa81c3426895ca1f98deb33411c47d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fa00fa501717427bd4335ec7261f7e668bdbb4ff"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0c5b0c3eb1d6daa1117dacd32589196f52109cab"
                }
            ],
            "title": "spi: stm32: fix double free of SRAM buffer on MDMA fallback",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}