# CVE-2026-23068: spi: spi-sprd-adi: Fix double free in probe error path

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-02-04T16:07:49.119Z
- Modified: 2026-06-17T10:20:48.377Z
- Weaknesses: CWE-415
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

spi: spi-sprd-adi: Fix double free in probe error path

The driver currently uses spi_alloc_host() to allocate the controller
but registers it using devm_spi_register_controller().

If devm_register_restart_handler() fails, the code jumps to the
put_ctlr label and calls spi_controller_put(). However, since the
controller was registered via a devm function, the device core will
automatically call spi_controller_put() again when the probe fails.
This results in a double-free of the spi_controller structure.

Fix this by switching to devm_spi_alloc_host() and removing the
manual spi_controller_put() call.

(As written by CVE List.)

## Affected

- Linux Linux: from ac1775012058e13ef1522938e27f5973d9e3f053 before bddd3d10d039729b81cfb0804520c8832a701a0e; from ac1775012058e13ef1522938e27f5973d9e3f053 before 417cdfd9b9f986e95bfcb1d68eb443e6e0a15f8c; from ac1775012058e13ef1522938e27f5973d9e3f053 before 346775f2b4cf839177e8e86b94aa180a06dc15b0; from ac1775012058e13ef1522938e27f5973d9e3f053 before f6d6b3f172df118db582fe5ec43ae223a55d99cf; from ac1775012058e13ef1522938e27f5973d9e3f053 before 383d4f5cffcc8df930d95b06518a9d25a6d74aac; 4.17 (not affected: before 4.17; from 6.1.162 up to 6.1.*; from 6.6.122 up to 6.6.*; from 6.12.68 up to 6.12.*; from 6.18.8 up to 6.18.*; from 6.19 up to *)
- linux linux_kernel: from 4.17 before 6.1.162; from 6.2 before 6.6.122; from 6.7 before 6.12.68; from 6.13 before 6.18.8; 6.19

## References

- <https://git.kernel.org/stable/c/bddd3d10d039729b81cfb0804520c8832a701a0e> (patch)
- <https://git.kernel.org/stable/c/417cdfd9b9f986e95bfcb1d68eb443e6e0a15f8c> (patch)
- <https://git.kernel.org/stable/c/346775f2b4cf839177e8e86b94aa180a06dc15b0> (patch)
- <https://git.kernel.org/stable/c/f6d6b3f172df118db582fe5ec43ae223a55d99cf> (patch)
- <https://git.kernel.org/stable/c/383d4f5cffcc8df930d95b06518a9d25a6d74aac> (patch)

## Sources

- CVE List: [CVE-2026-23068](https://www.cve.org/CVERecord?id=CVE-2026-23068), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2026-23068](https://nvd.nist.gov/vuln/detail/CVE-2026-23068), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-23068 · Whole record: https://cve.day/CVE-2026-23068.json · Rebuilt by cve.day 2026-11-25T22:59:13.461Z
