lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 May 2015 16:02:20 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	tom@...bertland.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH v3 net-next 1/5] net: Get skb hash over flow_keys
 structure

From: Tom Herbert <tom@...bertland.com>
Date: Wed, 13 May 2015 15:37:50 -0400

> On Wed, May 13, 2015 at 3:30 PM, David Miller <davem@...emloft.net> wrote:
>> From: Tom Herbert <tom@...bertland.com>
>> Date: Tue, 12 May 2015 08:22:58 -0700
>>
>>> @@ -15,6 +15,13 @@
>>>   * All the members, except thoff, are in network byte order.
>>>   */
>>>  struct flow_keys {
>>> +     u16     thoff;
>>> +     u16     padding1;
>>> +#define FLOW_KEYS_HASH_START_FIELD   n_proto
>>> +     __be16  n_proto;
>>> +     u8      ip_proto;
>>> +     u8      padding;
>>> +
>>
>> This padding works if everyone consistently zero initializes the whole
>> key structure, but for whatever reason (performance, unintentional
>> oversight, etc.) not all paths do.
>>
>> So, for example, inet_set_txhash() is going to have random crap in
>> keys.padding, so the hashes computed are not stable for a given flow
>> key tuple.
>>
>> That's just the first code path I found with this issue, there are
>> probably several others.
> 
> memset zero is in the second patch for inet_set_txhash and
> ip6_set_txhash. I can respin so those are in the first patch.

Yes, for bisectability you should probably do that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ