Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868AbeADGxU (ORCPT + 1 other); Thu, 4 Jan 2018 01:53:20 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37782 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbeADGxS (ORCPT ); Thu, 4 Jan 2018 01:53:18 -0500 X-Google-Smtp-Source: ACJfBovFNMw6IlEXAMMtCCCpScHp0vKJLl+pdVvTRWbGH6YrM9Cjw75yMUK40occ0rUXDK5VR9lqxg== Message-ID: <1515048794.131759.4.camel@gmail.com> Subject: Re: KASAN: use-after-free Read in __dev_queue_xmit From: Eric Dumazet To: Eric Dumazet , syzbot Cc: alexander.deucher@amd.com, Andrey Konovalov , Anoob Soman , chris@chris-wilson.co.uk, David Miller , elena.reshetova@intel.com, Greg Kroah-Hartman , Kees Cook , LKML , Mike Maloney , mchehab@kernel.org, netdev , rami.rosen@intel.com, Sowmini Varadhan , syzkaller-bugs@googlegroups.com, Willem de Bruijn Date: Wed, 03 Jan 2018 22:53:14 -0800 In-Reply-To: References: <94eb2c0ce3aa27cfa40561ec2dc3@google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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);