]> git.ipfire.org Git - thirdparty/linux.git/commit
eth: bnxt: fix out-of-range access of vnic_info array
authorTaehee Yoo <ap420073@gmail.com>
Sun, 16 Mar 2025 02:58:37 +0000 (02:58 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Fri, 21 Mar 2025 18:21:04 +0000 (19:21 +0100)
commit919f9f497dbcee75d487400e8f9815b74a6a37df
treed90fa37cc815b12be05fe0c7bd418f65f4371cdb
parentf653b608f78363c26dc4ffd6c2465eb743ebdc13
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: 661958552eda ("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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c