RDMA/erdma: Prevent use-after-free in erdma_accept_newconn()
[ Upstream commit 83437689249e6a17b25e27712fbee292e42e7855 ]
After the erdma_cep_put(new_cep) being called, new_cep will be freed,
and the following dereference will cause a UAF problem. Fix this issue.
Fixes: 920d93eac8
("RDMA/erdma: Add connection management (CM) support")
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7844932c18
commit
bc1db4d8f1
@ -704,7 +704,6 @@ error:
|
||||
erdma_cancel_mpatimer(new_cep);
|
||||
|
||||
erdma_cep_put(new_cep);
|
||||
new_cep->sock = NULL;
|
||||
}
|
||||
|
||||
if (new_s) {
|
||||
|
Loading…
Reference in New Issue
Block a user