CVE-2026-98029 PUBLISHED

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

Assigner: Linux
Reserved: 25.09.2026 Published: 25.09.2026 Updated: 25.09.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7

AV:L - The trigger is a local SIOCETHTOOL ioctl (ETHTOOL_GRXCLSRLALL) on a socket, reaching ethtool_get_rxnfc() -> nfp_net_get_rxnfc() -> nfp_net_get_fs_loc(). The rule_cnt that sizes the buffer comes from the local caller, not from any packet off the wire. AC:H - The overflow needs a non-empty nn->fs.list on an NFP NIC with NFP_NET_CFG_CTRL_FLOW_STEER. Only an admin can create those rules, via set_rxnfc/nfp_net_fs_add with CAP_NET_ADMIN on a physical init-netns device. The unprivileged attacker cannot create this state and must wait for it to exist. PR:L - dev_ethtool() lists ETHTOOL_GRXCLSRLALL among the commands anyone may run and skips the ns_capable(CAP_NET_ADMIN) check for it. Any local unprivileged user can call it with a small rule_cnt. UI:N - No victim action is needed. The attacker issues the ioctl whenever they like, once the rules exist as a standing configuration. S:U - Kernel heap corruption leading to local privilege escalation or a crash stays within the kernel's own security authority. C:H - ethtool_get_rxnfc() sizes rule_buf with kcalloc(rule_cnt), so the attacker chooses the slab cache. nfp_net_get_fs_loc() then writes up to ~4KB of u32 rule locations past it. That corrupts adjacent kmalloc objects, which can be leveraged into an information leak. I:H - This is an out-of-bounds heap write into neighbouring slab objects in a cache the attacker chooses, with an attacker-chosen overflow length (rule count minus rule_cnt). It is a memory corruption primitive usable against adjacent object fields. A:H - With rule_cnt=0, rule_buf stays NULL and rule_locs[0] = entry->loc writes through the NULL pointer, oopsing the kernel. Larger overflows corrupt the slab and can panic the kernel. Either can be repeated at will by an unprivileged user.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 9eb03bb1c035ff6e2c3a34046419446588253dda to 82812583b9c69c241da6da4186f14e9df2516488 (excl.)
  • affected from 9eb03bb1c035ff6e2c3a34046419446588253dda to a7e023c63e855761c1426cee8d17c2bca32aa339 (excl.)
  • affected from 9eb03bb1c035ff6e2c3a34046419446588253dda to ecebfdaab72a504c10f4907bd00fc3b705ec3b12 (excl.)
  • affected from 9eb03bb1c035ff6e2c3a34046419446588253dda to f1986bf87b0709c95126fe196cf39e5b8c8453a1 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.8 is affected
  • unaffected from 0 to 6.8 (excl.)
  • unaffected from 6.12.111 to 6.12.* (incl.)
  • unaffected from 6.18.53 to 6.18.* (incl.)
  • unaffected from 7.2.7 to 7.2.* (incl.)
  • unaffected from 7.3-rc3 to * (incl.)

References