Skip to content

Commit 278c2c1

Browse files
committed
eth: bnxt: fix out-of-range access of vnic_info array
JIRA: https://issues.redhat.com/browse/RHEL-106550 CVE: CVE-2025-22112 commit 919f9f4 Author: Taehee Yoo <ap420073@gmail.com> 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 <ap420073@gmail.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20250316025837.939527-1-ap420073@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
1 parent 7122b1b commit 278c2c1

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
@@ -15797,7 +15797,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1579715797
napi_enable(&bnapi->napi);
1579815798
bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons);
1579915799

15800-
for (i = 0; i <= bp->nr_vnics; i++) {
15800+
for (i = 0; i < bp->nr_vnics; i++) {
1580115801
vnic = &bp->vnic_info[i];
1580215802

1580315803
rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
@@ -15831,7 +15831,7 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
1583115831
struct bnxt_napi *bnapi;
1583215832
int i;
1583315833

15834-
for (i = 0; i <= bp->nr_vnics; i++) {
15834+
for (i = 0; i < bp->nr_vnics; i++) {
1583515835
vnic = &bp->vnic_info[i];
1583615836
vnic->mru = 0;
1583715837
bnxt_hwrm_vnic_update(bp, vnic,

0 commit comments

Comments
 (0)