HIGH Introduced in 2.6.39
xen GrantCount Overflow
CVE-2026-98900
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
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.
02KernelScan AI Analysis
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.
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.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.39 | 5.10.271 | e2806390aa1c |
| 5.15 | 2.6.39 | 5.15.222 | 71a0cf87e19f |
| 6.1 | 2.6.39 | 6.1.189 | 641de086a05f |
| 6.12 | 2.6.39 | 6.12.111 | 84d5727cef8e |
| 6.18 | 2.6.39 | 6.18.53 | 231542f4e43c |
| 6.6 | 2.6.39 | 6.6.158 | 720554c04acb |
| mainline | 2.6.39 | 7.2 | 2299822f3f46 |
| cip/4.19 | 2.6.39 | 4.19.325-cip137 | 16022e3d9e84 |
| cip/4.19-rt | 2.6.39 | 4.19.325-cip137-rt51 | 16022e3d9e84 |
| cip/5.10 | 2.6.39 | 5.10.271-cip78 | e2806390aa1c |
| cip/5.10-rt | 2.6.39 | 5.10.272-cip79-rt35 | e2806390aa1c |
| cip/6.1 | 2.6.39 | 6.1.189-cip61 | 641de086a05f |
| cip/6.1-rt | 2.6.39 | 6.1.189-cip61-rt32 | 641de086a05f |
| cip/6.12 | 2.6.39 | 6.12.111-cip32 | 84d5727cef8e |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Fixed in 5.10.272-cip79-rt35 |
| cip/4.19 | Fixed in 4.19.325-cip137 |
| cip/4.19-rt | Fixed in 4.19.325-cip137-rt51 |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip116) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |