]> git.baikalelectronics.ru Git - kernel.git/commit
gve: DQO: Fix off by one in gve_rx_dqo()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 29 Jun 2021 08:25:13 +0000 (11:25 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jun 2021 18:49:44 +0000 (11:49 -0700)
commit02b8356341639985c5ac965e5073a0a850a0496d
tree01e114b8af6a1b8944f3b5b7196df9df9631700d
parent51e3505a3ac51cf9e13151931dc4cfe92d539578
gve: DQO: Fix off by one in gve_rx_dqo()

The rx->dqo.buf_states[] array is allocated in gve_rx_alloc_ring_dqo()
and it has rx->dqo.num_buf_states so this > needs to >= to prevent an
out of bounds access.

Fixes: a66e9551eb8f ("gve: DQO: Add RX path")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve_rx_dqo.c