Skip to content
Heist/ feed
Back to feed
UnratedFix available

uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory uio_pci_sva allocates struct uio_pci_sva_dev with devm_kzalloc() in probe(), but then calls kfree(udev) both on the probe() error path (label out_free) and again in remove(). Because devm_kzalloc() allocations are devres-managed and are freed automatically when the device is detached (including after a failing probe() and during driver unbind), the explicit kfree() can lead to a double free. If probe() fails after devm_kzalloc(), the error path frees udev and devres cleanup will free it again when the core unwinds the partially bound device. On normal driver removal, remove() frees udev and devres will free it again when the device is detached. This issue was identified by a static analysis tool I developed and confirmed by manual review. Fix by removing the manual kfree() calls and dropping the now-unused label.

Products
Kernel
Affected versions
Not specified
Fixed versions
7.0.12
CVEs
CVE-2026-63907
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 03:22 UTC · Revision 1

Source evidence

uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory

core-osv · Original source

Published 19 Jul 2026, 14:55 UTC

In the Linux kernel, the following vulnerability has been resolved: uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory uio_pci_sva allocates struct uio_pci_sva_dev with devm_kzalloc() in probe(), but then calls kfree(udev) both on the probe() error path (label out_free) and again in remove(). Because devm_kzalloc() allocations are devres-managed and are freed automatically when the device is detached (including after a failing probe() and during driver unbind), the explicit kfree() can lead to a double free. If probe() fails after devm_kzalloc(), the error path frees udev and devres cleanup will free it again when the core unwinds the partially bound device. On normal driver removal, remove() frees udev and devres will free it again when the device is detached. This issue was identified by a static analysis tool I developed and confirmed by manual review. Fix by removing the manual kfree() calls and dropping the now-unused label.

osv:CVE-2026-63907

Kernel

Fixed versions: 7.0.12

Complete source record
{
  "id": "7e640690ecd61c1d36b987d127760018ceadcd62544dd7d21c3ebb3964eb6312",
  "url": "https://osv.dev/vulnerability/CVE-2026-63907",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: uio: uio_pci_generic_sva: fix double free of devm_kzalloc() memory uio_pci_sva allocates struct uio_pci_sva_dev with devm_kzalloc() in probe(), but then calls kfree(udev) both on the probe() error path (label out_free) and again in remove(). Because devm_kzalloc() allocations are devres-managed and are freed automatically when the device is detached (including after a failing probe() and during driver unbind), the explicit kfree() can lead to a double free. If probe() fails after devm_kzalloc(), the error path frees udev and devres cleanup will free it again when the core unwinds the partially bound device. On normal driver removal, remove() frees udev and devres will free it again when the device is detached. This issue was identified by a static analysis tool I developed and confirmed by manual review. Fix by removing the manual kfree() calls and dropping the now-unused label.",
    "evidence": "osv:CVE-2026-63907",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "7.0.12",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-63907",
      "aliases": [
        "CVE-2026-63907"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3397c3cd859a2c51962ad032dcf97961d42f9db2"
                },
                {
                  "fixed": "e344865bfca4eb37ed8d7ac5917226e49fcec7ce"
                },
                {
                  "fixed": "f74c8696f14149d5e43cc28b015326a759c48f00"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63907.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.0.12"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63907.json"
          }
        }
      ],
      "modified": "2026-11-01T02:30:44.015969160Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/e344865bfca4eb37ed8d7ac5917226e49fcec7ce",
        "https://git.kernel.org/stable/c/f74c8696f14149d5e43cc28b015326a759c48f00",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63907.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-63907",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63907.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-63907",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 492156,
  "published_at": "2026-07-19T14:55:13.652+00:00"
}