CVE-2026-98798: net: bcmgenet: fix NULL dereference in set_coalesce before first open
In the Linux kernel, the following vulnerability has been resolved:
net: bcmgenet: fix NULL dereference in setcoalesce before first open
The Rx ring priv and index are only set in bcmgenetinitrxring(), which runs at open. Setting the Rx coalescing parameters on an interface that was never opened, e.g. "ethtool -C eth0 rx-usecs 50", dereferences a NULL ring->priv. The oops happens with RTNL held, so networking stays stuck until a reboot:
Unable to handle kernel paging request at virtual address 0000000000002788 pc : bcmgenetsetrxcoalesce.isra.0+0x10/0x88 lr : bcmgenetsetcoalesce+0xe8/0x180 Call trace: bcmgenetsetrxcoalesce.isra.0+0x10/0x88 (P) ethnlsetcoalesce.isra.0+0x490/0x570 ethnlsetcoalesce+0x48/0xc0 ethnldefaultsetdoit+0xf4/0x230 genlfamilyrcvmsgdoit+0xe8/0x160 genlrcvmsg+0x220/0x2a0 netlinkrcvskb+0x68/0x140 genlrcv+0x40/0x60 netlinkunicast+0x338/0x3c0 netlinksendmsg+0x19c/0x3f8 socksendmsg+0x64/0xc0 syssendto+0x124/0x198 arm64syssendto+0x30/0x48
Set priv and index at probe. Writing the registers while the interface is down is harmless because open resets the MAC and bcmgenetinitrxcoalesce() reapplies the stored values.
It was observed on a Raspberry Pi CM4, but should apply to all other genet devices.