From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751854AbdISMju (ORCPT ); Tue, 19 Sep 2017 08:39:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37950 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751000AbdISMjt (ORCPT ); Tue, 19 Sep 2017 08:39:49 -0400 Date: Tue, 19 Sep 2017 14:39:59 +0200 From: Greg Kroah-Hartman To: Andrey Konovalov Cc: Jaejoong Kim , Jonathan Corbet , Mauro Carvalho Chehab , USB list , LKML , syzkaller , Kostya Serebryany , Dmitry Vyukov Subject: Re: usb/core: slab-out-of-bounds in usb_set_configuration Message-ID: <20170919123959.GB17917@kroah.com> References: <20170918185039.GB32669@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 19, 2017 at 01:54:57PM +0200, Andrey Konovalov wrote: > On Mon, Sep 18, 2017 at 8:50 PM, Greg Kroah-Hartman > wrote: > > On Mon, Sep 18, 2017 at 07:22:24PM +0200, Andrey Konovalov wrote: > >> Hi! > >> > >> I've got the following crash while fuzzing the kernel with syzkaller. > >> > >> On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). > >> > >> It seems there's no proper size check of a > >> USB_DT_INTERFACE_ASSOCIATION descriptor. It's only checked that the > >> size is >= 2 in usb_parse_configuration(), so find_iad() might do > >> out-of-bounds access to intf_assoc->bInterfaceCount. > > > > Ah, nice catch! > > > > Does the patch below fix this? > > Hi Greg, > > I believe it does and the bug is no longer triggered with the > reproducer that I have. > > Tested-by: Andrey Konovalov Thanks for testing, I'll go queue this up. greg k-h