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:	Sat, 26 Apr 2014 17:06:27 -0700
From:	Tom Herbert <therbert@...gle.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/2] ipv6: Set flow label to skb_hash on transmit

On Sat, Apr 26, 2014 at 4:40 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Sat, 2014-04-26 at 16:00 -0700, Tom Herbert wrote:
>>
>> +static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
>> +                                     __be32 flowlabel)
>> +{
>> +     __be32 hash;
>> +
>> +     if (flowlabel || !net->ipv6.sysctl.auto_flowlabels)
>> +             return flowlabel;
>> +
>> +     hash = skb->sk && skb->sk->sk_hash ? skb->sk->sk_hash :
>> +                                          skb_get_hash_raw(skb);
>> +
>> +     return hash & IPV6_FLOWLABEL_MASK;
>> +}
>
> Hmm...
>
> We use jhash and a random perturb to generate sk_hash which serves as
> our input to locate sockets in hash table.
>
> If we leak sk_hash, an attacker can easily target one hash slot.
>
Interesting point, but flow label is only 20 bits so it might not be
trivial to create such an attack?

> You could simply use :
>
> hash = skb->sk ? hash_ptr(skb->sk, 20) : skb_get_hash_raw(skb);
>
> But even with this, we could leak sensitive information...
>
> So I would rather use a separate sk->sk_flowhash value, and put a
> completely random value in it.
>
If we do that, I presume you'd want to use this value to seed
skb->hash on xmit also?

>
>
--
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