Skip Menu |
 

From: "Nebergall, Christopher" <cneberg@sandia.gov>
To: "'krb5-bugs@mit.edu'" <krb5-bugs@mit.edu>
Subject: overwriting memory in krb5_aname_to_localname
Date: Mon, 24 Nov 2003 18:28:38 -0700
759: cp is first set to point at the strings null terminator of the string
761: isspace space is run on it in a loop. (The null terminator is not
considered white space, so this does nothing).
762: cp is incremented to one past the null terminator
763: Memory after the null terminator is set to an additional null
terminator (ERROR!)

src/lib/krb5/os/an_to_ln.c

755 for (nvalid=0; mapping_values[nvalid]; nvalid++);
756
757 /* Just use the last one. */
758 /* Trim the value. */
759 cp = &mapping_values[nvalid-1]
760 [strlen(mapping_values[nvalid-1])];
761 while (isspace((int) (*cp))) cp--;
762 cp++;
763 *cp = '\0';

From Man page provided in RH 7.3

isspace()
checks for white-space characters. In the "C" and
"POSIX" locales, these are: space, form-feed
('\f'), newline ('\n'), carriage return ('\r'),
horizontal tab ('\t'), and vertical tab ('\v').
From: tlyu@mit.edu
Subject: CVS Commit
* an_to_ln.c (krb5_aname_to_localname): Don't write one byte past
the end of a string. Found by Christopher Nebergall.


To generate a diff of this commit:



cvs diff -r5.365 -r5.366 krb5/src/lib/krb5/os/ChangeLog
cvs diff -r5.39 -r5.40 krb5/src/lib/krb5/os/an_to_ln.c
From: tlyu@mit.edu
Subject: CVS Commit
pullup from trunk


To generate a diff of this commit:



cvs diff -r5.343.2.15 -r5.343.2.16 krb5/src/lib/krb5/os/ChangeLog
cvs diff -r5.39 -r5.39.2.1 krb5/src/lib/krb5/os/an_to_ln.c