← Back to CVE Explorer

CVE-2026-80698

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: dmaengine: idxd: fix double free of wq, engine, and group structs The release callbacks for wq, engine, and group devices (idxd_conf_wq_release, idxd_conf_engine_release, idxd_conf_group_release) each call kfree() on the enclosing struct. The setup error paths and cleanup functions also call kfree() explicitly after put_device(), producing a double free whenever put_device() drops the reference count to zero and fires the release. In the setup functions, device_initialize() is called before device_add(), so the reference count is exactly 1 at the error sites. put_device() unconditionally fires the release, which frees the struct; the subsequent explicit kfree() then operates on freed memory. For idxd_setup_wqs(), the wq release callback also owns opcap_bmap and wqcfg. The error unwind additionally freed those fields explicitly before calling put_device(), causing further double frees on both. Remove the redundant explicit kfree() calls from all setup error paths and cleanup functions for wq, engine, and group structs, delegating sole ownership of those allocations to the release callbacks.

Severity
Not scored
CVSS score
Not available
Vulnerability status
Received
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-08-28 08:16:55.297000
Last modified
2026-10-30 13:20:10.477000
View original CVE JSON
{
  "id": "CVE-2026-80698",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-08-28T08:16:55.297",
  "lastModified": "2026-10-30T13:20:10.477",
  "vulnStatus": "Received",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: idxd: fix double free of wq, engine, and group structs\n\nThe release callbacks for wq, engine, and group devices\n(idxd_conf_wq_release, idxd_conf_engine_release,\nidxd_conf_group_release) each call kfree() on the enclosing struct.\nThe setup error paths and cleanup functions also call kfree()\nexplicitly after put_device(), producing a double free whenever\nput_device() drops the reference count to zero and fires the release.\n\nIn the setup functions, device_initialize() is called before\ndevice_add(), so the reference count is exactly 1 at the error sites.\nput_device() unconditionally fires the release, which frees the struct;\nthe subsequent explicit kfree() then operates on freed memory.\n\nFor idxd_setup_wqs(), the wq release callback also owns opcap_bmap\nand wqcfg. The error unwind additionally freed those fields explicitly\nbefore calling put_device(), causing further double frees on both.\n\nRemove the redundant explicit kfree() calls from all setup error paths\nand cleanup functions for wq, engine, and group structs, delegating\nsole ownership of those allocations to the release callbacks."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "drivers/dma/idxd/init.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "7c5dd23e57c14cf7177b8a5e0fd08916e0c60005",
              "lessThan": "899aa2424a75b1812a1f4766e41e82315a521e7e",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7c5dd23e57c14cf7177b8a5e0fd08916e0c60005",
              "lessThan": "84cf00b1376c717e55d704dc259483e822ae1b34",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7c5dd23e57c14cf7177b8a5e0fd08916e0c60005",
              "lessThan": "38208445c41a6164e26748c600f954296991364d",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7c5dd23e57c14cf7177b8a5e0fd08916e0c60005",
              "lessThan": "63844dc03960b09b36746eda636c08f1479407ce",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7c5dd23e57c14cf7177b8a5e0fd08916e0c60005",
              "lessThan": "c93a9f652b7373ac8ee5bfcc18a9af76959b6c6c",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7c5dd23e57c14cf7177b8a5e0fd08916e0c60005",
              "lessThan": "ec2d428b2e32dd157de8f86a86dd85c5b2c8f45c",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "394e179f51fce06d6bb8ca5af8fa53f33c718cf4",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "b09ad63775f58a8de3e228f59fb9543bfd964c9c",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "26c219e7522c494f7865a928c81ced84cc7db3ae",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "35ea8721d9e6e74c6847cf4d6c27e883b00b0331",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6f86fe368cdc14764833a6e8bb59f7a85a40e06",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "1c28fd5f94d8996f7dd3805bd6a16ed46a5d0886",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "5.11.22",
              "lessThan": "5.12",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "5.12.5",
              "lessThan": "5.13",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "drivers/dma/idxd/init.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "5.13",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "5.13",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.191",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.160",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.114",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.57",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.1.8",
              "lessThanOrEqual": "7.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.2",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {},
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/38208445c41a6164e26748c600f954296991364d",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/63844dc03960b09b36746eda636c08f1479407ce",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/84cf00b1376c717e55d704dc259483e822ae1b34",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/899aa2424a75b1812a1f4766e41e82315a521e7e",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/c93a9f652b7373ac8ee5bfcc18a9af76959b6c6c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/ec2d428b2e32dd157de8f86a86dd85c5b2c8f45c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}