Return-Path: Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90]) by krbdev.mit.edu (Postfix) with ESMTP id 4363D3E638; Fri, 3 Sep 2010 00:27:16 -0400 (EDT) Received: from pch.mit.edu (pch.mit.edu [127.0.0.1]) by pch.mit.edu (8.13.6/8.12.8) with ESMTP id o834RGAN006168; Fri, 3 Sep 2010 00:27:16 -0400 Received: from mailhub-auth-2.mit.edu (MAILHUB-AUTH-2.MIT.EDU [18.7.62.36]) by pch.mit.edu (8.13.6/8.12.8) with ESMTP id o834RFoi006165 for ; Fri, 3 Sep 2010 00:27:15 -0400 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id o834RFrD004651 for ; Fri, 3 Sep 2010 00:27:15 -0400 Received: from [192.168.1.2] (pool-96-234-66-116.nwrknj.fios.verizon.net [96.234.66.116]) (authenticated bits=0) (User authenticated as epeisach@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o834REPA025668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 3 Sep 2010 00:27:15 -0400 (EDT) Message-ID: <4C807917.4040500@mit.edu> Date: Fri, 03 Sep 2010 00:27:03 -0400 From: Ezra Peisach User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: krb5-bugs@MIT.EDU Subject: kg_unseal leads to overlap of source and desitination in memcpy... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Beenthere: krb5-bugs-incoming@mailman.mit.edu X-Mailman-Version: 2.1.6 Precedence: list Sender: krb5-bugs-incoming-bounces@PCH.mit.edu Errors-To: krb5-bugs-incoming-bounces@PCH.mit.edu X-RT-Original-Encoding: iso-8859-1 Content-Length: 1103 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)