{"id":"CVE-2026-23068","state":"PUBLISHED","title":"spi: spi-sprd-adi: Fix double free in probe error path","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: spi-sprd-adi: Fix double free in probe error path\n\nThe driver currently uses spi_alloc_host() to allocate the controller\nbut registers it using devm_spi_register_controller().\n\nIf devm_register_restart_handler() fails, the code jumps to the\nput_ctlr label and calls spi_controller_put(). However, since the\ncontroller was registered via a devm function, the device core will\nautomatically call spi_controller_put() again when the probe fails.\nThis results in a double-free of the spi_controller structure.\n\nFix this by switching to devm_spi_alloc_host() and removing the\nmanual spi_controller_put() call.","publishedAt":"2026-02-04T16:07:49.119Z","updatedAt":"2026-05-11T21:59:22.846Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"bddd3d10d039729b81cfb0804520c8832a701a0e","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"417cdfd9b9f986e95bfcb1d68eb443e6e0a15f8c","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"346775f2b4cf839177e8e86b94aa180a06dc15b0","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"f6d6b3f172df118db582fe5ec43ae223a55d99cf","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"383d4f5cffcc8df930d95b06518a9d25a6d74aac","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-sprd-adi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"6.1.162","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.122","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.68","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.8","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-sprd-adi.c"]}],"references":["https://git.kernel.org/stable/c/bddd3d10d039729b81cfb0804520c8832a701a0e","https://git.kernel.org/stable/c/417cdfd9b9f986e95bfcb1d68eb443e6e0a15f8c","https://git.kernel.org/stable/c/346775f2b4cf839177e8e86b94aa180a06dc15b0","https://git.kernel.org/stable/c/f6d6b3f172df118db582fe5ec43ae223a55d99cf","https://git.kernel.org/stable/c/383d4f5cffcc8df930d95b06518a9d25a6d74aac"],"weaknesses":[],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/23xxx/CVE-2026-23068.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-23068","state":"PUBLISHED","datePublished":"2026-02-04T16:07:49.119Z","dateUpdated":"2026-05-11T21:59:22.846Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-01-13T15:37:45.954Z"},"containers":{"cna":{"title":"spi: spi-sprd-adi: Fix double free in probe error path","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: spi-sprd-adi: Fix double free in probe error path\n\nThe driver currently uses spi_alloc_host() to allocate the controller\nbut registers it using devm_spi_register_controller().\n\nIf devm_register_restart_handler() fails, the code jumps to the\nput_ctlr label and calls spi_controller_put(). However, since the\ncontroller was registered via a devm function, the device core will\nautomatically call spi_controller_put() again when the probe fails.\nThis results in a double-free of the spi_controller structure.\n\nFix this by switching to devm_spi_alloc_host() and removing the\nmanual spi_controller_put() call."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"bddd3d10d039729b81cfb0804520c8832a701a0e","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"417cdfd9b9f986e95bfcb1d68eb443e6e0a15f8c","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"346775f2b4cf839177e8e86b94aa180a06dc15b0","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"f6d6b3f172df118db582fe5ec43ae223a55d99cf","versionType":"git"},{"version":"ac1775012058e13ef1522938e27f5973d9e3f053","status":"affected","lessThan":"383d4f5cffcc8df930d95b06518a9d25a6d74aac","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-sprd-adi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"6.1.162","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.122","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.68","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.8","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-sprd-adi.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bddd3d10d039729b81cfb0804520c8832a701a0e"},{"url":"https://git.kernel.org/stable/c/417cdfd9b9f986e95bfcb1d68eb443e6e0a15f8c"},{"url":"https://git.kernel.org/stable/c/346775f2b4cf839177e8e86b94aa180a06dc15b0"},{"url":"https://git.kernel.org/stable/c/f6d6b3f172df118db582fe5ec43ae223a55d99cf"},{"url":"https://git.kernel.org/stable/c/383d4f5cffcc8df930d95b06518a9d25a6d74aac"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:59:22.846Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.1.162"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.6.122"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.12.68"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.18.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}