[3315] in Kerberos-V5-bugs

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

krb5-libs/1064: incorrect option processing in kg2_parse_token

daemon@ATHENA.MIT.EDU (Dan Riley)
Fri Feb 22 14:49:31 2002

Resent-From: gnats@rt-11.mit.edu (GNATS Management)
Resent-To: krb5-unassigned@rt-11.mit.edu
Resent-Reply-To: krb5-bugs@mit.edu, dsr@mail.lns.cornell.edu
Message-Id: <200202221939.OAA0000019720@lnscu6.lns.cornell.edu>
From: Dan Riley <dsr@mail.lns.cornell.edu>
Reply-To: dsr@mail.lns.cornell.edu
To: krb5-bugs@mit.edu
Errors-To: krb5-bugs-admin@mit.edu
Date: Fri, 22 Feb 2002 14:39:03 -0500 (EST)


>Number:         1064
>Category:       krb5-libs
>Synopsis:       incorrect option processing in kg2_parse_token
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    krb5-unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Fri Feb 22 14:40:01 EST 2002
>Last-Modified:
>Originator:     Dan Riley
>Organization:
LNS, Cornell U.
>Release:        krb5-1.2.3
>Environment:
System: OSF1 lnscu6.lns.cornell.edu V4.0 1229 alpha
Machine: alpha
>Description:
The comments for kg2_parse_token say:

   noptions/options lists all the options which the caller cares
   about.  Those which are present in the token are filled in; the
   order and length are not changed.

The current code actually assigns all options to options[0], due
to '='/'==' typo and a misplaced break.
>How-To-Repeat:
>Fix:
diff -ur krb5-1.2.3/src/lib/gssapi/krb5/util_ctxsetup.c krb5/lib/gssapi/krb5/util_ctxsetup.c
--- krb5-1.2.3/src/lib/gssapi/krb5/util_ctxsetup.c	Wed Jan  9 17:27:43 2002
+++ krb5/lib/gssapi/krb5/util_ctxsetup.c	Sat Sep 18 13:11:28 1999
@@ -103,11 +103,11 @@
 	    goto defective;
 
 	for (i=0; i<noptions; i++) {
-	    if (options[i].option_id = opt_id) {
+	    if (options[i].option_id == opt_id) {
 		options[i].length = field_length;
 		options[i].data = ptr;
+		break;
 	    }
-	    break;
 	}
 	    
 	ptr += field_length;
>Audit-Trail:
>Unformatted:
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
http://mailman.mit.edu/mailman/listinfo/krb5-bugs

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