# CVE-2024-26991: KVM: x86/mmu: x86: Don't overflow lpage\_info when checking attributes

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-125
- **Published:** 2024-05-01T05:27:53.427Z
- **Modified:** 2026-06-17T07:18:52.743Z

## Who should check

- Anyone running Linux \>= 90b4fe17981e155432c4dbc490606d0c2e9c2199, \< 048cc4a028e635d339687ed968985d2d1669494c; \>= 90b4fe17981e155432c4dbc490606d0c2e9c2199, \< 992b54bd083c5bee24ff7cc35991388ab08598c4
- Anyone running Linux 6.8

## Description

In the Linux kernel, the following vulnerability has been resolved:

KVM: x86/mmu: x86: Don't overflow lpage\_info when checking attributes

Fix KVM\_SET\_MEMORY\_ATTRIBUTES to not overflow lpage\_info array and trigger
KASAN splat, as seen in the private\_mem\_conversions\_test selftest.

When memory attributes are set on a GFN range, that range will have
specific properties applied to the TDP. A huge page cannot be used when
the attributes are inconsistent, so they are disabled for those the
specific huge pages. For internal KVM reasons, huge pages are also not
allowed to span adjacent memslots regardless of whether the backing memory
could be mapped as huge.

What GFNs support which huge page sizes is tracked by an array of arrays
'lpage\_info' on the memslot, of ‘kvm\_lpage\_info’ structs. Each index of
lpage\_info contains a vmalloc allocated array of these for a specific
supported page size. The kvm\_lpage\_info denotes whether a specific huge
page (GFN and page size) on the memslot is supported. These arrays include
indices for unaligned head and tail huge pages.

Preventing huge pages from spanning adjacent memslot is covered by
incrementing the count in head and tail kvm\_lpage\_info when the memslot is
allocated, but disallowing huge pages for memory that has mixed attributes
has to be done in a more complicated way. During the
KVM\_SET\_MEMORY\_ATTRIBUTES ioctl KVM updates lpage\_info for each memslot in
the range that has mismatched attributes. KVM does this a memslot at a
time, and marks a special bit, KVM\_LPAGE\_MIXED\_FLAG, in the kvm\_lpage\_info
for any huge page. This bit is essentially a permanently elevated count.
So huge pages will not be mapped for the GFN at that page size if the
count is elevated in either case: a huge head or tail page unaligned to
the memslot or if KVM\_LPAGE\_MIXED\_FLAG is set because it has mixed
attributes.

To determine whether a huge page has consistent attributes, the
KVM\_SET\_MEMORY\_ATTRIBUTES operation checks an xarray to make sure it
consistently has the incoming attribute. Since level - 1 huge pages are
aligned to level huge pages, it employs an optimization. As long as the
level - 1 huge pages are checked first, it can just check these and assume
that if each level - 1 huge page contained within the level sized huge
page is not mixed, then the level size huge page is not mixed. This
optimization happens in the helper hugepage\_has\_attrs().

Unfortunately, although the kvm\_lpage\_info array representing page size
'level' will contain an entry for an unaligned tail page of size level,
the array for level - 1  will not contain an entry for each GFN at page
size level. The level - 1 array will only contain an index for any
unaligned region covered by level - 1 huge page size, which can be a
smaller region. So this causes the optimization to overflow the level - 1
kvm\_lpage\_info and perform a vmalloc out of bounds read.

In some cases of head and tail pages where an overflow could happen,
callers skip the operation completely as KVM\_LPAGE\_MIXED\_FLAG is not
required to prevent huge pages as discussed earlier. But for memslots that
are smaller than the 1GB page size, it does call hugepage\_has\_attrs(). In
this case the huge page is both the head and tail page. The issue can be
observed simply by compiling the kernel with CONFIG\_KASAN\_VMALLOC and
running the selftest “private\_mem\_conversions\_test”, which produces the
output like the following:

BUG: KASAN: vmalloc-out-of-bounds in hugepage\_has\_attrs+0x7e/0x110
Read of size 4 at addr ffffc900000a3008 by task private\_mem\_con/169
Call Trace:
  dump\_stack\_lvl
  print\_report
  ? \_\_virt\_addr\_valid
  ? hugepage\_has\_attrs
  ? hugepage\_has\_attrs
  kasan\_report
  ? hugepage\_has\_attrs
  hugepage\_has\_attrs
  kvm\_arch\_post\_set\_memory\_attributes
  kvm\_vm\_ioctl

It is a little ambiguous whether the unaligned head page (in the bug case
also the tail page) should be expected to have KVM\_LPAGE\_MIXED\_FLAG set.
It is not functionally required, as the unal
---truncated---

## Affected and fixed versions

- Linux: \>= 90b4fe17981e155432c4dbc490606d0c2e9c2199, \< 048cc4a028e635d339687ed968985d2d1669494c; \>= 90b4fe17981e155432c4dbc490606d0c2e9c2199, \< 992b54bd083c5bee24ff7cc35991388ab08598c4 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 992b54bd083c5bee24ff7cc35991388ab08598c4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-26991. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-26991.md
Affected: Linux >= 90b4fe17981e155432c4dbc490606d0c2e9c2199, < 048cc4a028e635d339687ed968985d2d1669494c; >= 90b4fe17981e155432c4dbc490606d0c2e9c2199, < 992b54bd083c5bee24ff7cc35991388ab08598c4; Linux 6.8
Fixed in: Linux 048cc4a028e635d339687ed968985d2d1669494c, Linux 992b54bd083c5bee24ff7cc35991388ab08598c4

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-26991 being exploited?

There is no confirmed exploitation: CVE-2024-26991 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-26991?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-26991?

Linux \>= 90b4fe17981e155432c4dbc490606d0c2e9c2199, \< 048cc4a028e635d339687ed968985d2d1669494c; \>= 90b4fe17981e155432c4dbc490606d0c2e9c2199, \< 992b54bd083c5bee24ff7cc35991388ab08598c4; Linux 6.8.

### Is there a fix for CVE-2024-26991?

Yes. Fixed in Linux 048cc4a028e635d339687ed968985d2d1669494c, Linux 992b54bd083c5bee24ff7cc35991388ab08598c4. Upgrade Linux to 992b54bd083c5bee24ff7cc35991388ab08598c4 or later.

### How do I check if I'm affected by CVE-2024-26991?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/048cc4a028e635d339687ed968985d2d1669494c>
- patch: <https://git.kernel.org/stable/c/992b54bd083c5bee24ff7cc35991388ab08598c4>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-26991>

HTML: <https://flawdb.com/CVE-2024-26991> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-26991>
