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:	Tue, 9 Sep 2014 11:52:16 -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 net-next 1/3] ipv6: Clear flush_id to make GRO work

On Tue, Sep 9, 2014 at 11:38 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Tue, 2014-09-09 at 11:23 -0700, Tom Herbert wrote:
>> In TCP gro we check flush_id which is derived from the IP identifier.
>> In IPv4 gro path the flush_id is set with the expectation that every
>> matched packet increments IP identifier. In IPv6, the flush_id is
>> never set and thus is uinitialized. What's worse is that in IPv6
>> over IPv4 encapsulation, the IP identifier is taken from the outer
>> header which is currently not incremented on every packet for Linux
>> stack, so GRO in this case never matches packets (identifier is
>> not increasing).
>>
>> This patch clears flush_id for every time for a matched packet in
>> IPv6 gro_receive. We need to do this each time to overwrite the
>> setting that would be done in IPv4 gro_receive per the outer
>> header in IPv6 over Ipv4 encapsulation.
>>
>> Signed-off-by: Tom Herbert <therbert@...gle.com>
>> ---
>>  net/ipv6/ip6_offload.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
>> index 5bcda33..929bbbcd 100644
>> --- a/net/ipv6/ip6_offload.c
>> +++ b/net/ipv6/ip6_offload.c
>> @@ -261,6 +261,9 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
>>               /* flush if Traffic Class fields are different */
>>               NAPI_GRO_CB(p)->flush |= !!(first_word & htonl(0x0FF00000));
>>               NAPI_GRO_CB(p)->flush |= flush;
>> +
>> +             /* Clear flush_id, there's really no concept of ID in IPv6. */
>> +             NAPI_GRO_CB(p)->flush_id = 0;
>>       }
>>
>>       NAPI_GRO_CB(skb)->flush |= flush;
>
> Yeah, I mentioned this problem months ago and apparently forgot to push
> the fix.
>
Unfortunately, probably not the last GRO issue. This whole thing is
really rather fragile and probably easy to break undetected...

> http://patchwork.ozlabs.org/patch/311212/
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>
>
--
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