|
|
8ad293 |
From 81e757b7b1d69893b5725f9c148c55d89c779e7b Mon Sep 17 00:00:00 2001
|
|
|
8ad293 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
8ad293 |
Date: Tue, 3 Nov 2020 10:12:15 +0100
|
|
|
8ad293 |
Subject: [PATCH] ifp: fix use-after-free
|
|
|
8ad293 |
MIME-Version: 1.0
|
|
|
8ad293 |
Content-Type: text/plain; charset=UTF-8
|
|
|
8ad293 |
Content-Transfer-Encoding: 8bit
|
|
|
8ad293 |
|
|
|
8ad293 |
The variable fqdn is pointing to some data from state->res->msgs[0]. But
|
|
|
8ad293 |
before fqdn is used in the next search state->res and the memory
|
|
|
8ad293 |
hierarchy below is freed. As a result the location where fqdn is pointing
|
|
|
8ad293 |
to might hold the expected data or other data and the search will fail
|
|
|
8ad293 |
intermittently.
|
|
|
8ad293 |
|
|
|
8ad293 |
Resolves: https://github.com/SSSD/sssd/issues/5382
|
|
|
8ad293 |
|
|
|
8ad293 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
8ad293 |
---
|
|
|
8ad293 |
src/responder/ifp/ifpsrv_cmd.c | 1 +
|
|
|
8ad293 |
1 file changed, 1 insertion(+)
|
|
|
8ad293 |
|
|
|
8ad293 |
diff --git a/src/responder/ifp/ifpsrv_cmd.c b/src/responder/ifp/ifpsrv_cmd.c
|
|
|
8ad293 |
index 9f20bf2db..d95618127 100644
|
|
|
8ad293 |
--- a/src/responder/ifp/ifpsrv_cmd.c
|
|
|
8ad293 |
+++ b/src/responder/ifp/ifpsrv_cmd.c
|
|
|
8ad293 |
@@ -128,6 +128,7 @@ static void ifp_user_get_attr_done(struct tevent_req *subreq)
|
|
|
8ad293 |
tevent_req_error(req, ERR_INTERNAL);
|
|
|
8ad293 |
return;
|
|
|
8ad293 |
}
|
|
|
8ad293 |
+ fqdn = talloc_steal(state, fqdn);
|
|
|
8ad293 |
|
|
|
8ad293 |
if (state->search_type == SSS_DP_USER) {
|
|
|
8ad293 |
/* throw away the result and perform attr search */
|
|
|
8ad293 |
--
|
|
|
8ad293 |
2.21.3
|
|
|
8ad293 |
|