← Back to CVE Explorer

CVE-2026-99120

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: KVM: x86/mmu: Cope with the SS bit being set in #NPF exit codes When running Hyper-V from Windows 11, KVM is seeing the SS bit set in nested page fault error codes produced for shadowed NPT. The AMD manual is unclear about when SS is set, including whether it can be set when SupervisorShadowStackEn (bit 6) is not set in the MISC_CTL field of the VMCB. Nevertheless, the unexpected SS bit causes out of bounds accesses in permission_fault(), seen as either WARNs or UBSAN reports: kernel: UBSAN: array-index-out-of-bounds in arch/x86/kvm/mmu.h:225:27 kernel: index 34 is out of range for type 'u16 [16]' (in this case, the page fault error code is 34*2=0x44, i.e. SS|U; the report shows SS|U|W happening as well). Fix the handling of unknown error codes by dropping SS and (with a WARN) any bits not among those that permission_fault() expects to receive. At the same time, given the uncertainty about when hardware sets SS, follow the processor's behavior when constructing the fault's error code, and preserve the SS bit as passed to FNAME(walk_addr_generic). While the behavior is surprising, there's a possibility that Hyper-V expects it (Hyper-V does not even enable CET unless it finds MBEC/GMET!), so retain the information when reflecting the fault to L1 instead of unconditionally discarding it. Bisection shows that this started happening with commit 687ee95c1b6d ("KVM: nSVM: enable GMET for guests"), even though SHSTK was available to guests since Linux 6.18. However, this is not because bit 1 of MISC_CTL (GMET) somehow enables reporting the SS bit; rather, it's simply that Hyper-V never uses CET unless GMET is also present. The WARN is reproducible even with gmet=0, with some hacking of kvm-unit-tests's cet.c testcase to ensure that the first access to the shadow stack triggers a page fault.

Severity
Not scored
CVSS score
Not available
Vulnerability status
Received
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-10-28 11:17:31.613000
Last modified
2026-10-28 11:17:31.613000
View original CVE JSON
{
  "id": "CVE-2026-99120",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-10-28T11:17:31.613",
  "lastModified": "2026-10-28T11:17:31.613",
  "vulnStatus": "Received",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86/mmu: Cope with the SS bit being set in #NPF exit codes\n\nWhen running Hyper-V from Windows 11, KVM is seeing the SS bit set\nin nested page fault error codes produced for shadowed NPT.  The AMD\nmanual is unclear about when SS is set, including whether it can be set\nwhen SupervisorShadowStackEn (bit 6) is not set in the MISC_CTL field\nof the VMCB.\n\nNevertheless, the unexpected SS bit causes out of bounds accesses in\npermission_fault(), seen as either WARNs or UBSAN reports:\n\n  kernel: UBSAN: array-index-out-of-bounds in arch/x86/kvm/mmu.h:225:27\n  kernel: index 34 is out of range for type 'u16 [16]'\n\n(in this case, the page fault error code is 34*2=0x44, i.e. SS|U; the\nreport shows SS|U|W happening as well).  Fix the handling of unknown\nerror codes by dropping SS and (with a WARN) any bits not among those\nthat permission_fault() expects to receive.\n\nAt the same time, given the uncertainty about when hardware sets SS,\nfollow the processor's behavior when constructing the fault's error\ncode, and preserve the SS bit as passed to FNAME(walk_addr_generic).\nWhile the behavior is surprising, there's a possibility that Hyper-V\nexpects it (Hyper-V does not even enable CET unless it finds MBEC/GMET!),\nso retain the information when reflecting the fault to L1 instead of\nunconditionally discarding it.\n\nBisection shows that this started happening with commit 687ee95c1b6d (\"KVM:\nnSVM: enable GMET for guests\"), even though SHSTK was available to guests\nsince Linux 6.18.  However, this is not because bit 1 of MISC_CTL (GMET)\nsomehow enables reporting the SS bit; rather, it's simply that Hyper-V\nnever uses CET unless GMET is also present.  The WARN is reproducible\neven with gmet=0, with some hacking of kvm-unit-tests's cet.c testcase\nto ensure that the first access to the shadow stack triggers a page fault."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "arch/x86/kvm/mmu.h",
            "arch/x86/kvm/mmu/paging_tmpl.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "8db428fd5229ba509d515af10d7f33d7d4a54bfe",
              "lessThan": "0caeefed99b37f03251a00eb1fdb403a1cf2cb68",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "8db428fd5229ba509d515af10d7f33d7d4a54bfe",
              "lessThan": "d6e08ec2fff45e0ec69f11010851650d7c6282b9",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "8db428fd5229ba509d515af10d7f33d7d4a54bfe",
              "lessThan": "e90ab3669181c6469e3647ef2b30ae408275f496",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "arch/x86/kvm/mmu.h",
            "arch/x86/kvm/mmu/paging_tmpl.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "6.18",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "6.18",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.59",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.2.13",
              "lessThanOrEqual": "7.2.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.3",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {},
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/0caeefed99b37f03251a00eb1fdb403a1cf2cb68",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/d6e08ec2fff45e0ec69f11010851650d7c6282b9",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/e90ab3669181c6469e3647ef2b30ae408275f496",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}