Date: | Fri, 03 Sep 2010 00:27:03 -0400 |
From: | Ezra Peisach <epeisach@MIT.EDU> |
To: | krb5-bugs@MIT.EDU |
Subject: | kg_unseal leads to overlap of source and desitination in memcpy... |
This happens in kadmin...
According to the memcpy man page memmove should be used if the memory
overlaps.
The k5_unseal calls kg_encrypt with the same source and destination....
==3917== Command:
/home/epeisach/krb5/trunk/build/tests/dejagnu/../../kadmin/cli
/kadmin -p krbtest/admin@KRBTEST.COM -q ank\ -randkey\
sample/chem-dhcp-143.bu.e
du@KRBTEST.COM
==3917== Parent PID: 27515
==3917==
==3917== Source and destination overlap in memcpy(0x41ca160, 0x41ca160, 16)
==3917== at 0x4007535: memcpy (mc_replace_strmem.c:497)
==3917== by 0x412BF9B: krb5_k_encrypt (encrypt.c:65)
==3917== by 0x405AAC8: kg_encrypt (util_crypt.c:239)
==3917== by 0x4053A1C: kg_unseal (k5unseal.c:301)
==3917== by 0x405B398: krb5_gss_verify_mic (verify.c:43)
==3917== by 0x4045B44: gss_verify_mic (g_verify.c:72)
==3917== by 0x402098F: authgss_refresh (auth_gss.c:492)
==3917== by 0x4020BC5: gssrpc_authgss_create (auth_gss.c:210)
==3917== by 0x40171C8: init_any (client_init.c:756)
==3917== by 0x804D751: kadmin_startup (kadmin.c:515)
==3917== by 0x804DB63: main (ss_wrapper.c:48)
According to the memcpy man page memmove should be used if the memory
overlaps.
The k5_unseal calls kg_encrypt with the same source and destination....
==3917== Command:
/home/epeisach/krb5/trunk/build/tests/dejagnu/../../kadmin/cli
/kadmin -p krbtest/admin@KRBTEST.COM -q ank\ -randkey\
sample/chem-dhcp-143.bu.e
du@KRBTEST.COM
==3917== Parent PID: 27515
==3917==
==3917== Source and destination overlap in memcpy(0x41ca160, 0x41ca160, 16)
==3917== at 0x4007535: memcpy (mc_replace_strmem.c:497)
==3917== by 0x412BF9B: krb5_k_encrypt (encrypt.c:65)
==3917== by 0x405AAC8: kg_encrypt (util_crypt.c:239)
==3917== by 0x4053A1C: kg_unseal (k5unseal.c:301)
==3917== by 0x405B398: krb5_gss_verify_mic (verify.c:43)
==3917== by 0x4045B44: gss_verify_mic (g_verify.c:72)
==3917== by 0x402098F: authgss_refresh (auth_gss.c:492)
==3917== by 0x4020BC5: gssrpc_authgss_create (auth_gss.c:210)
==3917== by 0x40171C8: init_any (client_init.c:756)
==3917== by 0x804D751: kadmin_startup (kadmin.c:515)
==3917== by 0x804DB63: main (ss_wrapper.c:48)