[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200330141147.GC23604@breakpoint.cc>
Date: Mon, 30 Mar 2020 16:11:47 +0200
From: Florian Westphal <fw@...len.de>
To: Steffen Klassert <steffen.klassert@...unet.com>
Cc: Florian Westphal <fw@...len.de>, Xin Long <lucien.xin@...il.com>,
network dev <netdev@...r.kernel.org>, davem@...emloft.net,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] udp: fix a skb extensions leak
Steffen Klassert <steffen.klassert@...unet.com> wrote:
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index 621b4479fee1..7e29590482ce 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -3668,6 +3668,7 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
> >
> > skb_push(nskb, -skb_network_offset(nskb) + offset);
> >
> > + skb_release_head_state(nskb);
> > __copy_skb_header(nskb, skb);
> >
> > skb_headers_offset_update(nskb, skb_headroom(nskb) - skb_headroom(skb));
> >
> > AFAICS we not only leak reference of extensions, but also skb->dst and skb->_nfct.
>
> Would be nice if we would not need to drop the resources
> just to add them back again in the next line. But it is ok
> as a quick fix for the bug.
Yes, but are these the same resources? AFAIU thats not the case, i.e.
the skb on fraglist can have different skb->{dst,extension,_nfct} data
than the skb head one, and we can't tell if that data is still valid
(rerouting for example).
Powered by blists - more mailing lists