linux/drivers/infiniband/hw
Wenpeng Liang 1c0ca9cd17 RDMA/hns: Limit the length of data copied between kernel and userspace
For ib_copy_from_user(), the length of udata may not be the same as that
of cmd. For ib_copy_to_user(), the length of udata may not be the same as
that of resp. So limit the length to prevent out-of-bounds read and write
operations from ib_copy_from_user() and ib_copy_to_user().

Fixes: de77503a59 ("RDMA/hns: RDMA/hns: Assign rq head pointer when enable rq record db")
Fixes: 633fb4d9fd ("RDMA/hns: Use structs to describe the uABI instead of opencoding")
Fixes: ae85bf92ef ("RDMA/hns: Optimize qp param setup flow")
Fixes: 6fd610c573 ("RDMA/hns: Support 0 hop addressing for SRQ buffer")
Fixes: 9d9d4ff788 ("RDMA/hns: Update the kernel header file of hns")
Link: https://lore.kernel.org/r/1607650657-35992-2-git-send-email-liweihang@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-12-11 15:21:33 -04:00
..
bnxt_re RDMA/bnxt_re: Fix max_qp_wrs reported 2020-12-07 15:43:42 -04:00
cxgb4 RDMA/cxgb4: Validate the number of CQEs 2020-11-23 16:19:46 -04:00
efa RDMA/efa: Use dma_set_mask_and_coherent() to simplify code 2020-12-01 21:03:23 -04:00
hfi1 Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
hns RDMA/hns: Limit the length of data copied between kernel and userspace 2020-12-11 15:21:33 -04:00
i40iw RDMA/i40iw: Replace atomic_add_return(1, ..) 2020-12-07 15:40:23 -04:00
mlx4 RDMA/mlx4: Remove bogus dev_base_lock usage 2020-12-10 16:58:25 -04:00
mlx5 RDMA/mlx5: Remove unneeded semicolon 2020-12-10 12:00:27 -04:00
mthca Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
ocrdma RDMA: Convert sysfs device * show functions to use sysfs_emit() 2020-10-26 19:53:21 -03:00
qedr IB/qedr: Fix fall-through warnings for Clang 2020-11-23 15:54:11 -04:00
qib IB/qib: Use dma_set_mask_and_coherent to simplify code 2020-11-23 16:37:20 -04:00
usnic RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit 2020-10-30 21:03:52 -03:00
vmw_pvrdma Merge branch 'for-rc' into rdma.git 2020-11-17 15:20:26 -04:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00