i40e: Fix filter input checks to prevent config with invalid values
authorSudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Wed, 29 Nov 2023 10:23:11 +0000 (11:23 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 27 Dec 2023 18:07:11 +0000 (10:07 -0800)
commit3e48041d9820c17e0a51599d12e66c6e12a8d08d
tree29a2a0c4222f6cc378817852e454b3e26da0cc5e
parent8278a6a43d030a3aa8d7768148e74844331e39e3
i40e: Fix filter input checks to prevent config with invalid values

Prevent VF from configuring filters with unsupported actions or use
REDIRECT action with invalid tc number. Current checks could cause
out of bounds access on PF side.

Fixes: e284fc280473 ("i40e: Add and delete cloud filter")
Reviewed-by: Andrii Staikov <andrii.staikov@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c