Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2666604pxb; Tue, 24 Aug 2021 04:56:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymB29nQTqHstepV0Ic4O3b1qb4BlQ+DjW0P7zDCcy6RmL5bZYcn+USVCCn771AeTXs/APH X-Received: by 2002:a02:c8cc:: with SMTP id q12mr34267174jao.93.1629806176895; Tue, 24 Aug 2021 04:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629806176; cv=none; d=google.com; s=arc-20160816; b=newRIjxLedR6d5UhIblJlAZuuvBpRDMNhc596UZLyf7eyi2giUrYpSRs2bhTWG+a53 pJ1CApUlAhb02OMkCzlxqSko+ndWGlM3sY2JaUw3enjnrG8njx+OYYW7ZUowcGnqIWlD EBRkMtF7iDUqInQ+ITKCLzJPuQefdXsPbdVEgxHxWNY4EFq6P+fMPiLyxRzy1DmNS21v ETbOUTvGce3TUdKmAL9WH8LfAtG1BfeIVe28n6UPjqAEyR5QX242WfJuocfiRa/V4uX2 NZpZm93FVsY5/6ISRGfvB1HsQVDrZS3/WqU2H2TWLbfIqdJuQPNuuA5jFkJyTnXx2Sx0 Oemg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=MXYlRfPz0Q8jpc37mL+YuPUF3vpweOyNDpbGvPAjqcc=; b=d64xRupmmN7/H4dgqKVGBZzzGH7riqFg9PcqwO6RtJTpnrD9sew4OR5sNXY6exty+p 13nIXWHtJ+7cRl04FWcCHbLBRCxsA2OHrCOnfKhWDQRXvJ0TXi2/R1kgELlF0uAR3Sk+ Zgwuf+ya1E9KgSzoew+hPO4rUY/MWwiFd6uz1ty57pErr0whr4Mz4m2fv152vm1+3Pcg wFNNtK2uniLxdx2WK+7/e90TKI4OYP70zGhdf2GoG/vRZyojNkf3SrsqPpzANzikuwdo D3QdKUheMpKVt5FUKlzHooa+GA2vD4lvAn1DxzHnTHcYKxkgIrJ1t9OqRipsObyYgxfa 4L1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sZqqpm3w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si16363612jaj.53.2021.08.24.04.56.05; Tue, 24 Aug 2021 04:56:16 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sZqqpm3w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236801AbhHXLyo (ORCPT + 99 others); Tue, 24 Aug 2021 07:54:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:57004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236622AbhHXLyn (ORCPT ); Tue, 24 Aug 2021 07:54:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 482C6611F0; Tue, 24 Aug 2021 11:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629806039; bh=dyA/gddwc1ZbdgERfmKbuXd8glHESw+7KVjh327CGjo=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=sZqqpm3wrSD1UIIBn3Yo5NbgiVUG9PGFihC3TBgi2NESPCdyObiFroQHPr/Kr2WYj CS1JZeQtPbTu45BKGZEjjl1DeG5nN0T5CIbEh1OrFiky14COihqdFLx7idwJYecgei K81wrRJi984GNt5l4S48N9SaU1iER/Lkm/0JtME88TSVXsdh3o3nlJldm34WewqBO+ qCZW/dyZmj5a8QNmB2dSicJCR8aCsVFkgtjgA98VRJXi5dX8/Qvu6oIif2vstz6zkd KL+oeSv3ZAWiMYx0yimZwa6APsTqmePalelPGFh1MelMLKUzM3uEZSBwhBCIQAXyvg hXySCPMbL8R2Q== Date: Tue, 24 Aug 2021 13:53:56 +0200 (CEST) From: Jiri Kosina To: Alan Stern cc: syzbot , benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, mkubecek@suse.cz, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] WARNING in hid_submit_ctrl/usb_submit_urb In-Reply-To: <20210820140620.GA35867@rowland.harvard.edu> Message-ID: References: <20210819195300.GA8613@rowland.harvard.edu> <000000000000c322ab05c9f2e880@google.com> <20210820140620.GA35867@rowland.harvard.edu> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Aug 2021, Alan Stern wrote: > > syzbot has tested the proposed patch and the reproducer did not trigger any issue: > > That's good to know. Still, I suspect there's a better way of handling > this condition. > > In particular, does it make sense to accept descriptors for input or > feature reports with length zero? I can't imagine what good such > reports would do. I quickly went through drivers + some hidraw users, and can't spot any use case for it. > On the other hand, I'm not familiar enough with the code to know the > right way to reject these descriptors and reports. It looks like the > HID subsystem was not designed with this sort of check in mind. > > Benjamin and Jiri, what do you think? Is it okay to allow descriptors > for zero-length reports and just pretend they have length 1 (as the > patch tested by syzbot did), or should we instead reject them during > probing? I think it's a good band-aid for 5.14 (or 5.14-stable if we don't make it), and if it turns out to break something (which I don't expect), than we can look into rejecting already during probe. Benjamin, is there a way to run this quickly through your HID regression testing machinery? Thanks, -- Jiri Kosina SUSE Labs