Skip to content

Commit b6a9444

Browse files
pvts-matPlaidCat
authored andcommitted
i40e: fix idx validation in config queues msg
jira VULN-158747 cve CVE-2025-39971 commit-author Lukasz Czapnik <lukasz.czapnik@intel.com> commit f1ad24c upstream-diff Resolved context conflicts due to the missing backport of 230f3d5. No actual diffs from the upstream. Ensure idx is within range of active/initialized TCs when iterating over vf->ch[idx] in i40e_vc_config_queues_msg(). Fixes: c27eac4 ("i40e: Enable ADq and create queue channel/s on VF") Cc: stable@vger.kernel.org Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Kamakshi Nellore <nellorex.kamakshi@intel.com> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> (cherry picked from commit f1ad24c) Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
1 parent 7f25819 commit b6a9444

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
22922292
}
22932293

22942294
if (vf->adq_enabled) {
2295-
if (idx >= ARRAY_SIZE(vf->ch)) {
2295+
if (idx >= vf->num_tc) {
22962296
aq_ret = I40E_ERR_NO_AVAILABLE_VSI;
22972297
goto error_param;
22982298
}
@@ -2313,7 +2313,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
23132313
* to its appropriate VSIs based on TC mapping
23142314
*/
23152315
if (vf->adq_enabled) {
2316-
if (idx >= ARRAY_SIZE(vf->ch)) {
2316+
if (idx >= vf->num_tc) {
23172317
aq_ret = I40E_ERR_NO_AVAILABLE_VSI;
23182318
goto error_param;
23192319
}

0 commit comments

Comments
 (0)