Skip to contentSkip to conversation

CVE-2026-98029: eth: nfp: bound the ntuple rule dump by the caller's buffer size

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

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

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

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

eth: nfp: bound the ntuple rule dump by the caller's buffer size

nfp_net_get_fs_loc() dumps every entry of nn->fs.list into rule_locs[] without consulting cmd->rule_cnt, which is how many entries the caller had room for. ETHTOOL_GRXCLSRLALL requires no CAP_NET_ADMIN and the ioctl sizes the buffer from the rule_cnt userspace passes in, so once an admin has installed flow steering rules any user can ask for fewer slots than there are rules and run off the end of the allocation. A rule_cnt of 0 leaves the buffer pointer NULL and the walk dereferences it.

Bail out with -EMSGSIZE when the buffer fills up, the way the other ntuple capable drivers do, and report how many locations were filled so a shrinking rule list does not leave the caller reading stale slots.

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

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

	Issue introduced in 6.8 with commit 9eb03bb1c035ff6e2c3a34046419446588253dda and fixed in 6.12.111 with commit 82812583b9c69c241da6da4186f14e9df2516488
	Issue introduced in 6.8 with commit 9eb03bb1c035ff6e2c3a34046419446588253dda and fixed in 6.18.53 with commit a7e023c63e855761c1426cee8d17c2bca32aa339
	Issue introduced in 6.8 with commit 9eb03bb1c035ff6e2c3a34046419446588253dda and fixed in 7.2.7 with commit ecebfdaab72a504c10f4907bd00fc3b705ec3b12
	Issue introduced in 6.8 with commit 9eb03bb1c035ff6e2c3a34046419446588253dda and fixed in 7.3-rc3 with commit f1986bf87b0709c95126fe196cf39e5b8c8453a1

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

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/netronome/nfp/nfp_net_ethtool.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/82812583b9c69c241da6da4186f14e9df2516488
	https://git.kernel.org/stable/c/a7e023c63e855761c1426cee8d17c2bca32aa339
	https://git.kernel.org/stable/c/ecebfdaab72a504c10f4907bd00fc3b705ec3b12
	https://git.kernel.org/stable/c/f1986bf87b0709c95126fe196cf39e5b8c8453a1