Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1330521ybp; Thu, 17 Oct 2019 11:09:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJN6pC1JfsSsccyNkFxTc5/lQVT8Ztsk2vqTvx/SrogKgOua55Sg7Dt7jB7PjeqXP77/JH X-Received: by 2002:a50:ec91:: with SMTP id e17mr5107078edr.169.1571335772172; Thu, 17 Oct 2019 11:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571335772; cv=none; d=google.com; s=arc-20160816; b=vP2Rvhr7W7uuwz1XKTFpWD2+9+qaP73zat087vxPDxMIETkGsVvWOz8bcWjjOm+sS5 R4P/Z8cAYTQGw8NVF2pANzUDZWVDMQ+ClowkJSABIOoWdOig6ke2GZv+/MQjXEJB4hlv iZqgvJHlDqs1vsF04v70xla5eo7aA1g64u4UrddALVJk9O0f6KYxjrjCATBmnCO3/Gm8 FpseN2RdNlXKWBU8FXa+Fzhg/Z9d0wkV0XTosvzeDjeSnsdgkrdelN/hvat9bZRlkL4c 7V+EN8V13pDrNlfai63CU0R9CSCW6rmdY0zKX3j9LLLc4iLZJxyEgrTxL8WUi3Oh9qti Co1w== 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=2X0aR2RFRvrLIGN63CfHqhKaaSVcfr7N12Ajxu2jklw=; b=Bt0HQYZEMqt5Y92ngo++1LQ1qZH5qBUEKx4/5Hh4aatS8qxej5ubiiyNcvhNwlFhl6 I94OtFzNFfeMTRmA6vilW8oWndTQVViTBoTprzvyBmV0xPc5uThIGSv3yKPrcOtA5vyI +617pr2YAvDhXH4X0o+zkS7N2Fa/g3wcbek2gzylXUlptOQoo1vtVUnx7J00IgHkTnUF 8Ku92XIWWXI/gKVUB6vslSB39ftV5qthpWmRcmczl7g4sLhRY3ts1G+ApmGZ20aASedi GA98oOtKvC0IoVE8eT6VcAYtRR7csM7eyUyDLKTdi4R330kJ9KNMaEHm0/6Q9z7mdiYR Dcig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JovtOjim; 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 v9si1794259eju.422.2019.10.17.11.09.09; Thu, 17 Oct 2019 11:09:32 -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=JovtOjim; 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 S2438524AbfJPV7a (ORCPT + 99 others); Wed, 16 Oct 2019 17:59:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:52116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438158AbfJPV63 (ORCPT ); Wed, 16 Oct 2019 17:58:29 -0400 Received: from localhost (unknown [192.55.54.58]) (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 CE934218DE; Wed, 16 Oct 2019 21:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263109; bh=od/c6TzyPXpf7ky7GdR+hgCyRAWNPIOfz+b/0alOEFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JovtOjimZaP+h7jnLLJ630XNFUxDdNcI0J6TATQxQnyn7lHIILpahmfhdi1VmRj3b 0LmYkXWcDyFt0Xq07J563qrl3kZ+pOI59WvYwrp5gGdllijbJLTcZVpo4FZg8Vtkjd arzHlfN003QX5wdFwchKwWbxu/bSuBQFu1Z6uZZk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+5630ca7c3b2be5c9da5e@syzkaller.appspotmail.com, Johan Hovold , Oliver Neukum Subject: [PATCH 5.3 032/112] USB: microtek: fix info-leak at probe Date: Wed, 16 Oct 2019 14:50:24 -0700 Message-Id: <20191016214853.313145937@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@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 177238c3d47d54b2ed8f0da7a4290db492f4a057 upstream. Add missing bulk-in endpoint sanity check to prevent uninitialised stack data from being reported to the system log and used as endpoint addresses. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reported-by: syzbot+5630ca7c3b2be5c9da5e@syzkaller.appspotmail.com Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Link: https://lore.kernel.org/r/20191003070931.17009-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/image/microtek.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -716,6 +716,10 @@ static int mts_usb_probe(struct usb_inte } + if (ep_in_current != &ep_in_set[2]) { + MTS_WARNING("couldn't find two input bulk endpoints. Bailing out.\n"); + return -ENODEV; + } if ( ep_out == -1 ) { MTS_WARNING( "couldn't find an output bulk endpoint. Bailing out.\n" );