[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53487CBA.7080009@redhat.com>
Date: Sat, 12 Apr 2014 01:37:30 +0200
From: Daniel Borkmann <dborkman@...hat.com>
To: David Miller <davem@...emloft.net>
CC: eric.dumazet@...il.com, netdev@...r.kernel.org, xii@...gle.com
Subject: Re: [PATCH] packet: fix potential use after free
On 04/11/2014 09:59 PM, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Thu, 10 Apr 2014 08:06:58 -0700
>
>> On Thu, 2014-04-10 at 10:19 +0200, Daniel Borkmann wrote:
>>> On 04/10/2014 03:22 AM, Eric Dumazet wrote:
>>>> From: Eric Dumazet <edumazet@...gle.com>
>>>>
>>>> As soon skb is queued into sk_receive_queue, it can be consumed,
>>>> so its racy to access skb->len.
>>>>
>>>> Given that sk_data_ready() / sock_def_readable() don't really care, just
>>>> use 0 instead of skb->len
>>>>
>>>> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>>>> Cc: Xi Wang <xii@...gle.com>
>>>
>>> Acked-by: Daniel Borkmann <dborkman@...hat.com>
>>>
>>> Seems to be there since pre 2005 ...
>>
>> Yeah, and many other places have the same error, a full audit is
>> probably needed.
>
> Not only sock_def_readable(), but all implementations of this callback absolutely
> do not care about the length argument.
>
> I'm working on a patch to kill the argument completely.
Sounds good! Seen you've already pushed that, thanks!
--
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