Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2075758ybp; Thu, 10 Oct 2019 01:45:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBEUXic7POS/9IYvjBHtoQCmhpHWA+8gLQwM9NA7SQwI/wzxlg38oQ9xi/xBFqiRnSslHC X-Received: by 2002:a17:906:b24c:: with SMTP id ce12mr6935820ejb.327.1570697104048; Thu, 10 Oct 2019 01:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570697104; cv=none; d=google.com; s=arc-20160816; b=SbqaUp00HAEd9rGMGg6KQZZrHsHRHe1mQTJgdOWYASxDm/pXYEowQnU/d0+AGx5PpP C6ww0ih0jryO5mGJNtRzAnssGjl9juGGTbiAZWtDhoFgHzlltCvrIRoUuDCXnwp+EGMF V476EA+NnHDgnqLsYm4SDBCIvgYS7L8K6C+RWer32kMhVcLAvRJqwqlr+x7L7iVdc8Gd vyxV4GwD49x8ycgrGFFpLy6sig0sfM6JG6Ew7yRnHrD467/jJ1Un88NV/eGE4xiisrrc 6VGlqQ4xGHkR/uUBenpsMhCZjsLSHbac1Mc+AG0nRpCwK6tb2fGmw5wGY/zmpADKv6Ze D5iQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zAiWo1ODuRxa1KGgiuFH7AvEItfjEFecowK1xHKCGZE=; b=gU3sXwYAfjeEQOsjahpKXwSwvD7V5YIBng/KRClc/Rjelnw+JDpDJlkPgqlZs+7dEE fnxR3eMOjZp470zlxhBpoYOXjVv3krKVPmx6iGjX/Ar1BwixSvfzDdRkAINKJk5WAG/Q pKxMyrbKZULJo1vjpaDKQpLI6s4zMLZQp6cEV/41hXFV6tYbplIHDzLfrfJODnPRbK+I zCSllhlDcBJ/GF5AtWgVjUq+y2A+ZrkSPscC+uAtckMomXFrHt2lAGHqmhqiakGh0tqr 4/5q0/O5JQ7CYsFCClSfztGu3Wkf8aAKqMHBSZ7WKs3PBhSKN7A02oDAWUl+F2nvnAO9 I8iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zGsdosJV; 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 g21si2658472ejk.23.2019.10.10.01.44.40; Thu, 10 Oct 2019 01:45:04 -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; dkim=pass header.i=@kernel.org header.s=default header.b=zGsdosJV; 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 S2388707AbfJJInR (ORCPT + 99 others); Thu, 10 Oct 2019 04:43:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:48024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387767AbfJJInP (ORCPT ); Thu, 10 Oct 2019 04:43:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3A6D121D6C; Thu, 10 Oct 2019 08:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696993; bh=6aJTqbREb2X6AGt6ZSLFhTjF2AAoUGnOEamyy4LHoCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zGsdosJV8HA42rSJqlnHTyQmrrZK7i6anZriQQY7D17boVifKwjtIP23yTrnAQ2Pi ge1JfRuTAxi4DuOm7M3ihzX6z0ZwtR8hRKLYQkmLgYQkIhoSSt7nPGE4ovnPzgF0OV 7hQbGGvRzGOyfv9LeP548hwKhmWHKXPhVtvhYJvw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Aring , syzbot+f4509a9138a1472e7e80@syzkaller.appspotmail.com, Johan Hovold , Stefan Schmidt Subject: [PATCH 5.3 084/148] ieee802154: atusb: fix use-after-free at disconnect Date: Thu, 10 Oct 2019 10:35:45 +0200 Message-Id: <20191010083616.434288544@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 7fd25e6fc035f4b04b75bca6d7e8daa069603a76 upstream. 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 Signed-off-by: Stefan Schmidt Signed-off-by: Greg Kroah-Hartman --- drivers/net/ieee802154/atusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ieee802154/atusb.c +++ b/drivers/net/ieee802154/atusb.c @@ -1137,10 +1137,11 @@ static void atusb_disconnect(struct usb_ 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__); }