linux/drivers/infiniband/hw/mlx4
Yishai Hadas 5533c18ab0 IB/mlx4: Verify port number in flow steering create flow
In procedure mlx4_ib_create_flow, passing an invalid port number
will cause an out-of-bounds array access. Data passed to this procedure
can come from user-space.  Therefore, need to validate port number
before proceeding onwards.

Note that we check against the number of physical ports declared at
the verbs (ib core) level; When bonding is active, the verbs level
sees one physical port, even though the low-level driver sees two ports.

Fixes: f77c0162a3 ("IB/mlx4: Add receive flow steering support")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-06-23 10:07:04 -04:00
..
ah.c infiniband: Replace memset with eth_zero_addr 2016-01-19 15:24:54 -05:00
alias_GUID.c IB/mlx4: Use boottime 2016-02-29 17:11:40 -05:00
cm.c IB/mlx4: In mlx4_ib_demux_cm, print out GUID in host-endian order 2015-02-17 22:11:40 -08:00
cq.c IB: remove in-kernel support for memory windows 2015-12-23 14:29:04 -05:00
doorbell.c IB: Refactor umem to use linear SG table 2014-03-04 10:34:28 -08:00
Kconfig net: mellanox: add DEVLINK dependencies 2016-03-03 17:08:59 -05:00
mad.c IB/mlx4: Fix error flow when sending mads under SRIOV 2016-06-23 10:07:03 -04:00
main.c IB/mlx4: Verify port number in flow steering create flow 2016-06-23 10:07:04 -04:00
Makefile IB/mlx4: Add iov directory in sysfs under the ib device 2012-09-30 20:33:39 -07:00
mcg.c IB/mlx4: Fix unaligned access in send_reply_to_slave 2016-05-18 10:25:56 -04:00
mlx4_ib.h IB/core: Enhance ib_map_mr_sg() 2016-05-13 13:37:57 -04:00
mr.c IB/core: Enhance ib_map_mr_sg() 2016-05-13 13:37:57 -04:00
qp.c IB/mlx4: Fix the SQ size of an RC QP 2016-06-23 10:06:54 -04:00
srq.c Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
sysfs.c IB/mlx4: Forbid using sysfs to change RoCE pkeys 2015-08-30 18:12:22 -04:00
user.h mlx4: 64-byte CQE/EQE support 2012-11-26 10:19:17 -08:00