1
0
Fork 0
remarkable-linux/drivers/infiniband
Bart Van Assche b33da55625 mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array
commit 99975cd4fd upstream.

ib_map_mr_sg() can pass an SG-list to .map_mr_sg() that is larger
than what fits into a single MR. .map_mr_sg() must not attempt to
map more SG-list elements than what fits into a single MR.
Hence make sure that mlx5_ib_sg_to_klms() does not write outside
the MR klms[] array.

Fixes: b005d31647 ("mlx5: Add arbitrary sg list support")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Leon Romanovsky <leonro@mellanox.com>
Cc: Israel Rukshin <israelr@mellanox.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-27 15:08:07 -07:00
..
core RDMA/core: Initialize port_num in qp_attr 2017-07-27 15:08:07 -07:00
hw mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array 2017-07-27 15:08:07 -07:00
sw IB/rxe: Fix mem_check_range integer overflow 2017-02-14 15:25:42 -08:00
ulp iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done 2017-07-27 15:08:06 -07:00
Kconfig qedr: Add RoCE driver framework 2016-10-14 15:00:10 -04:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00