netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Liping Zhang <zlpnobody@163.com>
Cc: netfilter-devel@vger.kernel.org, Liping Zhang <zlpnobody@gmail.com>
Subject: Re: [PATCH nf] netfilter: ctnetlink: skip dumping expect when nfct_help(ct) is NULL
Date: Sat, 8 Apr 2017 23:44:18 +0200	[thread overview]
Message-ID: <20170408214418.GD5301@salvia> (raw)
In-Reply-To: <1491127293-11235-1-git-send-email-zlpnobody@163.com>

On Sun, Apr 02, 2017 at 06:01:33PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
> 
> For IPCTNL_MSG_EXP_GET, if the CTA_EXPECT_MASTER attr is specified, then
> the NLM_F_DUMP request will dump the expectations related to this
> connection tracking.
> 
> But we forget to check whether the conntrack has nf_conn_help or not,
> so if nfct_help(ct) is NULL, oops will happen:
> 
>  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
>  IP: ctnetlink_exp_ct_dump_table+0xf9/0x1e0 [nf_conntrack_netlink]
>  Call Trace:
>   ? ctnetlink_exp_ct_dump_table+0x75/0x1e0 [nf_conntrack_netlink]
>   netlink_dump+0x124/0x2a0
>   __netlink_dump_start+0x161/0x190
>   ctnetlink_dump_exp_ct+0x16c/0x1bc [nf_conntrack_netlink]
>   ? ctnetlink_exp_fill_info.constprop.33+0xf0/0xf0 [nf_conntrack_netlink]
>   ? ctnetlink_glue_seqadj+0x20/0x20 [nf_conntrack_netlink]
>   ctnetlink_get_expect+0x32e/0x370 [nf_conntrack_netlink]
>   ? debug_lockdep_rcu_enabled+0x1d/0x20
>   nfnetlink_rcv_msg+0x60a/0x6a9 [nfnetlink]
>   ? nfnetlink_rcv_msg+0x1b9/0x6a9 [nfnetlink]
>   [...]

Applied, thanks.

      reply	other threads:[~2017-04-08 21:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02 10:01 [PATCH nf] netfilter: ctnetlink: skip dumping expect when nfct_help(ct) is NULL Liping Zhang
2017-04-08 21:44 ` Pablo Neira Ayuso [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=20170408214418.GD5301@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=zlpnobody@163.com \
    --cc=zlpnobody@gmail.com \
    /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).