Message ID | 163116618506.12570.5744024691858636230@noble.neil.brown.name (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | gssd: fix crash in debug message. | expand |
Hi Steve, Neil,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
On 9/9/21 1:43 AM, NeilBrown wrote: > > 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") > Signed-off-by: NeilBrown <neilb@suse.de> Committed... (tag: nfs-utils-2-5-5-rc3) Thanks for the clean up!! steved. > --- > utils/gssd/krb5_util.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c > index 6d059f332881..e3f270e948ac 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/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c index 6d059f332881..e3f270e948ac 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:
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") Signed-off-by: NeilBrown <neilb@suse.de> --- utils/gssd/krb5_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)