From: David Miller <davem@davemloft.net>
To: fw@strlen.de
Cc: netdev@vger.kernel.org, hannes@stressinduktion.org
Subject: Re: [PATCH nf] ipv6: avoid write to a possibly cloned skb
Date: Mon, 13 Mar 2017 12:54:01 -0700 (PDT) [thread overview]
Message-ID: <20170313.125401.1159069954838003447.davem@davemloft.net> (raw)
In-Reply-To: <20170313152428.12514-1-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Mon, 13 Mar 2017 16:24:28 +0100
> ip6_fragment, in case skb has a fraglist, checks if the
> skb is cloned. If it is, it will move to the 'slow path' and allocates
> new skbs for each fragment.
>
> However, right before entering the slowpath loop, it updates the
> nexthdr value of the last ipv6 extension header to NEXTHDR_FRAGMENT,
> to account for the fragment header that will be inserted in the new
> ipv6-fragment skbs.
>
> In case original skb is cloned this munges nexthdr value of another
> skb. Avoid this by doing the nexthdr update for each of the new fragment
> skbs separately.
>
> This was observed with tcpdump on a bridge device where netfilter ipv6
> reassembly is active: tcpdump shows malformed fragment headers as
> the l4 header (icmpv6, tcp, etc). is decoded as a fragment header.
>
> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Reported-by: Andreas Karis <akaris@redhat.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Great catch Florian, applied, thanks.
prev parent reply other threads:[~2017-03-13 19:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 15:24 [PATCH nf] ipv6: avoid write to a possibly cloned skb Florian Westphal
2017-03-13 19:54 ` David Miller [this message]
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=20170313.125401.1159069954838003447.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).