{"id":"CVE-2026-43319","summary":"spi: spidev: fix lock inversion between spi_lock and buf_lock","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: spidev: fix lock inversion between spi_lock and buf_lock\n\nThe spidev driver previously used two mutexes, spi_lock and buf_lock,\nbut acquired them in different orders depending on the code path:\n\n  write()/read(): buf_lock -\u003e spi_lock\n  ioctl():       spi_lock -\u003e buf_lock\n\nThis AB-BA locking pattern triggers lockdep warnings and can\ncause real deadlocks:\n\n  WARNING: possible circular locking dependency detected\n  spidev_ioctl() -\u003e mutex_lock(&spidev-\u003ebuf_lock)\n  spidev_sync_write() -\u003e mutex_lock(&spidev-\u003espi_lock)\n  *** DEADLOCK ***\n\nThe issue is reproducible with a simple userspace program that\nperforms write() and SPI_IOC_WR_MAX_SPEED_HZ ioctl() calls from\nseparate threads on the same spidev file descriptor.\n\nFix this by simplifying the locking model and removing the lock\ninversion entirely. spidev_sync() no longer performs any locking,\nand all callers serialize access using spi_lock.\n\nbuf_lock is removed since its functionality is fully covered by\nspi_lock, eliminating the possibility of lock ordering issues.\n\nThis removes the lock inversion and prevents deadlocks without\nchanging userspace ABI or behaviour.","modified":"2026-06-18T03:55:32.723062650Z","published":"2026-05-08T13:26:14.231Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43319.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/40534d19ed2afb880ecf202dab26a8e7a5808d16"},{"type":"WEB","url":"https://git.kernel.org/stable/c/41ccfac7d302968a4f32b5f7b012d066c5f5cdf8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e341e18215030af2136836b78508e0d798916df7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f8431b8672231d378b03176fe74c95adfd3522cf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fabfed1afe273717ea33b8aee46b767360edbb80"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43319.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43319"},{"type":"PACKAGE","url":"https://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":"a720416d94634068951773cb9e9d6f1b73769e5b"},{"fixed":"fabfed1afe273717ea33b8aee46b767360edbb80"},{"fixed":"f8431b8672231d378b03176fe74c95adfd3522cf"},{"fixed":"e341e18215030af2136836b78508e0d798916df7"},{"fixed":"41ccfac7d302968a4f32b5f7b012d066c5f5cdf8"},{"fixed":"40534d19ed2afb880ecf202dab26a8e7a5808d16"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-43319.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.142"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.75"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"6.19.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-43319.json"}}],"schema_version":"1.7.5"}