diff options
| author | Lukasz Czapnik <[email protected]> | 2025-08-13 10:45:14 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-09-18 22:46:29 +0000 |
| commit | 9739d5830497812b0bdeaee356ddefbe60830b88 (patch) | |
| tree | ff47a29e461a0e399db0d4ae28f4d879cd93c0b7 | |
| parent | i40e: fix idx validation in config queues msg (diff) | |
| download | kernel-9739d5830497812b0bdeaee356ddefbe60830b88.tar.gz kernel-9739d5830497812b0bdeaee356ddefbe60830b88.zip | |
i40e: fix input validation logic for action_meta
Fix condition to check 'greater or equal' to prevent OOB dereference.
Fixes: e284fc280473 ("i40e: Add and delete cloud filter")
Cc: [email protected]
Signed-off-by: Lukasz Czapnik <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
Signed-off-by: Przemek Kitszel <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index b6db4d78c02d..c85715f75435 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -3603,7 +3603,7 @@ static int i40e_validate_cloud_filter(struct i40e_vf *vf, /* action_meta is TC number here to which the filter is applied */ if (!tc_filter->action_meta || - tc_filter->action_meta > vf->num_tc) { + tc_filter->action_meta >= vf->num_tc) { dev_info(&pf->pdev->dev, "VF %d: Invalid TC number %u\n", vf->vf_id, tc_filter->action_meta); goto err; |
