Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 15 Dec 2016 16:53:12 +0100
From: Hannes Frederic Sowa <>
To: David Laight <David.Laight@...LAB.COM>,
 "Jason A. Donenfeld" <>
Cc: Netdev <>,
 "" <>,
 Jean-Philippe Aumasson <>,
 LKML <>,
 Linux Crypto Mailing List <>,
 "Daniel J . Bernstein" <>,
 Linus Torvalds <>,
 Eric Biggers <>
Subject: Re: [PATCH v2 1/4] siphash: add cryptographically secure hashtable

On 15.12.2016 16:41, David Laight wrote:
> Try (retyped):
> echo 'struct { long a; long long b; } s; int bar { return sizeof s; }' >foo.c
> gcc [-m32] -O2 -S foo.c; cat foo.s
> And look at what is generated.

I used __alignof__(unsigned long long) with -m32.

>> Right now ipv6 addresses have an alignment of 4. So we couldn't even
>> naturally pass them to siphash but would need to copy them around, which
>> I feel like a source of bugs.
> That is more of a problem on systems that don't support misaligned accesses.
> Reading the 64bit values with two explicit 32bit reads would work.
> I think you can get gcc to do that by adding an aligned(4) attribute to the
> structure member.

Yes, and that is actually my fear, because we support those
architectures. I can't comment on that as I don't understand enough of this.

If someone finds a way to cause misaligned reads on a small box this
seems (maybe depending on sysctls they get fixed up or panic) to be a
much bigger issue than having a hash DoS.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.