Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2265338ybl; Thu, 19 Dec 2019 10:40:39 -0800 (PST) X-Google-Smtp-Source: APXvYqw6qYhEM3gfwr3uicsgdsELo2y2WxbILVtNIdZOJzBZEL4X4QRfAX2+OXsWffguVdTf0XV9 X-Received: by 2002:a9d:624e:: with SMTP id i14mr10456857otk.371.1576780839371; Thu, 19 Dec 2019 10:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576780839; cv=none; d=google.com; s=arc-20160816; b=hQF+jP9SG3sgYdJgjMhRi4bha2Frmfs+JUwl9k3nLcY4kprHYZCZCVruC293uYuvUe YMDIFu6N5FRgkKDaL7I4dDgmovLS/rQ3h3OrgNNCjdQvSkitLy+NbqUNkeOaUPDWt1l0 u8tvQDc6vbGOJ86yW78z8LwTlGghYxFGRbRa1UCyz0p8kmQvVazj7JrDbkSH2hVGbaQH LV2aaUlBLai3MetRgcmvx31RAFfPX7iqDrKfD9l34oi8WwbYlljpR0pfUjklB0GhDX5p bqBIqJ9iXEigmhYfb1mDMjni86NW6TZYNCZ2rqmA88wAE/J9iWfAdvI/JT1TiRtuX4bj w7ow== 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=8R9l5BsPvVTbZ84FeZcxt4X2RgAqP4v5XMlo0+6GLrI=; b=mHI/dAvLntuN4qEz6Q880OTveld+nN/uXgAP6YyVU04S5fg59kwhK0NShZ5PCK2D09 fMWoE8ciqs2FcFD0Ud9jNP/bJ3poM2biKIdwYt6swZ31uvbytE3QcYIlDBxQRIh74uk+ 0o8eo1H89wiOn5p0qknjh8BPXrhhpm3/2zVOGx+ahjBc1EBNS2IgfDxUvjFEHn5oXl12 dhLOJofqm9lFIzJquR2NHyr0meKo8VVTfHpNwLEGnsILz2GCxxbgdCC2m/sl7XrRfAW/ yJ0l+xEubssBANlr+ApsvaI6lU3DSeCdr4EZQM82cPJa81yPOnIcErv2uf+GRNJFeJv3 ezNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VGtNovfD; 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 w197si3519374oif.150.2019.12.19.10.40.27; Thu, 19 Dec 2019 10:40:39 -0800 (PST) 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=VGtNovfD; 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 S1727378AbfLSSjB (ORCPT + 99 others); Thu, 19 Dec 2019 13:39:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:56930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727330AbfLSSiy (ORCPT ); Thu, 19 Dec 2019 13:38:54 -0500 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 E85A2222C2; Thu, 19 Dec 2019 18:38:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576780734; bh=D88LjePSLbN6EE5u40F5tQyTS+zORMtNJIcWViBXcHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VGtNovfDjMu3biIipgBMtkcDqvL61aPMUoB+2nVNvD+Y/QA9RxNCLsLq7GoJ1yTuF 3QVkr6ykuEBrTNywU01RbkMZwANHNVoJkdyJ49n0zWqzIZ6sq+MxagCKho21b2iKD4 JUjJCUab3urOp25Z6lsk4hbzyXz31sHf6fAqqrlc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emiliano Ingrassia Subject: [PATCH 4.4 095/162] usb: core: urb: fix URB structure initialization function Date: Thu, 19 Dec 2019 19:33:23 +0100 Message-Id: <20191219183213.573277837@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183150.477687052@linuxfoundation.org> References: <20191219183150.477687052@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: Emiliano Ingrassia commit 1cd17f7f0def31e3695501c4f86cd3faf8489840 upstream. Explicitly initialize URB structure urb_list field in usb_init_urb(). This field can be potentially accessed uninitialized and its initialization is coherent with the usage of list_del_init() in usb_hcd_unlink_urb_from_ep() and usb_giveback_urb_bh() and its explicit initialization in usb_hcd_submit_urb() error path. Signed-off-by: Emiliano Ingrassia Cc: stable Link: https://lore.kernel.org/r/20191127160355.GA27196@ingrassia.epigenesys.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/urb.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -40,6 +40,7 @@ void usb_init_urb(struct urb *urb) if (urb) { memset(urb, 0, sizeof(*urb)); kref_init(&urb->kref); + INIT_LIST_HEAD(&urb->urb_list); INIT_LIST_HEAD(&urb->anchor_list); } }