NetBSD-Bugs archive

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

Re: bin/52986: netpgpverify broken on sparc64



On Sun, Feb 11, 2018 at 11:33:28AM -0500, Christos Zoulas wrote:
> |  But note that this memory is on the stack (or did I miscount the f's?) - I bet
> |  that is not planned to be so.
> 
> it is mmapped so ...

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.


Martin


Home | Main Index | Thread Index | Old Index