{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-98282",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-98282"
  ],
  "published": "2026-10-06T08:47:10Z",
  "summary": "powerpc/iommu: Fix the overflow validation in iommu_tce_check_ioba",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/iommu: Fix the overflow validation in iommu_tce_check_ioba\n\nThe commit b1af23d836f8 (\"KVM: PPC: iommu: Unify TCE checking\") unified\nIOBA parameter checking across KVM and VFIO into iommu_tce_check_ioba().\nWhile doing so, the passed in argument npages is ignored and constant\nvalue '1' is used leaving out a possible overflow as the callers can\nlegitimately be using npages > 1 for H_STUFF_TCE or H_PUT_TCE_INDIRECT\ncases.\n\nFix this by accounting for 'npages', checking for arithmetic overflow,\nand verifying that the entire requested range (ioba - offset + npages)\ndoes not exceed the table capacity 'size'.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
    }
  ],
  "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.189",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-98282"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/98d8dcc4ebd10523507d4478e148809a7771a213"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9fd9c9bbb05417f468a11fb6d145d7ff61f4a868"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3776bf56e06980e8a12c8c0565d9e6ac44965f03"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d6a1779129d936bc1fbab80181165da544eab736"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d48ceb6e1a6915c7bac4f902554a1047365cdff2"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0543813753ef5cfbd6fa96694f7acf783fa01af7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/314091243159f8e3749bc719bb129f423f72fd86"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0b271f7d7f5ed45bc498a03ce0aa9cfd8402fc71"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-10-07T06:50:27Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 8.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The bad ioba/npages values come from a KVM guest's H_STUFF_TCE or H_PUT_TCE_INDIRECT hypercall registers. book3s_hv.c passes them to kvmppc_h_stuff_tce()/kvmppc_h_put_tce_indirect(), which call kvmppc_ioba_validate() -> iommu_tce_check_ioba(). The attacker is code running on the host in a guest, not a remote network peer.\nAC:L - The guest picks liobn, ioba (the last valid entry) and npages itself. The flawed check only tests ioba+1, so every such hypercall reliably walks kvmppc_tce_put() past stt->size. No race or outside condition is involved; only heap grooming affects how far exploitation goes.\nPR:L - The attacker needs kernel privilege inside their own guest, which any tenant of a pseries KVM VM has. Relative to the host, that is a low-privilege tenant position. The guest's TCE table already exists because QEMU creates it through KVM_CREATE_SPAPR_TCE_64 for the default PHB/VIO DMA windows.\nUI:N - The guest issues the hypercalls whenever it wants. No action by the host administrator or any other user is needed.\nS:C - A guest-controlled hypercall corrupts host kernel memory and touches the host's hardware IOMMU table outside the guest's DMA window. The impact therefore crosses the guest-to-host virtualization boundary.\nC:H - kvmppc_tce_put() and kvmppc_h_get_tce paths index stt->pages[] past the kmalloc'd flexible array, and the TCE iommu_unmap/map paths use entries beyond the window. This gives out-of-bounds access to host heap and IOMMU state that can be turned into host memory disclosure.\nI:H - In H_STUFF_TCE, npages is unbounded and tce_value is guest-chosen. kvmppc_tce_put() writes that 8-byte value through an out-of-bounds stt->pages[] pointer, or stores a newly allocated page pointer into the out-of-bounds slot. Both are host heap writes.\nA:H - Dereferencing an out-of-bounds stt->pages[] entry as a struct page, or corrupting the host heap and IOMMU tables, crashes or oopses the host. That takes down every VM running on it."
    }
  }
}
