Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp40558ybj; Thu, 19 Sep 2019 10:20:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCQ5BgQwaGxk5UuwtDwsyKJGNVnfYGwg047UqIWCYA7k1pV8qZukLW+k0TcjbUCSoLRgLL X-Received: by 2002:a50:9eee:: with SMTP id a101mr17061228edf.128.1568913601735; Thu, 19 Sep 2019 10:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568913601; cv=none; d=google.com; s=arc-20160816; b=FSEvl/GJ/qFEOESu98JvknplSinC4+Uu9wzQjOkHf+YyaGJu78TcylORzB6lS4dOfK VUy0JsPIU1aNW9oLWaDqPJ0vXzMQC/a03MTsU7sqs+l0CCmN0RJPVKKAD8Ig2yl9nFYk kJ0XJLtX4h4uFN6jc5td9c33KDcSvDP8NCveDJS3JasSXfJK7gQkjBWZ2M6vKYrvpojs 9bJbda88biI+364nRtjhri51/XDcz6qLvCL4Wghq+NuHCx2Ar7gmF9hNiD/wjYw0+9Mm AjliKZG5uIJubdEuIqLf95ZasPUSuR+FkLuuadM5cuY5l2N4wMrdkecqkIZrlobHp6rP 3KaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+VQyZYZbRIu3KFFq1CWRp8lpa50+uCC0mv9jAWvEGRo=; b=ABCIBGUYYdHT3ZgQ3/MYs7pkXUPEvEx5R95zd9OGT5Upixq9xWr5sMiLr83ndD33hv n9gErmAPDuRIu1HhHnvJJt+UQXptQJ5T/N1IiRt9H5QzhTwpM8wCGbxQFmKjt5axXK02 HQB60FFj3IjlNrK9kSF6d1rhjxWSww7i/RcSVaUP9+8uJLyLC6jI8c1oO6a4JOWXiV03 8pcVzsu0Jxu0nqWmahQ3vydSZAnTB8uym+gYPDdbJ8POPu/Z7xk/3ORrkMW3tVz4B5Zj 8ehTJVZDv1rRSv28AxedNWmPJkOxGDsk3TUMsEWU8OyRz4kOxxj0erwJboXnmT4Qfl7F 19rQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si4734693ejj.286.2019.09.19.10.19.38; Thu, 19 Sep 2019 10:20:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390762AbfISO4H (ORCPT + 99 others); Thu, 19 Sep 2019 10:56:07 -0400 Received: from proxima.lasnet.de ([78.47.171.185]:50654 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388551AbfISO4H (ORCPT ); Thu, 19 Sep 2019 10:56:07 -0400 Received: from localhost.localdomain (p200300E9D7197E1C5D26FA1D92192C91.dip0.t-ipconnect.de [IPv6:2003:e9:d719:7e1c:5d26:fa1d:9219:2c91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id 3E21BC167A; Thu, 19 Sep 2019 16:56:05 +0200 (CEST) Subject: Re: [PATCH] ieee802154: atusb: fix use-after-free at disconnect To: Johan Hovold Cc: Alexander Aring , "David S. Miller" , linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andreyknvl@google.com, syzkaller-bugs@googlegroups.com, stable , syzbot+f4509a9138a1472e7e80@syzkaller.appspotmail.com References: <20190919121234.30620-1-johan@kernel.org> From: Stefan Schmidt Message-ID: Date: Thu, 19 Sep 2019 16:56:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190919121234.30620-1-johan@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 19.09.19 14:12, Johan Hovold wrote: > The disconnect callback was accessing the hardware-descriptor private > data after having having freed it. > > Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver") > Cc: stable # 4.2 > Cc: Alexander Aring > Reported-by: syzbot+f4509a9138a1472e7e80@syzkaller.appspotmail.com > Signed-off-by: Johan Hovold > --- > > #syz test: https://github.com/google/kasan.git f0df5c1b > > drivers/net/ieee802154/atusb.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ieee802154/atusb.c b/drivers/net/ieee802154/atusb.c > index ceddb424f887..0dd0ba915ab9 100644 > --- a/drivers/net/ieee802154/atusb.c > +++ b/drivers/net/ieee802154/atusb.c > @@ -1137,10 +1137,11 @@ static void atusb_disconnect(struct usb_interface *interface) > > ieee802154_unregister_hw(atusb->hw); > > + usb_put_dev(atusb->usb_dev); > + > ieee802154_free_hw(atusb->hw); > > usb_set_intfdata(interface, NULL); > - usb_put_dev(atusb->usb_dev); > > pr_debug("%s done\n", __func__); > } > This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks a lot for having a look at this! regards Stefan Schmidt