CVE-2026-64283 (GCVE-0-2026-64283)

Vulnerability from cvelistv5 – Published: 2026-07-25 08:49 – Updated: 2026-07-25 08:49
VLAI
Title
KVM: guest_memfd: Treat memslot binding offset+size as unsigned values
Summary
In the Linux kernel, the following vulnerability has been resolved: KVM: guest_memfd: Treat memslot binding offset+size as unsigned values When binding a memslot to a guest_memfd file, treat the offset and size as unsigned values to fix a bug where the sum of the two can result in a false negative when checking for overflow against the size of the file. Passing unsigned values also avoids relying on somewhat obscure checks in other flows for safety, and tracks the offset and size as they are intended to be tracked, as unsigned values. On 64-bit kernels, the number of pages a memslot contains and thus the size (and offset) of its guest_memfd binding are unsigned 64-bit values. Taking the offset+size as an loff_t instead of a uoff_t inadvertently converts the unsigned value to a signed value if the offset and/or size is massive. Locally storing the offset and size as signed values is benign in and of itself (though even that is *extremely* difficult to discern), but operating on their sum is not. For the offset, KVM explicitly checks against a negative value, which might seem like a bug as KVM could incorrectly reject a legitimate binding, but that's not actually the case as KVM_CREATE_GUEST_MEMFD takes a signed value for its size, i.e. a would-be-negative offset is also greater than the maximum possible size of any guest_memfd file. Regarding the size, while KVM lacks an explicit check for a negative value, i.e. seemingly has a flawed overflow check, KVM restricts the number of pages in a single memslot to the largest positive signed 32-bit value: if (id < KVM_USER_MEM_SLOTS && (mem->memory_size >> PAGE_SHIFT) > KVM_MEM_MAX_NR_PAGES) return -EINVAL; and so that maximum "size" will ever be is 0x7fffffff000. The sum of the two is, however, problematic. While the size is restricted by KVM's memslot logic, the offset is not, i.e. the offset is completely unchecked until the "offset + size > i_size_read(inode)" check. If the offset is the (nearly) largest possible _positive_ value, then adding size to the offset can result in a signed, negative 64-bit value. When compared against the size of the file (guaranteed to be positive), the negative sum is always smaller, and KVM incorrectly allows the absurd offset. Opportunistically add missing includes in kvm_mm.h (instead of relying on its parents).
Severity
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: a7800aa80ea4d5356b8474c2302812e9d4926fa6 , < f3a98d5881b9bd4807f49156143565f6aabcef1e (git)
Affected: a7800aa80ea4d5356b8474c2302812e9d4926fa6 , < eba85fee7fc6cf28fec38a5bf3c378bef9a79ca6 (git)
Create a notification for this product.
Linux Linux Affected: 6.8
Unaffected: 0 , < 6.8 (semver)
Unaffected: 7.1.4 , ≤ 7.1.* (semver)
Unaffected: 7.2-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "virt/kvm/guest_memfd.c",
            "virt/kvm/kvm_mm.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f3a98d5881b9bd4807f49156143565f6aabcef1e",
              "status": "affected",
              "version": "a7800aa80ea4d5356b8474c2302812e9d4926fa6",
              "versionType": "git"
            },
            {
              "lessThan": "eba85fee7fc6cf28fec38a5bf3c378bef9a79ca6",
              "status": "affected",
              "version": "a7800aa80ea4d5356b8474c2302812e9d4926fa6",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "virt/kvm/guest_memfd.c",
            "virt/kvm/kvm_mm.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.8"
            },
            {
              "lessThan": "6.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.4",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2-rc1",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: guest_memfd: Treat memslot binding offset+size as unsigned values\n\nWhen binding a memslot to a guest_memfd file, treat the offset and size as\nunsigned values to fix a bug where the sum of the two can result in a false\nnegative when checking for overflow against the size of the file.  Passing\nunsigned values also avoids relying on somewhat obscure checks in other\nflows for safety, and tracks the offset and size as they are intended to be\ntracked, as unsigned values.\n\nOn 64-bit kernels, the number of pages a memslot contains and thus the size\n(and offset) of its guest_memfd binding are unsigned 64-bit values.  Taking\nthe offset+size as an loff_t instead of a uoff_t inadvertently converts\nthe unsigned value to a signed value if the offset and/or size is massive.\n\nLocally storing the offset and size as signed values is benign in and of\nitself (though even that is *extremely* difficult to discern), but\noperating on their sum is not.\n\nFor the offset, KVM explicitly checks against a negative value, which might\nseem like a bug as KVM could incorrectly reject a legitimate binding, but\nthat\u0027s not actually the case as KVM_CREATE_GUEST_MEMFD takes a signed value\nfor its size, i.e. a would-be-negative offset is also greater than the\nmaximum possible size of any guest_memfd file.\n\nRegarding the size, while KVM lacks an explicit check for a negative value,\ni.e. seemingly has a flawed overflow check, KVM restricts the number of\npages in a single memslot to the largest positive signed 32-bit value:\n\n        if (id \u003c KVM_USER_MEM_SLOTS \u0026\u0026\n            (mem-\u003ememory_size \u003e\u003e PAGE_SHIFT) \u003e KVM_MEM_MAX_NR_PAGES)\n                return -EINVAL;\n\nand so that maximum \"size\" will ever be is 0x7fffffff000.\n\nThe sum of the two is, however, problematic.  While the size is restricted\nby KVM\u0027s memslot logic, the offset is not, i.e. the offset is completely\nunchecked until the \"offset + size \u003e i_size_read(inode)\" check.  If the\noffset is the (nearly) largest possible _positive_ value, then adding size\nto the offset can result in a signed, negative 64-bit value.  When compared\nagainst the size of the file (guaranteed to be positive), the negative sum\nis always smaller, and KVM incorrectly allows the absurd offset.\n\nOpportunistically add missing includes in kvm_mm.h (instead of relying on\nits parents)."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-07-25T08:49:25.642Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f3a98d5881b9bd4807f49156143565f6aabcef1e"
        },
        {
          "url": "https://git.kernel.org/stable/c/eba85fee7fc6cf28fec38a5bf3c378bef9a79ca6"
        }
      ],
      "title": "KVM: guest_memfd: Treat memslot binding offset+size as unsigned values",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-64283",
    "datePublished": "2026-07-25T08:49:25.642Z",
    "dateReserved": "2026-07-19T15:36:31.777Z",
    "dateUpdated": "2026-07-25T08:49:25.642Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-64283",
      "date": "2026-07-26",
      "epss": "0.0021",
      "percentile": "0.11413"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-64283\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-07-25T10:17:08.910\",\"lastModified\":\"2026-07-25T10:17:08.910\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nKVM: guest_memfd: Treat memslot binding offset+size as unsigned values\\n\\nWhen binding a memslot to a guest_memfd file, treat the offset and size as\\nunsigned values to fix a bug where the sum of the two can result in a false\\nnegative when checking for overflow against the size of the file.  Passing\\nunsigned values also avoids relying on somewhat obscure checks in other\\nflows for safety, and tracks the offset and size as they are intended to be\\ntracked, as unsigned values.\\n\\nOn 64-bit kernels, the number of pages a memslot contains and thus the size\\n(and offset) of its guest_memfd binding are unsigned 64-bit values.  Taking\\nthe offset+size as an loff_t instead of a uoff_t inadvertently converts\\nthe unsigned value to a signed value if the offset and/or size is massive.\\n\\nLocally storing the offset and size as signed values is benign in and of\\nitself (though even that is *extremely* difficult to discern), but\\noperating on their sum is not.\\n\\nFor the offset, KVM explicitly checks against a negative value, which might\\nseem like a bug as KVM could incorrectly reject a legitimate binding, but\\nthat\u0027s not actually the case as KVM_CREATE_GUEST_MEMFD takes a signed value\\nfor its size, i.e. a would-be-negative offset is also greater than the\\nmaximum possible size of any guest_memfd file.\\n\\nRegarding the size, while KVM lacks an explicit check for a negative value,\\ni.e. seemingly has a flawed overflow check, KVM restricts the number of\\npages in a single memslot to the largest positive signed 32-bit value:\\n\\n        if (id \u003c KVM_USER_MEM_SLOTS \u0026\u0026\\n            (mem-\u003ememory_size \u003e\u003e PAGE_SHIFT) \u003e KVM_MEM_MAX_NR_PAGES)\\n                return -EINVAL;\\n\\nand so that maximum \\\"size\\\" will ever be is 0x7fffffff000.\\n\\nThe sum of the two is, however, problematic.  While the size is restricted\\nby KVM\u0027s memslot logic, the offset is not, i.e. the offset is completely\\nunchecked until the \\\"offset + size \u003e i_size_read(inode)\\\" check.  If the\\noffset is the (nearly) largest possible _positive_ value, then adding size\\nto the offset can result in a signed, negative 64-bit value.  When compared\\nagainst the size of the file (guaranteed to be positive), the negative sum\\nis always smaller, and KVM incorrectly allows the absurd offset.\\n\\nOpportunistically add missing includes in kvm_mm.h (instead of relying on\\nits parents).\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"virt/kvm/guest_memfd.c\",\"virt/kvm/kvm_mm.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"a7800aa80ea4d5356b8474c2302812e9d4926fa6\",\"lessThan\":\"f3a98d5881b9bd4807f49156143565f6aabcef1e\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"a7800aa80ea4d5356b8474c2302812e9d4926fa6\",\"lessThan\":\"eba85fee7fc6cf28fec38a5bf3c378bef9a79ca6\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"virt/kvm/guest_memfd.c\",\"virt/kvm/kvm_mm.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.8\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.8\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1.4\",\"lessThanOrEqual\":\"7.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2-rc1\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/eba85fee7fc6cf28fec38a5bf3c378bef9a79ca6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f3a98d5881b9bd4807f49156143565f6aabcef1e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "suse_vex": {
      "aggregate_severity": "not set",
      "current_release_date": "2026-07-25T16:46:38Z",
      "cve": "CVE-2026-64283",
      "id": "CVE-2026-64283",
      "initial_release_date": "2026-07-25T16:46:38Z",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-64283",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2026-64283.json",
      "version": "2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…