IB/mlx5: Fix integer overflows in mlx5_ib_create_srq
authorBoris Pismenny <borisp@mellanox.com>
Thu, 8 Mar 2018 13:51:41 +0000 (15:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:01:28 +0000 (11:01 +0100)
commitcf1eb16eef13f4693d6b6bf0fbb7d32a58dc5ca5
tree46601a5ab8f67dfdbaa050af9303b9b3db35bc72
parent3748694f1b91b17f6e311fb10f1168f2ae8e4eca
IB/mlx5: Fix integer overflows in mlx5_ib_create_srq

commit c2b37f76485f073f020e60b5954b6dc4e55f693c upstream.

This patch validates user provided input to prevent integer overflow due
to integer manipulation in the mlx5_ib_create_srq function.

Cc: syzkaller <syzkaller@googlegroups.com>
Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/srq.c
include/linux/mlx5/driver.h