CVE-2026-98390: x86/amd_node: Avoid divide by zero on virtualized systems
In the Linux kernel, the following vulnerability has been resolved:
x86/amdnode: Avoid divide by zero on virtualized systems
On a virtualized system, the number of nodes does not have a relationship to the number of roots. A Xen PVH dom0 can calculate rootspernode as 0, which crashes with a divide by zero in:
if (count++ % rootspernode)
because the underlying topology code on Xen ends up making numnodes 2 and numroots 1 and the integer division result is 0.
The issue is seen with Xen, but it could affect other systems.
Set rootspernode to 1 in this case. Print a firmware bug when this is performed for non-virtualized systems.
[ bp: Massage commit message. ]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Set roots_per_node to 1 when the virtualized topology calculation would otherwise produce 0, preventing division by zero.
Linux kernel x86/amd_node roots_per_node = 1
Event History
Frequently Asked Questions
Which environments are most likely to be exposed to this crash?
The issue has been observed on Xen PVH dom0 systems, where topology reporting can produce two nodes and one root. Other virtualized systems may also be affected when the reported node and root counts result in roots_per_node being zero.
What condition triggers the divide-by-zero fault?
The fault occurs when topology calculation divides the number of roots by the number of nodes and the integer result is zero, then uses that value as the modulus divisor. The described Xen case has num_nodes set to 2 and num_roots set to 1.
What behavior does the fix introduce for affected topology values?
The fix sets roots_per_node to 1 when the calculated value would be zero, preventing the modulus operation from dividing by zero. On non-virtualized systems, this fallback also emits a firmware-bug message.