[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnjE+ofaXQa3gsPPxqdWZeBxgML6M1vnC9mmc5dufwy0gJO-Q@mail.gmail.com>
Date: Thu, 26 Sep 2013 11:25:01 -0700
From: Pravin Shelar <pshelar@...ira.com>
To: Steffen Klassert <steffen.klassert@...unet.com>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net 1/2] ip_tunnel: Fix a memory corruption in ip_tunnel_xmit
On Thu, Sep 26, 2013 at 1:25 AM, Steffen Klassert
<steffen.klassert@...unet.com> wrote:
> On Wed, Sep 25, 2013 at 09:55:50AM -0700, Pravin Shelar wrote:
>> On Tue, Sep 24, 2013 at 10:54 PM, Steffen Klassert
>> <steffen.klassert@...unet.com> wrote:
>> > We might extend the used aera of a skb beyond the total
>> > headroom when we install the ipip header. Fix this by
>> > calling skb_cow_head() unconditionally.
>> >
>> It is better to call skb_cow_head() from ipip_tunnel_xmit() as it is
>> consistent with gre.
>
> I think this would just move the bug from ipip to gre. ipgre_xmit()
> uses dev->needed_headroom which is based on the guessed output device
> in ip_tunnel_bind_dev(). If the device we get from the route lookup
> in ip_tunnel_xmit() is different from the guessed one and the resulting
> max_headroom is bigger than dev->needed_headroom, we run into that bug
> because skb_cow_head() will not be called with the updated
> dev->needed_headroom.
>
Thats why ip_tunnel_xmit() update dev->needed_headroom.
Just to be clear I was talking abt calling skb_cow_head with
dev->needed_headroom in ipip_xmit and leave ip_tunnel_xmit as it is.
So that most of cases we will not need to adjust headroom in ip_tunnel
xmit.
--
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