Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139AbbHMLxS (ORCPT ); Thu, 13 Aug 2015 07:53:18 -0400 Received: from s3.sipsolutions.net ([5.9.151.49]:47825 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbbHMLxR (ORCPT ); Thu, 13 Aug 2015 07:53:17 -0400 Message-ID: <1439466790.2114.21.camel@sipsolutions.net> Subject: Re: [PATCH] mac80211: fix invalid read in minstrel_sort_best_tp_rates() From: Johannes Berg To: Adrien Schildknecht , davem@davemloft.net, thomas@net.t-labs.tu-berlin.de Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 13 Aug 2015 13:53:10 +0200 In-Reply-To: <1438072216-19228-1-git-send-email-adrien+dev@schischi.me> (sfid-20150728_103052_520611_9034FF48) References: <1438072216-19228-1-git-send-email-adrien+dev@schischi.me> (sfid-20150728_103052_520611_9034FF48) Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 579 Lines: 15 On Tue, 2015-07-28 at 10:30 +0200, Adrien Schildknecht wrote: > At the last iteration of the loop, j may equal zero and thus > tp_list[j - 1] causes an invalid read. > Changed the logic of the loop so that j - 1 is always >= 0. > > Signed-off-by: Adrien Schildknecht > Applied, I added Cc stable. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/