[16816] in Kerberos-V5-bugs
[krbdev.mit.edu #9047] git commit
daemon@ATHENA.MIT.EDU (Greg Hudson via RT)
Thu Jan 27 21:11:08 2022
From: "Greg Hudson via RT" <rt-comment@krbdev.mit.edu>
In-Reply-To:
Message-ID: <rt-4.4.3-2-2247417-1643335861-575.9047-4-0@mit.edu>
To: "AdminCc of krbdev.mit.edu Ticket #9047":;
Date: Thu, 27 Jan 2022 21:11:01 -0500
MIME-Version: 1.0
Reply-To: rt-comment@krbdev.mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu
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