Skip to content

Commit 6e9b8a6

Browse files
committed
i40e: fix idx validation in config queues msg
jira KERNEL-238 cve CVE-2025-39971 Rebuild_History Non-Buildable kernel-6.12.0-124.16.1.el10_1 commit-author Lukasz Czapnik <lukasz.czapnik@intel.com> commit f1ad24c 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: Jonathan Maple <jmaple@ciq.com>
1 parent bad6d4a commit 6e9b8a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

24002400
if (vf->adq_enabled) {
2401-
if (idx >= ARRAY_SIZE(vf->ch)) {
2401+
if (idx >= vf->num_tc) {
24022402
aq_ret = -ENODEV;
24032403
goto error_param;
24042404
}
@@ -2419,7 +2419,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
24192419
* to its appropriate VSIs based on TC mapping
24202420
*/
24212421
if (vf->adq_enabled) {
2422-
if (idx >= ARRAY_SIZE(vf->ch)) {
2422+
if (idx >= vf->num_tc) {
24232423
aq_ret = -ENODEV;
24242424
goto error_param;
24252425
}

0 commit comments

Comments
 (0)