In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix steering rules cleanup
vport's mc, uc and multicast rules are not deleted in teardown path when EEH happens. Since the vport's promisc settings(uc, mc and all) in firmware are reset after EEH, mlx5 driver will try to delete the above rules in the initialization path. This cause kernel crash because these software rules are no longer valid.
Fix by nullifying these rules right after delete to avoid accessing any dangling pointers.
Call Trace: _listdelentryvalid+0xcc/0x100 (unreliable) treeputnode+0xf4/0x1b0 [mlx5core] treeremovenode+0x30/0x70 [mlx5core] mlx5delflowrules+0x14c/0x1f0 [mlx5core] eswapplyvportrxmode+0x10c/0x200 [mlx5core] eswupdatevportrxmode+0xb4/0x180 [mlx5core] eswvportchangehandlelocked+0x1ec/0x230 [mlx5core] eswenablevport+0x130/0x260 [mlx5core] mlx5eswitchenablesriov+0x2a0/0x2f0 [mlx5core] mlx5deviceenablesriov+0x74/0x440 [mlx5core] mlx5loadone+0x114c/0x1550 [mlx5core] mlx5pciresume+0x68/0xf0 [mlx5core] eehreportresume+0x1a4/0x230 eehpedevtraverse+0x98/0x170 eehhandlenormalevent+0x3e4/0x640 eehhandleevent+0x4c/0x370 eeheventhandler+0x14c/0x210 kthread+0x168/0x1b0 retfromkernel_thread+0x5c/0x84