From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E5CAFA3728 for ; Wed, 16 Oct 2019 21:56:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39ED221D7C for ; Wed, 16 Oct 2019 21:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262976; bh=kItMa3ZmoBBQ34nmiHaR0G1kAuwiIlzSQGOy69IYQY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=E7/u1PxWSyiLw7RIaZj800AB4JnZGmAdTDxc/tVPm3U0djCnApF1MPcILJq3vv1tt JOb9UD3krICOF0VWcU5Lw9rVtmxTeh8TGO0vJhuQo0h1kLfaQsWFpy78ZWAcbF0Vij PK9L/bWJS1LGY/YAGqNByrd/iueb2ltKSTXRp0Tw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406601AbfJPV4P (ORCPT ); Wed, 16 Oct 2019 17:56:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:47312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437889AbfJPV4D (ORCPT ); Wed, 16 Oct 2019 17:56:03 -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 CD76121925; Wed, 16 Oct 2019 21:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262963; bh=kItMa3ZmoBBQ34nmiHaR0G1kAuwiIlzSQGOy69IYQY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jtjm02bM3GLmcn0DCQT/+popnaIW/hlttV6v2khim1+OLngU0w0wU0LOHpn6tglcu l52uQgJIUWX0rMxYFlqZwov7Je8JxOHJmh4gL8x+Vf8Q4EA/yx3zeKfAGmmO+NVsmU aYvDCNXYqhBjo41RSRDJscd2zPCsVZOMV+ZEr2ZU= 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 4.14 30/65] USB: microtek: fix info-leak at probe Date: Wed, 16 Oct 2019 14:50:44 -0700 Message-Id: <20191016214825.281688203@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214756.457746573@linuxfoundation.org> References: <20191016214756.457746573@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 @@ -720,6 +720,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" );