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=-10.0 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 0CE24C432C3 for ; Fri, 29 Nov 2019 10:20:01 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFB672184C for ; Fri, 29 Nov 2019 10:20:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFB672184C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 978658842D; Fri, 29 Nov 2019 10:20:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CrgDvJxSKoFW; Fri, 29 Nov 2019 10:20:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0E4448843A; Fri, 29 Nov 2019 10:20:00 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D6E0A1BF349 for ; Fri, 29 Nov 2019 10:19:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D2815884F5 for ; Fri, 29 Nov 2019 10:19:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9siDs-XAlCWf for ; Fri, 29 Nov 2019 10:19:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0482E8842D for ; Fri, 29 Nov 2019 10:19:57 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id c19so4382622lji.11 for ; Fri, 29 Nov 2019 02:19:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZWtVf6zhlqG1yD0jYizMqYkj60ZxzCRmOI8BvxjssGc=; b=IAkPyr9gBGUkjc02VuvNqUxmUktGS6PjwyU5bKjcklJuUDk7ioPXqMLgNPrGkrjF8T SGu/M/a+A/IHE7SIIiFmEnTot8MQvfkPAoiHJ6i6x+NyuM1vFXrCxfXqfoEqF274s0SG 7ULs+3uHAIko7XIeU7uMX3X+/GlR0OXxIyZt15+gMXy+vLH7vU4pF9AjInnUsIZ2Phc2 YGzVxJRZ1HiA4sNNql6JGBZjRRPdZ1P9vshxoMZjbiWcAS+K6bpj5uFwZqlnv0jXJr4D ti+CTiR3WaBrLtuy1kbkOEcS+jiXvdo+W4qrRlSyeCVGwrABBwS8f5zqlV3OG1eISAJ3 KUlg== X-Gm-Message-State: APjAAAUnCofBiEZH0wMjcOe6fwjAl+5QnConVt42p/lYnFpKG6OnErRB a4YnGMAJleHJbzvAdMzseTKJwSoU X-Google-Smtp-Source: APXvYqw4g71C2eRvXHbOV45V30LoE6CF3v9D8rtC47pf6fKiAPEM8X2+iIFTkuBwPRMuxp4Ko7CFJw== X-Received: by 2002:a2e:3313:: with SMTP id d19mr38124589ljc.240.1575022795263; Fri, 29 Nov 2019 02:19:55 -0800 (PST) Received: from xi.terra (c-14b8e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.184.20]) by smtp.gmail.com with ESMTPSA id s76sm4550400lje.53.2019.11.29.02.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2019 02:19:54 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.92.3) (envelope-from ) id 1iadNU-0002Ya-AL; Fri, 29 Nov 2019 11:19:56 +0100 From: Johan Hovold To: Greg Kroah-Hartman Subject: [PATCH 1/4] staging: gigaset: fix general protection fault on probe Date: Fri, 29 Nov 2019 11:17:50 +0100 Message-Id: <20191129101753.9721-2-johan@kernel.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191129101753.9721-1-johan@kernel.org> References: <20191129101753.9721-1-johan@kernel.org> MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable , Johan Hovold , Tilman Schmidt , Hansjoerg Lipp , syzbot+35b1c403a14f5c89eba7@syzkaller.appspotmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" Fix a general protection fault when accessing the endpoint descriptors which could be triggered by a malicious device due to missing sanity checks on the number of endpoints. Reported-by: syzbot+35b1c403a14f5c89eba7@syzkaller.appspotmail.com Fixes: 07dc1f9f2f80 ("[PATCH] isdn4linux: Siemens Gigaset drivers - M105 USB DECT adapter") Cc: stable # 2.6.17 Cc: Hansjoerg Lipp Cc: Tilman Schmidt Signed-off-by: Johan Hovold --- drivers/staging/isdn/gigaset/usb-gigaset.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/isdn/gigaset/usb-gigaset.c b/drivers/staging/isdn/gigaset/usb-gigaset.c index 1b9b43659bdf..5e393e7dde45 100644 --- a/drivers/staging/isdn/gigaset/usb-gigaset.c +++ b/drivers/staging/isdn/gigaset/usb-gigaset.c @@ -685,6 +685,11 @@ static int gigaset_probe(struct usb_interface *interface, return -ENODEV; } + if (hostif->desc.bNumEndpoints < 2) { + dev_err(&interface->dev, "missing endpoints\n"); + return -ENODEV; + } + dev_info(&udev->dev, "%s: Device matched ... !\n", __func__); /* allocate memory for our device state and initialize it */ -- 2.24.0 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel