{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-72138",
  "modified": "2026-10-07T17:22:01Z",
  "upstream": [
    "CVE-2026-72138"
  ],
  "published": "2026-08-15T06:04:33Z",
  "summary": "xen/gntdev: fix error handling in ioctl",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nxen/gntdev: fix error handling in ioctl\n\nWhen gntdev_ioctl_map_grant_ref() fails to copy the operation result\nback to userspace after successfully adding the mapping to the list,\nthe error path returns -EFAULT without releasing the reference\nacquired by gntdev_alloc_map(). The mapping remains in priv->maps\nwith a refcount of 1, causing a memory leak and a dangling list\nentry.\n\nAdditionally, gntdev_add_map() may modify map->index to avoid overlap\nwith existing mappings. Therefore, the index returned to userspace\nmust be obtained after gntdev_add_map() completes.\n\nFix this by holding the mutex across gntdev_add_map(), retrieving\nthe correct index, and copy_to_user(). If copy_to_user() fails,\nremove the mapping from the list and release the reference while\nstill holding the lock.\n\n\nFix these issues by properly handling all error cases.",
  "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.178",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-72138"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/52dc40ef0cfee6ae89b7524967e73f0ba37906d7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1dd9cb98fe228e017fff9efb33862ff38c741b65"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6df926130aee6cab9b5d2e5b7862e49ccac348dc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/311011f8cc206c5af2877b03e3f627ee1b8fe024"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/18a693733f7ad004e1ab0466693121ca70cd95dd"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/16d3ccdabb8dee9be2cdcd6d3f9a125572ec0454"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6883269a323609f68f6faa903f8f8ff3d191cec8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/45ca1afe2fd14c04e37227e79d3f8455831d8408"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-17T05:24:08Z"
  }
}
