{"id":"CVE-2026-43319","aliases":["CVE-2026-43319"],"related":[],"kind":"vulnerability","state":"published","title":"spi: spidev: fix lock inversion between spi_lock and buf_lock","summary":"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 -> spi_lock\n  ioctl():       spi_lock -> 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() -> mutex_lock(&spidev->buf_lock)\n  spidev_sync_write() -> mutex_lock(&spidev->spi_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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 -> spi_lock\n  ioctl():       spi_lock -> 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() -> mutex_lock(&spidev->buf_lock)\n  spidev_sync_write() -> mutex_lock(&spidev->spi_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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nspi: spidev: corregir inversión de bloqueo entre spi_lock y buf_lock\n\nEl controlador spidev anteriormente utilizaba dos mutex, spi_lock y buf_lock,\npero los adquiría en órdenes diferentes dependiendo de la ruta del código:\n\n  write()/read(): buf_lock   ->   spi_lock\n  ioctl():       spi_lock   ->   buf_lock\n\nEste patrón de bloqueo AB-BA activa advertencias de lockdep y puede\ncausar interbloqueos reales:\n\n  ADVERTENCIA: posible dependencia de bloqueo circular detectada\n  spidev_ioctl()   ->   mutex_lock(&spidev  ->  buf_lock)\n  spidev_sync_write()   ->   mutex_lock(&spidev  ->  spi_lock)\n  * INTERBLOQUEO *\n\nEl problema es reproducible con un programa simple de espacio de usuario que\nrealiza llamadas write() y SPI_IOC_WR_MAX_SPEED_HZ ioctl() desde\nhilos separados en el mismo descriptor de archivo spidev.\n\nCorregir esto simplificando el modelo de bloqueo y eliminando la inversión\nde bloqueo por completo. spidev_sync() ya no realiza ningún bloqueo,\ny todos los llamadores serializan el acceso utilizando spi_lock.\n\nbuf_lock es eliminado ya que su funcionalidad está completamente cubierta por\nspi_lock, eliminando la posibilidad de problemas de ordenación de bloqueo.\n\nEsto elimina la inversión de bloqueo y previene interbloqueos sin\ncambiar la ABI o el comportamiento del espacio de usuario.","source":"nvd"}],"published":"2026-05-08T13:26:14.231Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"a720416d94634068951773cb9e9d6f1b73769e5b","fixed":"fabfed1afe273717ea33b8aee46b767360edbb80","status":"affected"},{"type":"git","introduced":"a720416d94634068951773cb9e9d6f1b73769e5b","fixed":"f8431b8672231d378b03176fe74c95adfd3522cf","status":"affected"},{"type":"git","introduced":"a720416d94634068951773cb9e9d6f1b73769e5b","fixed":"e341e18215030af2136836b78508e0d798916df7","status":"affected"},{"type":"git","introduced":"a720416d94634068951773cb9e9d6f1b73769e5b","fixed":"41ccfac7d302968a4f32b5f7b012d066c5f5cdf8","status":"affected"},{"type":"git","introduced":"a720416d94634068951773cb9e9d6f1b73769e5b","fixed":"40534d19ed2afb880ecf202dab26a8e7a5808d16","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.2","status":"unaffected"},{"type":"semver","introduced":"6.6.142","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.75","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.16","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.6","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.2","fixed":"6.12.75"},{"status":"affected","introduced":"6.13","fixed":"6.18.16"},{"status":"affected","introduced":"6.19","fixed":"6.19.6"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/fabfed1afe273717ea33b8aee46b767360edbb80","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f8431b8672231d378b03176fe74c95adfd3522cf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e341e18215030af2136836b78508e0d798916df7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/41ccfac7d302968a4f32b5f7b012d066c5f5cdf8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/40534d19ed2afb880ecf202dab26a8e7a5808d16","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:35:34.477Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-43319","url":"https://www.cve.org/CVERecord?id=CVE-2026-43319","licence":"CVE Terms of Use","modified":"2026-11-06T15:42:48.674Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-43319","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43319","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"}],"updatedAt":"2026-11-25T22:59:20.989Z","epss":{"score":0.00095,"percentile":0.00637,"date":"2026-12-01T12:00:22.000Z"}}