{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-43340",
  "modified": "2026-10-07T17:22:01Z",
  "upstream": [
    "CVE-2026-43340"
  ],
  "published": "2026-05-08T13:37:37Z",
  "summary": "comedi: Reinit dev->spinlock between attachments to low-level drivers",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: Reinit dev->spinlock between attachments to low-level drivers\n\n`struct comedi_device` is the main controlling structure for a COMEDI\ndevice created by the COMEDI subsystem.  It contains a member `spinlock`\ncontaining a spin-lock that is initialized by the COMEDI subsystem, but\nis reserved for use by a low-level driver attached to the COMEDI device\n(at least since commit 25436dc9d84f (\"Staging: comedi: remove RT\ncode\")).\n\nSome COMEDI devices (those created on initialization of the COMEDI\nsubsystem when the \"comedi.comedi_num_legacy_minors\" parameter is\nnon-zero) can be attached to different low-level drivers over their\nlifetime using the `COMEDI_DEVCONFIG` ioctl command.  This can result in\ninconsistent lock states being reported when there is a mismatch in the\nspin-lock locking levels used by each low-level driver to which the\nCOMEDI device has been attached.  Fix it by reinitializing\n`dev->spinlock` before calling the low-level driver's `attach` function\npointer if `CONFIG_LOCKDEP` is enabled.",
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.168",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-43340"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3181c34b415c5464be9d34bff3e43ef63b747039"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2b1f49e4fdff3ef0f8e9158bbb5b149e06287560"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4d5ffe524903a30e2e0da7d16841a56bec2de55c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c01bcc67a9a692d65508ebd480405b5e77d562b7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/430291d8f3884f57ae0057049b0ca291453e29e1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b89c026227712c367950bbae055a5b31073d3b30"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/83134a7a176ce5b4b19b6edecf4360e8d98d1a5a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4b9a9a6d71e3e252032f959fb3895a33acb5865c"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-05-12T04:54:46Z"
  }
}
