[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180509073754.GG711@sol.localdomain>
Date: Wed, 9 May 2018 00:37:54 -0700
From: Eric Biggers <ebiggers3@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Eric Dumazet <edumazet@...gle.com>,
syzbot <syzbot+71d74a5406d02057d559@...kaller.appspotmail.com>,
alexander.deucher@....com,
Andrey Konovalov <andreyknvl@...gle.com>,
Anoob Soman <anoob.soman@...rix.com>, chris@...is-wilson.co.uk,
David Miller <davem@...emloft.net>, elena.reshetova@...el.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kees Cook <keescook@...omium.org>,
LKML <linux-kernel@...r.kernel.org>,
Mike Maloney <maloney@...gle.com>, mchehab@...nel.org,
netdev <netdev@...r.kernel.org>, rami.rosen@...el.com,
Sowmini Varadhan <sowmini.varadhan@...cle.com>,
syzkaller-bugs@...glegroups.com,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: KASAN: use-after-free Read in __dev_queue_xmit
On Wed, Jan 03, 2018 at 10:53:14PM -0800, Eric Dumazet wrote:
> On Wed, 2018-01-03 at 21:13 -0800, Eric Dumazet wrote:
> > Note: all commands must start from beginning of the line in the email body.
> >
> > I guess skb_probe_transport_header() should be hardened to reject malicious
> > packets given by user space, instead of being gentle.
>
> Although bug triggered for this particular repro is in flow dissector
> :/
>
> I will test :
>
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 15ce300637650e17fcab7e378b20fe7972686d46..544bddf08e13c7f6e47aadc737244c9ba5af56b2 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -976,8 +976,8 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
> out_good:
> ret = true;
>
> - key_control->thoff = (u16)nhoff;
> out:
> + key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen);
> key_basic->n_proto = proto;
> key_basic->ip_proto = ip_proto;
>
> @@ -985,7 +985,6 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
>
> out_bad:
> ret = false;
> - key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen);
> goto out;
> }
> EXPORT_SYMBOL(__skb_flow_dissect);
Fix for this was commit d0c081b49137cd:
#syz fix: flow_dissector: properly cap thoff field
But a crash with the same signature is still occurring, so it should eventually
get reported again. C reproducer is here, it works on Linus' tree (commit
036db8bd963): https://syzkaller.appspot.com/text?tag=ReproC&x=105b1ae7800000
- Eric
Powered by blists - more mailing lists