Skip to contentSkip to conversation

CVE-2026-80610: net: enetc: fix potential divide-by-zero when num_vsi is zero

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

net: enetc: fix potential divide-by-zero when num_vsi is zero

For i.MX94 series, all the standalone ENETCs do not support SR-IOV, so pf->caps.num_vsi is zero. This leads to a divide-by-zero in enetc4_default_rings_allocation() when distributing rings among PF and VFs.

Division by zero is undefined behavior in C. On ARM64, the UDIV/SDIV instructions silently return zero rather than raising an exception, so the issue does not cause a visible crash. However, relying on this behavior is incorrect and poses a cross-platform compatibility risk.

Add an explicit check for num_vsi == 0 and return early after the PF's rings have been configured.

The Linux kernel CVE team has assigned CVE-2026-80610 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.19 with commit 2d673b0e2f8d75b66aa21e5ca5d95c415dec5be7 and fixed in 7.1.5 with commit cd37bcb67f909a8683cc8c38a63ac7367a7f6161
	Issue introduced in 6.19 with commit 2d673b0e2f8d75b66aa21e5ca5d95c415dec5be7 and fixed in 7.2 with commit 5da65537792b68b6052ffcab65e04c27aea6dfe4

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-80610

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/net/ethernet/freescale/enetc/enetc4_pf.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/cd37bcb67f909a8683cc8c38a63ac7367a7f6161
	https://git.kernel.org/stable/c/5da65537792b68b6052ffcab65e04c27aea6dfe4