netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
	syzkaller-bugs@googlegroups.com,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	syzbot+34bd2369d38707f3f4a7@syzkaller.appspotmail.com
Subject: Re: [PATCH nf] netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present
Date: Wed, 8 Jan 2020 23:32:23 +0100	[thread overview]
Message-ID: <20200108223223.bvyvyy6il664whtb@salvia> (raw)
In-Reply-To: <20200108095938.3704-1-fw@strlen.de>

On Wed, Jan 08, 2020 at 10:59:38AM +0100, Florian Westphal wrote:
> The set uadt functions assume lineno is never NULL, but it is in
> case of ip_set_utest().
> 
> syzkaller managed to generate a netlink message that calls this with
> LINENO attr present:
> 
> general protection fault: 0000 [#1] PREEMPT SMP KASAN
> RIP: 0010:hash_mac4_uadt+0x1bc/0x470 net/netfilter/ipset/ip_set_hash_mac.c:104
> Call Trace:
>  ip_set_utest+0x55b/0x890 net/netfilter/ipset/ip_set_core.c:1867
>  nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229
>  netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
>  nfnetlink_rcv+0x1ba/0x460 net/netfilter/nfnetlink.c:563
> 
> pass a dummy lineno storage, its easier than patching all set
> implementations.
> 
> This seems to be a day-0 bug.

Also applied, thanks.

  parent reply	other threads:[~2020-01-08 22:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 16:03 general protection fault in hash_ipportnet4_uadt syzbot
2020-01-07 17:28 ` syzbot
2020-01-08  9:59 ` [PATCH nf] netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present Florian Westphal
2020-01-08 10:05   ` Kadlecsik József
2020-01-08 10:37   ` [PATCH] " Jan Engelhardt
2020-01-08 12:43     ` Kadlecsik József
2020-01-08 22:32   ` Pablo Neira Ayuso [this message]
2020-01-08 16:53 ` general protection fault in hash_ipportnet4_uadt syzbot

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=20200108223223.bvyvyy6il664whtb@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=syzbot+34bd2369d38707f3f4a7@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).