From: subashab@codeaurora.org
To: "Pablo Neira Ayuso" <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nf_nat: Fix possible null dereference
Date: Wed, 15 Jul 2015 01:10:09 -0000 [thread overview]
Message-ID: <f29890b70a328a20b8be169f2a357790.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <20150713155003.GA7062@salvia>
> I see, but if you look nf_nat_ipv4_fn() then you can confirm that we
> always have a nat extension in place by when the iptables NAT
> targets / nft NAT expressions:
>
> nf_nat_ipv4_fn(...)
> {
> [...]
>
> ct = nf_ct_get(skb, &ctinfo);
> /* Can't track? It's not due to stress, or conntrack would
> * have dropped it. Hence it's the user's responsibilty to
> * packet filter it out, or implement conntrack/NAT for that
> * protocol. 8) --RR
> */
> if (!ct)
> return NF_ACCEPT;
>
> /* Don't try to NAT if this packet is not conntracked */
> if (nf_ct_is_untracked(ct))
> return NF_ACCEPT;
>
> nat = nf_ct_nat_ext_add(ct);
> if (nat == NULL)
> return NF_ACCEPT;
>
> ...
>
> If we fail to create the nat extension, then this accepts the packet,
> so no chances we can reach this NULL dereference.
>
> I wonder if this is a false positive. Would you please have a closer
> look and confirm this? Thanks.
>
This report is indeed a false positive. Thanks for reviewing.
prev parent reply other threads:[~2015-07-15 1:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 1:23 [PATCH] netfilter: nf_nat: Fix possible null dereference subashab
2015-07-09 22:24 ` Pablo Neira Ayuso
2015-07-09 23:16 ` subashab
2015-07-13 15:50 ` Pablo Neira Ayuso
2015-07-15 1:10 ` subashab [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=f29890b70a328a20b8be169f2a357790.squirrel@www.codeaurora.org \
--to=subashab@codeaurora.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).