[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some memory management problems



On 12 Apr 2000, Assar Westerlund wrote:

> Do you have any hints on how to reproduce these problems so that we
> can try debugging them?

Unfortunately I did not keep the stack traces. If I have time I will try
to reproduce the errors. Till then I found a new bug (using "klist -c
/tmp/test", where /tmp/test was not a valid credential cache file):

Program received signal SIGSEGV, Segmentation fault.
0x400340a1 in unparse_name (context=0x804b250, principal=0xbffffd14,
    name=0xbfffdbf0, short_flag=0) at principal.c:265
265         plen = strlen(princ_realm(principal));
(gdb) bt
#0  0x400340a1 in unparse_name (context=0x804b250, principal=0xbffffd14,
    name=0xbfffdbf0, short_flag=0) at principal.c:265
#1  0x400341b3 in krb5_unparse_name (context=0x804b250,
    principal=0xbffffd14, name=0xbfffdbf0) at principal.c:293
#2  0x804957e in print_tickets (context=0x804b250, ccache=0x804b318,
    principal=0xbffffd14, do_verbose=0) at klist.c:185
#3  0x8049941 in display_v5_ccache (cred_cache=0xbffffe44 "/tmp/test",
    do_test=0, do_verbose=0) at klist.c:497
#4  0x8049a75 in main (argc=3, argv=0xbffffd14) at klist.c:576
(gdb) p *principal
$1 = {name = {name_type = -1073742336, name_string = {len = 3221225025,
      val = 0xbffffe44}}, realm = 0x0}

I think there should be some sanity checking and error reporting in
libkrb5 (or at least in klist). Invalid data read from a file should not
cause a crash.

Gabor

---
Gabor Gombas                                       Eotvos Lorand University
E-mail: gombasg@inf.elte.hu                        Hungary