{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "2323b276308a5da5774b778f39c7fd94b2a3022a"
            },
            {
              "fixed": "a01dd339ea6ac58b0967a50085622a6017351140"
            },
            {
              "fixed": "933a2d6a95f9bfb203e562c9be1dd990c735535c"
            },
            {
              "fixed": "5d8d88c8c0eec230de8f1f60e0920a4337939a88"
            },
            {
              "fixed": "f517646e008fe99ca1800601cd011b110f8684ae"
            },
            {
              "fixed": "3848ae00b1642e2c98ff8cbfd2d3b38c6f53b5c3"
            },
            {
              "fixed": "43c68a2c7cc35b7c2a83c285cb4ad3d472b8caa2"
            },
            {
              "fixed": "d07d97ca4f7fac467cdcf4a012690853958b7e89"
            },
            {
              "fixed": "101ab946b79ad83b36d5cfd47de587492a80acf0"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.6.30"
            },
            {
              "fixed": "5.10.253"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.203"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.168"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.134"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.81"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.22"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "6.19.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31749.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: ni_atmio16d: Fix invalid clean-up after failed attach\n\nIf the driver's COMEDI \"attach\" handler function (`atmio16d_attach()`)\nreturns an error, the COMEDI core will call the driver's \"detach\"\nhandler function (`atmio16d_detach()`) to clean up.  This calls\n`reset_atmio16d()` unconditionally, but depending on where the error\noccurred in the attach handler, the device may not have been\nsufficiently initialized to call `reset_atmio16d()`.  It uses\n`dev-\u003eiobase` as the I/O port base address and `dev-\u003eprivate` as the\npointer to the COMEDI device's private data structure.  `dev-\u003eiobase`\nmay still be set to its initial value of 0, which would result in\nundesired writes to low I/O port addresses.  `dev-\u003eprivate` may still be\n`NULL`, which would result in null pointer dereferences.\n\nFix `atmio16d_detach()` by checking that `dev-\u003eprivate` is valid\n(non-null) before calling `reset_atmio16d()`.  This implies that\n`dev-\u003eiobase` was set correctly since that is set up before\n`dev-\u003eprivate`.",
  "id": "CVE-2026-31749",
  "modified": "2026-07-08T05:37:36.144345781Z",
  "published": "2026-05-01T14:14:42.227Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/101ab946b79ad83b36d5cfd47de587492a80acf0"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/3848ae00b1642e2c98ff8cbfd2d3b38c6f53b5c3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/43c68a2c7cc35b7c2a83c285cb4ad3d472b8caa2"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5d8d88c8c0eec230de8f1f60e0920a4337939a88"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/933a2d6a95f9bfb203e562c9be1dd990c735535c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a01dd339ea6ac58b0967a50085622a6017351140"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d07d97ca4f7fac467cdcf4a012690853958b7e89"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/f517646e008fe99ca1800601cd011b110f8684ae"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31749.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31749"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.5",
  "summary": "comedi: ni_atmio16d: Fix invalid clean-up after failed attach"
}