[SRU][N][PATCH 1/1] RDMA/erdma: Prevent use-after-free in erdma_accept_newconn()
Massimiliano Pellizzer
massimiliano.pellizzer at canonical.com
Wed Jun 4 15:02:15 UTC 2025
From: Cheng Xu <chengyou at linux.alibaba.com>
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 at users.sourceforge.net>
Signed-off-by: Cheng Xu <chengyou at linux.alibaba.com>
Signed-off-by: Leon Romanovsky <leon at kernel.org>
(cherry picked from commit 83437689249e6a17b25e27712fbee292e42e7855)
CVE-2025-22088
Signed-off-by: Massimiliano Pellizzer <massimiliano.pellizzer at canonical.com>
---
drivers/infiniband/hw/erdma/erdma_cm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/infiniband/hw/erdma/erdma_cm.c b/drivers/infiniband/hw/erdma/erdma_cm.c
index 771059a8eb7d7..e349e8d2fb50a 100644
--- a/drivers/infiniband/hw/erdma/erdma_cm.c
+++ b/drivers/infiniband/hw/erdma/erdma_cm.c
@@ -705,7 +705,6 @@ static void erdma_accept_newconn(struct erdma_cep *cep)
erdma_cancel_mpatimer(new_cep);
erdma_cep_put(new_cep);
- new_cep->sock = NULL;
}
if (new_s) {
--
2.48.1
More information about the kernel-team
mailing list