Patch "IB/rxe: Add a runtime check in alloc_index()" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Thu Oct  5 10:28:31 CEST 2017
From: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
Date: Tue, 10 Jan 2017 11:15:48 -0800
Subject: IB/rxe: Add a runtime check in alloc_index()

From: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>


[ 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 <bart.vanassche@xxxxxxxxxxx>
Reviewed-by: Andrew Boyer <andrew.boyer@xxxxxxxx>
Cc: Moni Shoua <monis@xxxxxxxxxxxx>
Signed-off-by: Doug Ledford <dledford@xxxxxxxxxx>
Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxx 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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]