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 nft] src: fix crash when inputting an incomplete set add command
Date: Mon, 13 Mar 2017 12:12:10 +0100 [thread overview]
Message-ID: <20170313111210.GA4326@salvia> (raw)
In-Reply-To: <1489206011-43843-1-git-send-email-zlpnobody@163.com>
On Sat, Mar 11, 2017 at 12:20:11PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
>
> After inputting the following nft command, set->keytype is not initialized
> but we try to destroy it, so NULL pointer dereference will happen:
> # nft add set t s
> Segmentation fault (core dumped)
> #0 dtype_free (dtype=0x0) at datatype.c:1049
> #1 set_datatype_destroy (dtype=0x0) at datatype.c:1051
> #2 0x0000000000407f1a in set_free (set=0x838790) at rule.c:213
> #3 0x000000000042ff70 in nft_parse (scanner=scanner@entry=0x8386a0,
> state=state@entry=0x7ffc313ea670) at parser_bison.c:9355
> #4 0x000000000040727d in nft_run (scanner=scanner@entry=0x8386a0,
> state=state@entry=0x7ffc313ea670, msgs=msgs@entry=0x7ffc313ea660)
> at main.c:237
> #5 0x0000000000406e4a in main (argc=<optimized out>, argv=<optimized
> out>) at main.c:376
Applied, thanks.
prev parent reply other threads:[~2017-03-13 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 4:20 [PATCH nft] src: fix crash when inputting an incomplete set add command Liping Zhang
2017-03-13 11:12 ` 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=20170313111210.GA4326@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).