From: Florian Westphal <fw@strlen•de>
To: Steffen Klassert <steffen.klassert@secunet•com>
Cc: Florian Westphal <fw@strlen•de>, Xin Long <lucien.xin@gmail•com>,
network dev <netdev@vger•kernel.org>,
davem@davemloft•net, Paolo Abeni <pabeni@redhat•com>
Subject: Re: [PATCH net] udp: fix a skb extensions leak
Date: Mon, 30 Mar 2020 16:11:47 +0200 [thread overview]
Message-ID: <20200330141147.GC23604@breakpoint.cc> (raw)
In-Reply-To: <20200330134531.GK13121@gauss3.secunet.de>
Steffen Klassert <steffen.klassert@secunet•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).
next prev parent reply other threads:[~2020-03-30 14:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 9:06 [PATCH net] udp: fix a skb extensions leak Xin Long
2020-03-26 9:28 ` Xin Long
2020-03-30 4:54 ` David Miller
2020-03-30 8:29 ` Steffen Klassert
2020-03-30 16:13 ` Xin Long
2020-03-30 16:13 ` Florian Westphal
2020-03-30 13:27 ` Florian Westphal
2020-03-30 13:45 ` Steffen Klassert
2020-03-30 14:11 ` Florian Westphal [this message]
2020-03-30 14:39 ` Steffen Klassert
2020-03-30 16:14 ` Xin Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200330141147.GC23604@breakpoint.cc \
--to=fw@strlen$(echo .)de \
--cc=davem@davemloft$(echo .)net \
--cc=lucien.xin@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=steffen.klassert@secunet$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox