Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbdLIRCc (ORCPT ); Sat, 9 Dec 2017 12:02:32 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:48372 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbdLIRCa (ORCPT ); Sat, 9 Dec 2017 12:02:30 -0500 Date: Sat, 9 Dec 2017 18:02:37 +0100 From: Greg Kroah-Hartman To: Ben Hutchings Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Colin Ian King , "David S. Miller" , Sasha Levin Subject: Re: [PATCH 4.4 33/49] net: sctp: fix array overrun read on sctp_timer_tbl Message-ID: <20171209170237.GC27604@kroah.com> References: <20171207124703.742654162@linuxfoundation.org> <20171207124708.361475310@linuxfoundation.org> <1512707691.18523.239.camel@codethink.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1512707691.18523.239.camel@codethink.co.uk> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 943 Lines: 28 On Fri, Dec 08, 2017 at 04:34:51AM +0000, Ben Hutchings wrote: > On Thu, 2017-12-07 at 14:07 +0100, Greg Kroah-Hartman wrote: > > 4.4-stable review patch.??If anyone has any objections, please let me > > know. > > > > ------------------ > > > > From: Colin Ian King > > > > > > [ Upstream commit 0e73fc9a56f22f2eec4d2b2910c649f7af67b74d ] > > > > The comparison on the timeout can lead to an array overrun > > read on sctp_timer_tbl because of an off-by-one error. Fix > > this by using < instead of <= and also compare to the array > > size rather than SCTP_EVENT_TIMEOUT_MAX. > > > > Fixes CoverityScan CID#1397639 ("Out-of-bounds read") > > SCTP_EVENT_TIMEOUT_MAX is one less than the array size, so the bounds > check using <= was correct. This is cleanup, not a bug fix. Ah, I was wondering why no one caught this earlier for submission. Coverity isn't the smartest tool at times :( thanks, greg k-h