From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38256 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbdJEIbT (ORCPT ); Thu, 5 Oct 2017 04:31:19 -0400 Subject: Patch "IB/rxe: Add a runtime check in alloc_index()" has been added to the 4.9-stable tree To: bart.vanassche@sandisk.com, alexander.levin@verizon.com, andrew.boyer@dell.com, dledford@redhat.com, gregkh@linuxfoundation.org, monis@mellanox.com Cc: , From: Date: Thu, 05 Oct 2017 10:30:16 +0200 Message-ID: <15071922165037@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled IB/rxe: Add a runtime check in alloc_index() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ib-rxe-add-a-runtime-check-in-alloc_index.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Thu Oct 5 10:28:31 CEST 2017 From: Bart Van Assche Date: Tue, 10 Jan 2017 11:15:48 -0800 Subject: IB/rxe: Add a runtime check in alloc_index() From: Bart Van Assche [ Upstream commit 642c7cbcaf2ffc1e27f67eda3dc47347ac5aff37 ] Since index values equal to or above 'range' can trigger memory corruption, complain if index >= range. Signed-off-by: Bart Van Assche Reviewed-by: Andrew Boyer Cc: Moni Shoua Signed-off-by: Doug Ledford Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/sw/rxe/rxe_pool.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/infiniband/sw/rxe/rxe_pool.c +++ b/drivers/infiniband/sw/rxe/rxe_pool.c @@ -274,6 +274,7 @@ static u32 alloc_index(struct rxe_pool * if (index >= range) index = find_first_zero_bit(pool->table, range); + WARN_ON_ONCE(index >= range); set_bit(index, pool->table); pool->last = index; return index + pool->min_index; Patches currently in stable-queue which might be from bart.vanassche@sandisk.com are queue-4.9/ib-rxe-add-a-runtime-check-in-alloc_index.patch queue-4.9/ib-rxe-fix-a-mr-reference-leak-in-check_rkey.patch