[prev in list] [next in list] [prev in thread] [next in thread] 

List:       krb5-bugs
Subject:    [krbdev.mit.edu #9047] git commit
From:       "Greg Hudson via RT" <rt-comment () krbdev ! mit ! edu>
Date:       2022-01-28 2:11:01
Message-ID: rt-4.4.3-2-2247417-1643335861-575.9047-4-0 () mit ! edu
[Download RAW message or body]


Thu Jan 27 21:11:01 2022: Request 9047 was acted upon.
 Transaction: Ticket created by ghudson@mit.edu
       Queue: krb5
     Subject: git commit
       Owner: ghudson@mit.edu
  Requestors: 
      Status: new
 Ticket <URL: https://krbdev.mit.edu/rt/Ticket/Display.html?id=9047 >



Avoid passing null for asprintf strings

It is undefined behavior to pass null to a printf function for a %.*s
substitution, even if the accompanying length is zero.  OpenBSD
generates syslog warnings from libc when it sees a null pointer in a
string substitution (reported by Nathanael Rensen).
krb5_sname_to_principal() passes a null pointer in the usual case
where there is no port trailer.  Address this case and others where we
use asprintf() with %.*s substitutions and might pass null, either by
avoiding the use of asprintf() or by ensuring that the pointer isn't
null.

https://github.com/krb5/krb5/commit/b6a29fec8e9f283aec0b82ca22328014725d0d7f
Author: Greg Hudson <ghudson@mit.edu>
Commit: b6a29fec8e9f283aec0b82ca22328014725d0d7f
Branch: master
 src/kadmin/server/server_stubs.c |    6 +++-
 src/lib/krb5/krb/get_in_tkt.c    |    5 +--
 src/lib/krb5/krb/preauth_otp.c   |   41 +++++++++++++++++--------------------
 src/lib/krb5/os/sn2princ.c       |    2 +-
 4 files changed, 26 insertions(+), 28 deletions(-)

_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic