summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBoris Pismenny <borisp@mellanox.com>2018-03-08 15:51:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-24 11:02:52 +0100
commit23896b7c08f5dd31dc12d01f122939cfb5b31548 (patch)
treebb8f1d29c78bcbda90e9f07a4d4d2400a22bf310 /include/linux
parentf9496d45cd873ddd5d2ebe475c9bc295ad0884ac (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mlx5/driver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index b82c4ae92411..c8198ed8b180 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -442,8 +442,8 @@ struct mlx5_core_srq {
struct mlx5_core_rsc_common common; /* must be first */
u32 srqn;
int max;
- int max_gs;
- int max_avail_gather;
+ size_t max_gs;
+ size_t max_avail_gather;
int wqe_shift;
void (*event) (struct mlx5_core_srq *, enum mlx5_event);