Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4152481ybl; Tue, 20 Aug 2019 07:44:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqya9ksKIJWH5lLr4KXq67R9sLuc1vyiwwWSxqx71YRQ6MiGNt/L5KcXu21VFkwEiqRMoYKD X-Received: by 2002:a65:68cd:: with SMTP id k13mr24975513pgt.411.1566312284551; Tue, 20 Aug 2019 07:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566312284; cv=none; d=google.com; s=arc-20160816; b=xULz6itnAx1H4pQ11vSxD80g4PLE755UJCe5YdktblbxbxJKmMb51pqmqBtLv2wiaQ cE83nEHJD+tVCTp6ypb6pshZUpDJFeIPNCLKdV49i5oDCpeNMqGVKqcpTQti6xmCofMl zo8wtN/J1JGs1TeuMTIOs8QbuIoiGN5KBqeuE82uuRhdu3UAKKBTnRJ/Ktm1uVChd5S7 8dTIPPzt9meglvsnbHMrO3+txBkN8bRs5LuCBPcM0YcF/eUVjKCjOeSWKN1kOPZWog8b /8odUkEBLUoFG4iT2nvSQvFvDIWJpFBVZcPj7tdI4pMihxjRuzud2nU2ecDz4f1J/SOu DMiQ== 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=bLriCAs1NrokRTtASmPgpKc0kq5BoN4P2xWGi7iWVDY=; b=DsY4ZtcK86P8a9rIZAK9HXDPBAkSiBzns0M/9cD/jX+XDt9jR3e0CbnwzpnACbWXCA jXBSa+rnkKRjaQ++ohUhbkVtnlYvWuHarJXSVLa2GAV1XZPPTijXfARWrlLE4xc87ch7 waCCUQVV4qyknlKbDdFSnOsjZ12aKgDbyrlR93xYpNX5l2vKZD1Zfj6fzJS+KM1FzGb/ OOfYy93PPyZLSGwcHMDiMYfoSFtrP9e7Tlc6VaJMnL7dYmcBteJkY8FLm9zdMirRq67/ bAX1XKPoUlmWSmgG9Gz9leSn8iV3fe+sNx47XrSHH413HJNIt0Uen/LGHse8UiysQ7q+ wBrA== ARC-Authentication-Results: i=1; mx.google.com; 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 c9si11405084plo.192.2019.08.20.07.44.29; Tue, 20 Aug 2019 07:44:44 -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; 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 S1730475AbfHTOmL (ORCPT + 99 others); Tue, 20 Aug 2019 10:42:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:54122 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729836AbfHTOmL (ORCPT ); Tue, 20 Aug 2019 10:42:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 55734AF3B; Tue, 20 Aug 2019 14:42:10 +0000 (UTC) Message-ID: <1566312129.11678.27.camel@suse.com> Subject: Re: KASAN: use-after-free Read in iowarrior_disconnect From: Oliver Neukum To: Alan Stern Cc: keescook@chromium.org, gustavo@embeddedor.com, andreyknvl@google.com, syzkaller-bugs@googlegroups.com, gregkh@linuxfoundation.org, syzbot , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Tue, 20 Aug 2019 16:42:09 +0200 In-Reply-To: <1566311916.11678.26.camel@suse.com> References: <1566311916.11678.26.camel@suse.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 20.08.2019, 16:38 +0200 schrieb Oliver Neukum: > Am Dienstag, den 20.08.2019, 10:18 -0400 schrieb Alan Stern: > > On Mon, 19 Aug 2019, Oliver Neukum wrote: > > > > > Am Montag, den 19.08.2019, 07:48 -0700 schrieb syzbot: > > > > Hello, > > > > > > > > syzbot found the following crash on: > > > > > > > > HEAD commit: d0847550 usb-fuzzer: main usb gadget fuzzer driver > > > > git tree: https://github.com/google/kasan.git usb-fuzzer > > > > console output: https://syzkaller.appspot.com/x/log.txt?x=139be302600000 > > > > kernel config: https://syzkaller.appspot.com/x/.config?x=dbc9c80cc095da19 > > > > dashboard link: https://syzkaller.appspot.com/bug?extid=cfe6d93e0abab9a0de05 > > > > compiler: gcc (GCC) 9.0.0 20181231 (experimental) > > > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12fe6b02600000 > > > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1548189c600000 > > > > > > > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > > > > Reported-by: syzbot+cfe6d93e0abab9a0de05@syzkaller.appspotmail.com > > > > > > > > > > #syz test: https://github.com/google/kasan.git d0847550 > > > > There's no need for us to work at cross purposes on this. We can go > > with your approach. > > > > However, the code is more complicated than your patch accounts for. > > The wait can finish in several different ways: > > > > (1) The control URB succeeds and the interrupt URB gets an > > acknowledgment. > > > > (2) The control URB completes with an error. > > > > (3) The wait times out. > > > > (4) A disconnect occurs. > > I absolutely agree. There is something quite wrong in this driver. > Unfortunately this is likely exploitable by a malicious gadget, > so just ignoring this is a bad option. I will need to go through the > logic. Or do you want to have a shot at it? > > The patch was really only for testing. I wanted to know whether > I was hitting this very issue. This driver will need more surgery. PS: Referring to yurex Regards Oliver