linux/drivers/infiniband
Dan Carpenter 54a6d63f14 IB/mlx4: Potential buffer overflow in _mlx4_set_path()
Smatch complains about this code:

    drivers/infiniband/hw/mlx4/qp.c:1827 _mlx4_set_path()
    error: buffer overflow 'dev->dev->caps.gid_table_len' 3 <= 255

The mlx4_ib_gid_index_to_real_index() does check that "port" is within
bounds, but we don't check the return value for errors.  It seems simple
enough to add a check for that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2017-12-13 11:00:14 -07:00
..
core RDMA/iwpm: Fix uninitialized error code in iwpm_send_mapinfo() 2017-12-13 10:55:49 -07:00
hw IB/mlx4: Potential buffer overflow in _mlx4_set_path() 2017-12-13 11:00:14 -07:00
sw Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
ulp IB/ipoib: Warn when one port fails to initialize 2017-12-13 10:55:49 -07:00
Kconfig infiniband: add MMU dependency for user_mem 2017-10-10 10:49:44 -04:00
Makefile