From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754339AbdCMT3Y (ORCPT ); Mon, 13 Mar 2017 15:29:24 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:54440 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752738AbdCMT3B (ORCPT ); Mon, 13 Mar 2017 15:29:01 -0400 Date: Mon, 13 Mar 2017 12:28:57 -0700 (PDT) Message-Id: <20170313.122857.396618777046322808.davem@davemloft.net> To: johan@kernel.org Cc: inaky.perez-gonzalez@intel.com, linux-wimax@intel.com, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, inaky@linux.intel.com Subject: Re: [PATCH] net: wimax/i2400m: fix NULL-deref at probe From: David Miller In-Reply-To: <20170313124203.28490-1-johan@kernel.org> References: <20170313124203.28490-1-johan@kernel.org> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 13 Mar 2017 12:28:57 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold Date: Mon, 13 Mar 2017 13:42:03 +0100 > Make sure to check the number of endpoints to avoid dereferencing a > NULL-pointer or accessing memory beyond the endpoint array should a > malicious device lack the expected endpoints. > > The endpoints are specifically dereferenced in the i2400m_bootrom_init > path during probe (e.g. in i2400mu_tx_bulk_out). > > Fixes: f398e4240fce ("i2400m/USB: probe/disconnect, dev init/shutdown > and reset backends") > Cc: Inaky Perez-Gonzalez > > Signed-off-by: Johan Hovold Applied.