KernelScan.io

HIGH Introduced in 2.6.39

xen GrantCount Overflow

CVE-2026-98900

CVSS 7.8 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: xen/gntalloc: validate grant count before allocation gntalloc_ioctl_alloc() allocates the grant-id array before checking whether the requested count fits within the global grant limit. Counts above that limit cannot succeed, so reject them before the user-controlled allocation reaches kcalloc(). Use a subtraction-based check while holding gref_mutex so adding the requested count cannot wrap. Also cast the count before advancing the per-file index so the page-size multiplication is performed in 64-bit arithmetic.

02

Engine v0.9.0

Risk summary

A local attacker with access to the Xen gntalloc device can trigger integer overflows in grant count validation and index calculation, potentially bypassing grant limits and corrupting kernel memory. This affects systems running Xen with the gntalloc driver loaded, typically in privileged dom0 domains.

Affecteddrivers/xen/gntalloc.c (xen gntalloc driver)

Vulnerability analysis

The gntalloc_ioctl_alloc() function allocates a grant-id array using a user-supplied count before validating that the count fits within the global grant limit. A large count value can cause an integer wrap-around in the limit check (gref_size + op.count > limit), allowing the allocation to proceed despite exceeding the limit. Additionally, the per-file index advancement (priv->index += op.count * PAGE_SIZE) performs the multiplication in 32-bit arithmetic, which can overflow and corrupt the index. The fix adds an early bounds check before allocation, uses a subtraction-based comparison under the gref_mutex to prevent wrap-around, and casts the count to 64-bit before the page-size multiplication. The vulnerability is reachable only by local users with access to the /dev/xen/gntalloc device, which typically requires root privileges or CAP_SYS_ADMIN in the initial namespace on a Xen dom0 system.

03

BranchIntroducedFixed inPatch commit
5.102.6.395.10.271e2806390aa1c
5.152.6.395.15.22271a0cf87e19f
6.12.6.396.1.189641de086a05f
6.122.6.396.12.11184d5727cef8e
6.182.6.396.18.53231542f4e43c
6.62.6.396.6.158720554c04acb
mainline2.6.397.22299822f3f46
cip/4.192.6.394.19.325-cip13716022e3d9e84
cip/4.19-rt2.6.394.19.325-cip137-rt5116022e3d9e84
cip/5.102.6.395.10.271-cip78e2806390aa1c
cip/5.10-rt2.6.395.10.272-cip79-rt35e2806390aa1c
cip/6.12.6.396.1.189-cip61641de086a05f
cip/6.1-rt2.6.396.1.189-cip61-rt32641de086a05f
cip/6.122.6.396.12.111-cip3284d5727cef8e

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtFixed in 5.10.272-cip79-rt35
cip/4.19Fixed in 4.19.325-cip137
cip/4.19-rtFixed in 4.19.325-cip137-rt51
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip116)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)