CVE-2026-98029: eth: nfp: bound the ntuple rule dump by the caller's buffer size
In the Linux kernel, the following vulnerability has been resolved:
eth: nfp: bound the ntuple rule dump by the caller's buffer size
nfpnetgetfsloc() dumps every entry of nn->fs.list into rulelocs[] without consulting cmd->rulecnt, which is how many entries the caller had room for. ETHTOOLGRXCLSRLALL requires no CAPNETADMIN and the ioctl sizes the buffer from the rulecnt 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 rulecnt 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.
Affected Software
Event History
Frequently Asked Questions
Who can trigger the vulnerable code path?
Any local user able to issue the ETHTOOL_GRXCLSRLALL ioctl can trigger it; this operation does not require CAP_NET_ADMIN. Flow steering rules must already have been installed by an administrator.
What input is needed to exploit the issue?
The caller can request fewer rule-location slots than the number of installed flow steering rules, causing entries to be written beyond the userspace-sized allocation. Supplying a rule_cnt of 0 causes the buffer pointer to be NULL while the rule walk still dereferences it.
Are systems without configured flow steering rules exposed?
The described overflow condition depends on flow steering rules being present in nn->fs.list. Without installed rules, the rule dump has no entries to write, although the description specifically identifies the NULL-pointer case when rule_cnt is zero.
What behavior indicates the fix is present?
When the caller's buffer fills, the driver returns -EMSGSIZE rather than continuing to write entries. It also reports the number of rule locations actually filled, preventing callers from reading stale slots after the rule list shrinks.