URL: https://github.com/SSSD/sssd/pull/5416 Author: sumit-bose Title: #5416: fp: fix original fix use-after-free - 1.16 version Action: opened
PR body: """ This should have been a cherry-pick of 3b158934cbb8f87cbfaf1650389b8dcd654b92ca but the cherry-pick of the original patch was broken and placed the change into a different function. This patch fixes this by directly placing the change at the right place. Resolves: https://github.com/SSSD/sssd/issues/5382 """ To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5416/head:pr5416 git checkout pr5416
From d13cff561215bd3ca2df0b4dc518bf5a1880dcee Mon Sep 17 00:00:00 2001 From: Sumit Bose <sb...@redhat.com> Date: Mon, 23 Nov 2020 13:40:30 +0100 Subject: [PATCH] fp: fix original fix use-after-free - 1.16 version This should have been a cherry-pick of 3b158934cbb8f87cbfaf1650389b8dcd654b92ca but the cherry-pick of the original patch was broken and placed the change into a different function. This patch fixes this by directly placing the change at the right place. Resolves: https://github.com/SSSD/sssd/issues/5382 --- src/responder/ifp/ifpsrv_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/responder/ifp/ifpsrv_cmd.c b/src/responder/ifp/ifpsrv_cmd.c index d836006810..620afe86a6 100644 --- a/src/responder/ifp/ifpsrv_cmd.c +++ b/src/responder/ifp/ifpsrv_cmd.c @@ -124,7 +124,6 @@ ifp_user_get_attr_unpack_msg(struct ifp_attr_req *attr_req) if (attr_req->attrs == NULL) { return ENOMEM; } - fqdn = talloc_steal(state, fqdn); ai = 0; for (i = 0; i < nattrs; i++) { @@ -576,7 +575,8 @@ static void ifp_user_get_attr_done(struct tevent_req *subreq) } if (state->search_type == SSS_DP_USER) { - /* throw away the result and perform attr search */ + /* throw away the result but keep the fqdn and perform attr search */ + fqdn = talloc_steal(state, fqdn); talloc_zfree(state->res); ret = sysdb_get_user_attr_with_views(state, state->dom, fqdn,
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org