From 382728b7082edd039553fea9d9dfb61c95859460 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 11 Jan 2022 12:48:08 -0500 Subject: [PATCH] gssd: fix crash in debug message. (bz 1999476) Signed-off-by: Steve Dickson Resolves: bz1999476 --- nfs-utils-2.5.4-gssd-debug-msg.patch | 33 ++++++++++++++++++++++++++++ nfs-utils.spec | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 nfs-utils-2.5.4-gssd-debug-msg.patch diff --git a/nfs-utils-2.5.4-gssd-debug-msg.patch b/nfs-utils-2.5.4-gssd-debug-msg.patch new file mode 100644 index 0000000..bdeaaaf --- /dev/null +++ b/nfs-utils-2.5.4-gssd-debug-msg.patch @@ -0,0 +1,33 @@ +commit cfe41d6f06af0e7744c1ca30503f93d28aca4d8b +Author: NeilBrown +Date: Tue Sep 21 12:47:10 2021 -0400 + + gssd: fix crash in debug message. + + A recent cleanup of debug messages added func and tid format specifiers + to a debug message (when full hostname was different), but the func name + and tid were NOT added as arguments. + + Consequently there weren't enough args, random bytes of the stack were + interpreted as a pointer, and rpc.gssd crashed (when -v was specified). + + Fixes: b538862a5135 ("gssd: Cleaned up debug messages") + Reviewed-by: Petr Vorel + Signed-off-by: NeilBrown + Signed-off-by: Steve Dickson + +diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c +index 6d059f33..e3f270e9 100644 +--- a/utils/gssd/krb5_util.c ++++ b/utils/gssd/krb5_util.c +@@ -673,8 +673,8 @@ get_full_hostname(const char *inhost, char *outhost, int outhostlen) + *c = tolower(*c); + + if (get_verbosity() && strcmp(inhost, outhost)) +- printerr(1, "%s(0x%0lx): inhost '%s' different than outhost'%s'\n", +- inhost, outhost); ++ printerr(1, "%s(0x%0lx): inhost '%s' different than outhost '%s'\n", ++ __func__, tid, inhost, outhost); + + retval = 0; + out: diff --git a/nfs-utils.spec b/nfs-utils.spec index 810d60c..ff4e79a 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -21,6 +21,7 @@ Patch001: nfs-utils-2.5.4-mount-sloppy.patch Patch002: nfs-utils-2.5.4-nfsdcltrack-printf.patch Patch003: nfs-utils-2.5.4-general-memory-fixes.patch Patch004: nfs-utils-2.5.4-mount-nov2.patch +Patch005: nfs-utils-2.5.4-gssd-debug-msg.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -449,6 +450,7 @@ fi %changelog * Tue Jan 11 2022 Steve Dickson 2.5.4-7 - Added a gating.yaml file (bz 1996211) +- gssd: fix crash in debug message. (bz 1999476) * Mon Jan 10 2022 Steve Dickson 2.5.4-6 - Update tools to reflect removal of NFS v2 support (bz 1966643)