Skip to content

Commit 30d873f

Browse files
committed
eth: bnxt: fix out-of-range access of vnic_info array
JIRA: https://issues.redhat.com/browse/RHEL-107291 CVE: CVE-2025-22112 commit 919f9f4 Author: Taehee Yoo <[email protected]> Date: Sun Mar 16 02:58:37 2025 +0000 eth: bnxt: fix out-of-range access of vnic_info array The bnxt_queue_{start | stop}() access vnic_info as much as allocated, which indicates bp->nr_vnics. So, it should not reach bp->vnic_info[bp->nr_vnics]. Fixes: 6619585 ("eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic") Signed-off-by: Taehee Yoo <[email protected]> Reviewed-by: Michael Chan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Michal Schmidt <[email protected]>
1 parent f6cad31 commit 30d873f

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+2
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15800,7 +15800,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1580015800
napi_enable(&bnapi->napi);
1580115801
bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons);
1580215802

15803-
for (i = 0; i <= bp->nr_vnics; i++) {
15803+
for (i = 0; i < bp->nr_vnics; i++) {
1580415804
vnic = &bp->vnic_info[i];
1580515805

1580615806
rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
@@ -15834,7 +15834,7 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
1583415834
struct bnxt_napi *bnapi;
1583515835
int i;
1583615836

15837-
for (i = 0; i <= bp->nr_vnics; i++) {
15837+
for (i = 0; i < bp->nr_vnics; i++) {
1583815838
vnic = &bp->vnic_info[i];
1583915839
vnic->mru = 0;
1584015840
bnxt_hwrm_vnic_update(bp, vnic,

0 commit comments

Comments
 (0)