octeontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()
commit f927ef17c610e4ad1bc7cd86e252d529fecc135d from git@git.assembla.com:cavium/WindRiver.linux.git This function is called from ethtool_set_rxfh() and "*rss_context" comes from the user. Add some bounds checking to prevent memory corruption. Change-Id: Ica11b505d79e59f10a5ac5fb48ddccbeb24502ff Fixes: 81a43620 ("octeontx2-pf: Add RSS multi group support") Signed-off-by:Dan Carpenter <dan.carpenter@oracle.com> Acked-by:
Sunil Goutham <sgoutham@marvell.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/56145 Tested-by:
sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by:
Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by:
Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
Loading
Please register or sign in to comment