the same bug as just fixed in userland:
----------
SipHash_Final() was assuming the digest was 64-bit aligned, resulting in
misaligned memory accesses with armv7 ramdisk -Os bsd.rd ping
ok florian millert
----------
OK deraadt@
-/* $OpenBSD: siphash.c,v 1.3 2015/02/20 11:51:03 tedu Exp $ */
+/* $OpenBSD: siphash.c,v 1.4 2017/04/12 18:35:50 florian Exp $ */
/*-
* Copyright (c) 2013 Andre Oppermann <andre@FreeBSD.org>
{
uint64_t r;
- r = SipHash_End(ctx, rc, rf);
-
- htolem64((uint64_t *)dst, r);
+ htolem64(&r, SipHash_End(ctx, rc, rf));
+ memcpy(dst, &r, sizeof r);
}
uint64_t