Skip to content
Heist/ feed
Back to feed
UnratedFix available

dma-buf: Fix silent overflow for phys vec to sgt

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: dma-buf: Fix silent overflow for phys vec to sgt In case MMIO size is bigger than 4G and peer2peer DMA goes through host bridge, we trigger a code path that assigns the total linked IOVA (which is greater than 4G) to mapped_len. Previously, `mapped_len` was declared as 32-bit `unsigned int`. When accumulating `size_t` lengths, this leads to a silent wrap-around. This truncation causes truncated lengths to be passed to functions like `fill_sg_entry()`. Fix this by changing `mapped_len` to `size_t` (64-bit). While at it, fix similar potential overflow issues in `calc_sg_nents` by using `check_add_overflow()` for `nents` and using `unsigned int` for the loop iterator in `fill_sg_entry` to match.

Products
Kernel
Affected versions
Not specified
Fixed versions
7.2.8
CVEs
CVE-2026-98242
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 06:56 UTC · Revision 1

Source evidence

dma-buf: Fix silent overflow for phys vec to sgt

core-osv · Original source

Published 6 Oct 2026, 08:45 UTC

In the Linux kernel, the following vulnerability has been resolved: dma-buf: Fix silent overflow for phys vec to sgt In case MMIO size is bigger than 4G and peer2peer DMA goes through host bridge, we trigger a code path that assigns the total linked IOVA (which is greater than 4G) to mapped_len. Previously, `mapped_len` was declared as 32-bit `unsigned int`. When accumulating `size_t` lengths, this leads to a silent wrap-around. This truncation causes truncated lengths to be passed to functions like `fill_sg_entry()`. Fix this by changing `mapped_len` to `size_t` (64-bit). While at it, fix similar potential overflow issues in `calc_sg_nents` by using `check_add_overflow()` for `nents` and using `unsigned int` for the loop iterator in `fill_sg_entry` to match.

osv:CVE-2026-98242

Kernel

Fixed versions: 7.2.8

Complete source record
{
  "id": "d711db1996886b1083735aae19a392f8af00f9a8c5e4e5e21905e8c8ca53e8ab",
  "url": "https://osv.dev/vulnerability/CVE-2026-98242",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "dma-buf: Fix silent overflow for phys vec to sgt",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: dma-buf: Fix silent overflow for phys vec to sgt In case MMIO size is bigger than 4G and peer2peer DMA goes through host bridge, we trigger a code path that assigns the total linked IOVA (which is greater than 4G) to mapped_len. Previously, `mapped_len` was declared as 32-bit `unsigned int`. When accumulating `size_t` lengths, this leads to a silent wrap-around. This truncation causes truncated lengths to be passed to functions like `fill_sg_entry()`. Fix this by changing `mapped_len` to `size_t` (64-bit). While at it, fix similar potential overflow issues in `calc_sg_nents` by using `check_add_overflow()` for `nents` and using `unsigned int` for the loop iterator in `fill_sg_entry` to match.",
    "evidence": "osv:CVE-2026-98242",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "7.2.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98242",
      "aliases": [
        "CVE-2026-98242"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3aa31a8bb11e47c0ff2b306988d1756b810c1c3c"
                },
                {
                  "fixed": "6b98fd7106d4e486f432664893dcd4d6fa3a9693"
                },
                {
                  "fixed": "b344ca94e8cc85796f16ea25e2e5a8e0303fe813"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98242.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98242.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.000114855Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/6b98fd7106d4e486f432664893dcd4d6fa3a9693",
        "https://git.kernel.org/stable/c/b344ca94e8cc85796f16ea25e2e5a8e0303fe813",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98242.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98242",
        "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/98xxx/CVE-2026-98242.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98242",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 518562,
  "published_at": "2026-10-06T08:45:12.662+00:00"
}