CVE-2026-98900: xen/gntalloc: validate grant count before allocation
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-98900 to this issue.
Affected and fixed versions
===========================
Fixed in 5.10.271 with commit e2806390aa1c4d5b3f7a68f10a56ae12c71c00d8 Fixed in 5.15.222 with commit 71a0cf87e19fb35c4292ca88985e376e613c900a Fixed in 6.1.189 with commit 641de086a05f349de7fc548612432bc2fed721ca Fixed in 6.6.158 with commit 720554c04acba80018ded069d3e0984bebaee891 Fixed in 6.12.111 with commit 84d5727cef8eb9c8a28210ad248f1c70b223b065 Fixed in 6.18.53 with commit 231542f4e43cf9837cb520664545e85fbe666b7b Fixed in 7.2 with commit 2299822f3f466b5dcad2377bf63986199f881a6b
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98900
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/xen/gntalloc.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/e2806390aa1c4d5b3f7a68f10a56ae12c71c00d8 https://git.kernel.org/stable/c/71a0cf87e19fb35c4292ca88985e376e613c900a https://git.kernel.org/stable/c/641de086a05f349de7fc548612432bc2fed721ca https://git.kernel.org/stable/c/720554c04acba80018ded069d3e0984bebaee891 https://git.kernel.org/stable/c/84d5727cef8eb9c8a28210ad248f1c70b223b065 https://git.kernel.org/stable/c/231542f4e43cf9837cb520664545e85fbe666b7b https://git.kernel.org/stable/c/2299822f3f466b5dcad2377bf63986199f881a6b