From b20f32a0e6629ee3a0ae15055d9cc79e43238fbf Mon Sep 17 00:00:00 2001 From: Wenhua Huang Date: Wed, 10 Jul 2024 14:49:50 +0800 Subject: [PATCH] gssapi: fix rpc_gss_seccreate passed in cred Fix rpc_gss_seccreate() usage of the passed in gss credential. Fixes: 5f1fe4dde861 ("Pass time_req and input_channel_bindings through to init_sec_context") (cherry picked from commit 48ae14e5b7bcbc89d59243864aadea0170b164ca) --- ...fix-rpc_gss_seccreate-passed-in-cred.patch | 35 +++++++++++++++++++ libtirpc.spec | 9 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 backport-fix-rpc_gss_seccreate-passed-in-cred.patch diff --git a/backport-fix-rpc_gss_seccreate-passed-in-cred.patch b/backport-fix-rpc_gss_seccreate-passed-in-cred.patch new file mode 100644 index 0000000..40f7366 --- /dev/null +++ b/backport-fix-rpc_gss_seccreate-passed-in-cred.patch @@ -0,0 +1,35 @@ +From 22b1c0cd6076dcd7df822cd1181e98278dc865db Mon Sep 17 00:00:00 2001 +From: Olga Kornievskaia +Date: Wed, 3 Jan 2024 17:50:42 -0500 +Subject: [PATCH] gssapi: fix rpc_gss_seccreate passed in cred + +Fix rpc_gss_seccreate() usage of the passed in gss credential. + +Fixes: 5f1fe4dde861 ("Pass time_req and input_channel_bindings through to init_sec_context") + +Reviewed-by: Chuck Lever +Signed-off-by: Olga Kornievskaia +Signed-off-by: Steve Dickson +--- + src/auth_gss.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/auth_gss.c b/src/auth_gss.c +index e317664..9d18f96 100644 +--- a/src/auth_gss.c ++++ b/src/auth_gss.c +@@ -842,9 +842,9 @@ rpc_gss_seccreate(CLIENT *clnt, char *principal, char *mechanism, + gd->sec = sec; + + if (req) { +- sec.req_flags = req->req_flags; ++ gd->sec.req_flags = req->req_flags; + gd->time_req = req->time_req; +- sec.cred = req->my_cred; ++ gd->sec.cred = req->my_cred; + gd->icb = req->input_channel_bindings; + } + +-- +2.25.1 + diff --git a/libtirpc.spec b/libtirpc.spec index 521d477..49f406f 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -1,12 +1,13 @@ Name: libtirpc Version: 1.3.4 -Release: 3 +Release: 4 Summary: Transport-independent RPC library License: SISSL and BSD URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary Source0: http://downloads.sourceforge.net/libtirpc/%{name}-%{version}.tar.bz2 Patch0: 0001-update-libtirpc-to-enable-tcp-port-listening.patch Patch1: backport-fix-memory-leak-in-destroy_addr.patch +Patch2: backport-fix-rpc_gss_seccreate-passed-in-cred.patch BuildRequires: automake autoconf libtool pkgconfig krb5-devel %description @@ -64,6 +65,12 @@ mv %{buildroot}%{_mandir}/man3 %{buildroot}%{_mandir}/man3t %{_mandir}/*/* %changelog +* Wed Jul 10 2024 Wenhua Huang - 1.3.4-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix rpc_gss_seccreate passed in cred + * Tue Jul 09 2024 gaihuiying - 1.3.4-3 - Type:bugfix - CVE:NA