From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: [PATCH][next] ath10k: fix out of bound read on array ath10k_rates Date: Thu, 11 Oct 2018 09:49:42 +0000 (UTC) Message-ID: <20181011094942.C151260209@smtp.codeaurora.org> References: <20181005215609.13935-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-wireless@vger.kernel.org, Sriram R , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, "David S . Miller" To: Colin King Return-path: In-Reply-To: <20181005215609.13935-1-colin.king@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+gldad-ath10k=m.gmane.org@lists.infradead.org List-Id: netdev.vger.kernel.org Colin King wrote: > From: Colin Ian King > > An out-of-bounds read on array ath10k_rates is occurring because > the maximum number of elements is currently based on the size of > the array and not the number of elements in the array. Fix this > by using ARRAY_SIZE instead of sizeof. > > Detected by CoverityScan, CID#1473918 ("Out-of-bounds read") > > Fixes: f279294e9ee2 ("ath10k: add support for configuring management packet rate") > Signed-off-by: Colin Ian King This is already fixed in ath-next. error: patch failed: drivers/net/wireless/ath/ath10k/mac.c:164 error: drivers/net/wireless/ath/ath10k/mac.c: patch does not apply stg import: Diff does not apply cleanly Patch set to Rejected. -- https://patchwork.kernel.org/patch/10628815/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches