NetBSD-Bugs archive

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

Re: bin/52986: netpgpverify broken on sparc64



The following reply was made to PR bin/52986; it has been noted by GNATS.

From: christos%zoulas.com@localhost (Christos Zoulas)
To: Martin Husemann <martin%duskware.de@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, agc%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, 
	netbsd-bugs%netbsd.org@localhost, martin%NetBSD.org@localhost
Subject: Re: bin/52986: netpgpverify broken on sparc64
Date: Mon, 12 Feb 2018 07:33:31 -0500

 On Feb 12,  9:34am, martin%duskware.de@localhost (Martin Husemann) wrote:
 -- Subject: Re: bin/52986: netpgpverify broken on sparc64
 
 | No, in this case it is not (it is verifying a memory hash). I haven't found
 | exactly where it is set, but I guess it living on the stack is a bug.
 | 
 | However, there are two more bugs:
 | 
 | Index: bcopy.c
 | ===================================================================
 | RCS file: /cvsroot/src/common/lib/libc/string/bcopy.c,v
 | retrieving revision 1.11
 | retrieving revision 1.12
 | [..]
 | @@ -89,7 +89,7 @@
 |         unsigned long u;
 |  
 |  #if !defined(_KERNEL)
 | -       _DIAGASSERT((dst0 && src0) || length == 0);
 | +       _DIAGASSERT(length == 0);
 |  #endif
 | 
 | (inside the memmove implementation used by sparc64) always fires for
 | the memmove's called by the BN lib here. This is obviously wrong,
 | but: the firing assert does not terminate the program, but during handling
 | of it somewhere the stack/memory corruption changing the encoded "hashalg"
 | to zero happens.
 
 There is a bug somewhere else too that makes the unit tests fail on x86.
 I have not found out what it is yet, but changing the EVP_MD_CTX_new
 allocation in digest.c to add let's say 100 bytes of slop makes it go away.
 
 Does this fix your problem too?
 
 christos
 


Home | Main Index | Thread Index | Old Index