From: Sasha Levin <sashal@kernel.org>
To: Zubin Mithra <zsm@chromium.org>
Cc: stable@vger.kernel.org, gregkh@linuxfoundation.org,
groeck@chromium.org, pablo@netfilter.org, fw@strlen.de,
eric.dumazet@gmail.com, kadlec@blackhole.kfki.hu,
davem@davemloft.net
Subject: Re: [PATCH v4.19.y 1/2] netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr
Date: Sat, 13 Apr 2019 09:35:12 -0400 [thread overview]
Message-ID: <20190413133512.GT11568@sasha-vm> (raw)
In-Reply-To: <20190412175503.132995-1-zsm@chromium.org>
On Fri, Apr 12, 2019 at 10:55:02AM -0700, Zubin Mithra wrote:
>From: Pablo Neira Ayuso <pablo@netfilter.org>
>
>commit 8866df9264a34e675b4ee8a151db819b87cce2d3 upstream
>
>Otherwise, we hit a NULL pointer deference since handlers always assume
>default timeout policy is passed.
>
> netlink: 24 bytes leftover after parsing attributes in process `syz-executor2'.
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user memory access
> general protection fault: 0000 [#1] PREEMPT SMP KASAN
> CPU: 0 PID: 9575 Comm: syz-executor1 Not tainted 4.19.0+ #312
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:icmp_timeout_obj_to_nlattr+0x77/0x170 net/netfilter/nf_conntrack_proto_icmp.c:297
>
>Fixes: c779e849608a ("netfilter: conntrack: remove get_timeout() indirection")
>Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
>Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
>Signed-off-by: Zubin Mithra <zsm@chromium.org>
>---
>Notes:
>* Syzkaller reported a general protection fault in icmp_timeout_obj_to_nlattri
>when fuzzing a 4.19 kernel.
>Call Trace:
> cttimeout_default_fill_info net/netfilter/nfnetlink_cttimeout.c:424 [inline]
> cttimeout_default_get+0x574/0x766 net/netfilter/nfnetlink_cttimeout.c:471
> nfnetlink_rcv_msg+0x544/0x5bd net/netfilter/nfnetlink.c:228
> netlink_rcv_skb+0x1cf/0x2a1 net/netlink/af_netlink.c:2454
> nfnetlink_rcv+0x30f/0x34a net/netfilter/nfnetlink.c:560
> netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
> netlink_unicast+0x3c5/0x4c3 net/netlink/af_netlink.c:1343
> netlink_sendmsg+0x829/0x88e net/netlink/af_netlink.c:1908
> sock_sendmsg_nosec+0x8c/0xad net/socket.c:621
> sock_sendmsg+0x4f/0x60 net/socket.c:631
> ___sys_sendmsg+0x4d6/0x63f net/socket.c:2116
> __sys_sendmsg+0xee/0x17b net/socket.c:2154
> do_syscall_64+0xf8/0x133 arch/x86/entry/common.c:291
> entry_SYSCALL_64_after_hwframe+0x49/0xbe
>
>* This patch resolves the following conflicts when applying to 4.19:
>- l3num is not used as an argument for cttimeout_default_fill_info() in 4.19
>- nf_icmp_pernet, nf_tcp_pernet, nf_udp_pernet, nf_dccp_pernet,
>nf_icmpv6_pernet, nf_sctp_pernet, nf_generic_pernet do not exist in
>4.19. Expand the usage of those functions into one-liners.
>
>* Tests run: Chrome OS tryjobs, Syzkaller reproducer
I've queued these 2 patches up. It's very nice to see syzkaller running
on -stable kernels, thanks all!
--
Thanks,
Sasha
prev parent reply other threads:[~2019-04-13 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 17:55 [PATCH v4.19.y 1/2] netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr Zubin Mithra
2019-04-12 17:55 ` [PATCH v4.19.y 2/2] netfilter: nfnetlink_cttimeout: fetch timeouts for udplite and gre, too Zubin Mithra
2019-04-13 13:35 ` Sasha Levin [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=20190413133512.GT11568@sasha-vm \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=fw@strlen.de \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=kadlec@blackhole.kfki.hu \
--cc=pablo@netfilter.org \
--cc=stable@vger.kernel.org \
--cc=zsm@chromium.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