projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b27b0e
)
RDMA/erdma: Prevent use-after-free in erdma_accept_newconn()
author
Cheng Xu
<chengyou@linux.alibaba.com>
Thu, 6 Mar 2025 12:04:40 +0000
(20:04 +0800)
committer
Leon Romanovsky
<leon@kernel.org>
Thu, 6 Mar 2025 13:25:38 +0000
(08:25 -0500)
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:
920d93eac8b9
("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>
drivers/infiniband/hw/erdma/erdma_cm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/hw/erdma/erdma_cm.c
b/drivers/infiniband/hw/erdma/erdma_cm.c
index 1b23c698ec25c3fd9860f5582546db1fbcb2504d..e0acc185e719304362be09d08af4a1c04a41e944 100644
(file)
--- a/
drivers/infiniband/hw/erdma/erdma_cm.c
+++ b/
drivers/infiniband/hw/erdma/erdma_cm.c
@@
-709,7
+709,6
@@
error:
erdma_cancel_mpatimer(new_cep);
erdma_cep_put(new_cep);
- new_cep->sock = NULL;
}
if (new_s) {