netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Phil Oester <kernel@linuxace.com>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
	kaber@trash.net, davem@davemloft.net, security@kernel.org
Subject: Re: [PATCH] netfilter: nf_conntrack_ipv6: Plug sk_buff leak in fragment handling
Date: Thu, 20 Jun 2013 11:20:31 +0200	[thread overview]
Message-ID: <20130620092031.GC2124@breakpoint.cc> (raw)
In-Reply-To: <20130619104950.GA1343@gmail.com>

Phil Oester <kernel@linuxace.com> wrote:
> In commit 4cdd3408 ("netfilter: nf_conntrack_ipv6: improve fragmentation
> handling"), an sk_buff leak was introduced when dealing with reassembled
> packets by grabbing a reference to the original skb instead of the
> reassembled skb.  At this point, the leak only impacted conntracks with an
> associated helper.  

David, could you please apply this patch directly in case Pablo doesn't
apply it first?  This fixes a remote DoS, so it better hit -stable ASAP.

Thanks.

[ archive link: http://patchwork.ozlabs.org/patch/252692/ ]

> diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
> index 97bcf2b..c9b6a6e 100644
> --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
> +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
> @@ -204,7 +204,7 @@ static unsigned int __ipv6_conntrack_in(struct net *net,
>  		if (ct != NULL && !nf_ct_is_untracked(ct)) {
>  			help = nfct_help(ct);
>  			if ((help && help->helper) || !nf_ct_is_confirmed(ct)) {
> -				nf_conntrack_get_reasm(skb);
> +				nf_conntrack_get_reasm(reasm);
>  				NF_HOOK_THRESH(NFPROTO_IPV6, hooknum, reasm,
>  					       (struct net_device *)in,
>  					       (struct net_device *)out,

Thanks for fixing it, but personally I would have preferred a short early
warning period.

  reply	other threads:[~2013-06-20  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 10:49 [PATCH] netfilter: nf_conntrack_ipv6: Plug sk_buff leak in fragment handling Phil Oester
2013-06-20  9:20 ` Florian Westphal [this message]
2013-06-20  9:56   ` Pablo Neira Ayuso

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=20130620092031.GC2124@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=kernel@linuxace.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=security@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).