Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp667360ybz; Wed, 22 Apr 2020 05:52:10 -0700 (PDT) X-Google-Smtp-Source: APiQypIu/7zTE/etyGNUxf9Obownhm+AzrhXKjZiK7kuADgYmfksEZQAc5cbnlEgZcPEtwD62qa3 X-Received: by 2002:aa7:c34e:: with SMTP id j14mr14196237edr.195.1587559930171; Wed, 22 Apr 2020 05:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587559930; cv=none; d=google.com; s=arc-20160816; b=k0zb7QP82ZJxSyFK/mIb1M6LwQ16JENtB1c3RhXW22SpRAbxYZpbZN2NeSvGYKvAAa uu23RE1GPCLSDVD/Ioa/ofi/HHtp8VkWa67SCTFGQBTH7T3sSMWlyVnPib+1XjrCGjuS QBPfMwchOtj3GiW2CLTL/MpxoGJtr4sWQ2eHlUcl6fDt1Msl6fwcEsHPHeZqEaTorF93 Bl4qpLG0tH6yGAX9uf0DG88bT3pMBAD8LsBtly3ka9eYvQ4G7yPm7MY+Do0hqNOL3kld FCcLhLe5h0Rxx2/s24dbSX8KSVkJvU9KgnWKAVskM2dIQ1f+XltxxJC4BVP6fp+tlfDF uUwA== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=krRXQ+UjGwtrkkTBhFW7qsnYj0d6k052aHE2KBcLPu8=; b=fCrzkx2ZUJTo5f36sXTd84gs2I/0iGOlkFMnDYWL1pSz9eXPHMIXk8S6Yv+MZ6lE22 xwWRuLwqkT10Vcl0QdZrVVkmYz//w/oSzaNRTo6SpCZq91Y8OB/FV3P6I4hDsd5WLmgq 7WYEcsXCPRHLC3GUOW3FkXZvEjxKqZvxxyysbaeTCZ6bHoDq4RuDnABQsrbfCzzUFxVr nUc1mBEicnZMhxrToPzg0KI/QzuF4rL08KU80kxVF+QxY0RpKXDNILSm4DN5tgRjntDU j51CvI4OzKRvrcm5/hyZyTiq8b6CukpAzeL8Sz5ofDgxRFf6BmiHBx+QIFXdswdh5rf3 Tf+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si3269700edp.599.2020.04.22.05.51.46; Wed, 22 Apr 2020 05:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731155AbgDVKch (ORCPT + 99 others); Wed, 22 Apr 2020 06:32:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:34672 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731124AbgDVKcf (ORCPT ); Wed, 22 Apr 2020 06:32:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9187CABCC; Wed, 22 Apr 2020 10:32:32 +0000 (UTC) Message-ID: <1587551540.26476.12.camel@suse.com> Subject: Re: general protection fault in go7007_usb_probe From: Oliver Neukum To: syzbot , andreyknvl@google.com, hverkuil-cisco@xs4all.nl, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, mchehab@kernel.org, syzkaller-bugs@googlegroups.com Cc: tiwai@suse.com Date: Wed, 22 Apr 2020 12:32:20 +0200 In-Reply-To: <000000000000a0f56c05a3d59b69@google.com> References: <000000000000a0f56c05a3d59b69@google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, den 21.04.2020, 16:45 -0700 schrieb syzbot: > syzbot has found a reproducer for the following crash on: > > HEAD commit: e9010320 usb: cdns3: gadget: make a bunch of functions sta.. > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=12da0b58100000 > kernel config: https://syzkaller.appspot.com/x/.config?x=bd14feb44652cfaf > dashboard link: https://syzkaller.appspot.com/bug?extid=cabfa4b5b05ff6be4ef0 > compiler: gcc (GCC) 9.0.0 20181231 (experimental) > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1146eb17e00000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=159d136fe00000 > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+cabfa4b5b05ff6be4ef0@syzkaller.appspotmail.com Hi, this looks to be technically caused by commit a3ea410cac41b19a5490aad7fe6d9a9a772e646e Author: Takashi Iwai Date: Thu Feb 6 16:45:27 2020 +0100 media: go7007: Fix URB type for interrupt handling It introduces this check: + ep = usb->usbdev->ep_in[4]; + if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK) However, there is no guarantee ep_in[4] exists, if a malicious device were involved. But, I do not want to just add a check for NULL. That would just paper over the bug and the driver would fail at a later stage. How many endpoints do these devices need to have to operate? Regards Oliver