diff options
author | Yuval Basson <ybason@marvell.com> | 2020-03-29 20:32:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-30 21:45:18 +0300 |
commit | 8063f761cd7c17fc1d0018728936e0c33a25388a (patch) | |
tree | 2c1283ddc185b6114cac3189770fb312b869068e /net/ncsi | |
parent | 4abc3c04810bab77ae5779adc9f6abb5dad4ac6f (diff) | |
download | linux-8063f761cd7c17fc1d0018728936e0c33a25388a.tar.xz |
qed: Fix use after free in qed_chain_free
The qed_chain data structure was modified in
commit 1a4a69751f4d ("qed: Chain support for external PBL") to support
receiving an external pbl (due to iWARP FW requirements).
The pages pointed to by the pbl are allocated in qed_chain_alloc
and their virtual address are stored in an virtual addresses array to
enable accessing and freeing the data. The physical addresses however
weren't stored and were accessed directly from the external-pbl
during free.
Destroy-qp flow, leads to freeing the external pbl before the chain is
freed, when the chain is freed it tries accessing the already freed
external pbl, leading to a use-after-free. Therefore we need to store
the physical addresses in additional to the virtual addresses in a
new data structure.
Fixes: 1a4a69751f4d ("qed: Chain support for external PBL")
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Signed-off-by: Yuval Bason <ybason@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi')
0 files changed, 0 insertions, 0 deletions