[30674] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Add NegoEx assertion to squash defect

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sun Jan 5 01:54:39 2020

Date: Sun, 5 Jan 2020 01:54:30 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-ID: <202001050654.0056sUtO018870@drugstore.mit.edu>
To: <cvs-krb5@mit.edu>
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/38151b3c1e69873122065e1f8351c026e1edc737
commit 38151b3c1e69873122065e1f8351c026e1edc737
Author: Greg Hudson <ghudson@mit.edu>
Date:   Mon Dec 9 11:42:47 2019 -0500

    Add NegoEx assertion to squash defect
    
    Coverity sees negoex_init() test whether input_token is null before
    parsing messages, then dereference input_token in verify_checksum().
    Of course verify_checksum() will not find a checksum message if no
    messages were parsed.  Add an assert to squash the false positive
    forward-null defect.

 src/lib/gssapi/spnego/negoex_ctx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lib/gssapi/spnego/negoex_ctx.c b/src/lib/gssapi/spnego/negoex_ctx.c
index e69b720..18d9d41 100644
--- a/src/lib/gssapi/spnego/negoex_ctx.c
+++ b/src/lib/gssapi/spnego/negoex_ctx.c
@@ -454,6 +454,7 @@ verify_checksum(OM_uint32 *minor, spnego_gss_ctx_id_t ctx,
 
     /* Verify the checksum over the existing transcript and the portion of the
      * input token leading up to the verify message. */
+    assert(input_token != NULL);
     iov[0].flags = KRB5_CRYPTO_TYPE_DATA;
     iov[0].data = make_data(ctx->negoex_transcript.data,
                             ctx->negoex_transcript.len);
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post