From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: usb/input/gtco: slab-out-of-bounds in parse_hid_report_descriptor Date: Mon, 23 Oct 2017 22:30:05 -0700 Message-ID: <20171024053005.gleghx4szbdfoj63@dtor-ws> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Andrey Konovalov Cc: linux-input@vger.kernel.org, LKML , Dmitry Vyukov , Kostya Serebryany , syzkaller List-Id: linux-input@vger.kernel.org On Mon, Oct 23, 2017 at 01:24:23PM +0200, Andrey Konovalov wrote: > Hi! > > I've got the following report while fuzzing the kernel with syzkaller. > > On commit 3e0cc09a3a2c40ec1ffb6b4e12da86e98feccb11 (4.14-rc5+). > > parse_hid_report_descriptor() has a while (i < length) loop, which > only guarantees that there's at least 1 byte in the buffer, but the > loop body can read multiple bytes which causes out-of-bounds access. Ugh, this whole driver should be moved over to HID, but I am not sure who has hardware to test... I just sent a patch plugging this hole. Thanks for the report. -- Dmitry