net: mvpp2: cls: Prevent buffer overflow in mvpp2_ethtool_cls_rule_del()
commit 722c0f00 upstream. The "info->fs.location" is a u32 that comes from the user via the ethtool_set_rxnfc() function. We need to check for invalid values to prevent a buffer overflow. I copy and pasted this check from the mvpp2_ethtool_cls_rule_ins() function. Fixes: 90b509b3 ("net: mvpp2: cls: Add Classification offload support") Signed-off-by:Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com>
parent
3e68db4e
Please register or sign in to comment