CVE-2026-98030: net: dsa: bcm_sf2: bound the CFP rule dump by the caller's buffer size
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: bcmsf2: bound the CFP rule dump by the caller's buffer size
bcmsf2cfprulegetall() walks the whole cfp.unique bitmap into rulelocs[] without consulting nfc->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 CFP 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.
Affected Software
Event History
Frequently Asked Questions
Who can trigger the vulnerable code path?
Any local user can issue ETHTOOL_GRXCLSRLALL without CAP_NET_ADMIN. Exploitation also depends on an administrator having installed CFP rules.
What input causes the out-of-bounds access?
A caller can request fewer rule slots than the number of installed CFP rules, causing the rule walk to exceed the caller-sized allocation. Supplying rule_cnt as 0 leaves the buffer pointer NULL and causes it to be dereferenced.
Is an administrative attacker required?
No. Installing CFP rules requires prior administrative action, but the vulnerable query itself does not require CAP_NET_ADMIN and can be made by an unprivileged user.