linux/drivers/infiniband/hw/hns
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
..
hns_roce_ah.c RDMA/hns: Add UD support for HIP09 2020-11-26 15:24:48 -04:00
hns_roce_alloc.c RDMA/hns: Refactor the hns_roce_buf allocation flow 2020-11-23 19:36:54 -04:00
hns_roce_cmd.c RDMA/hns: Optimize cmd init and mode selection for hip08 2019-09-16 10:52:20 -03:00
hns_roce_cmd.h RDMA/hns: Rename the functions used inside creating cq 2019-11-25 10:31:48 -04:00
hns_roce_common.h RDMA/hns: Add support for CQ stash 2020-11-27 12:53:59 -04:00
hns_roce_cq.c RDMA/hns: Limit the length of data copied between kernel and userspace 2020-12-11 15:21:33 -04:00
hns_roce_db.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
hns_roce_device.h RDMA/hns: Move capability flags of QP and CQ to hns-abi.h 2020-12-07 15:48:51 -04:00
hns_roce_hem.c RDMA/hns: Add support for configuring GMV table 2020-10-28 13:40:42 -03:00
hns_roce_hem.h RDMA/hns: Add support for configuring GMV table 2020-10-28 13:40:42 -03:00
hns_roce_hw_v1.c RDMA: Check attr_mask during modify_qp 2020-10-26 19:27:58 -03:00
hns_roce_hw_v1.h RDMA/hns: Add support for QPC in size of 512 Bytes 2020-09-24 15:35:11 -03:00
hns_roce_hw_v2_dfx.c RDMA/hns: Dump detailed driver-specific CQ 2019-04-08 13:05:25 -03:00
hns_roce_hw_v2.c RDMA/hns: Fix 0-length sge calculation error 2020-12-01 20:58:42 -04:00
hns_roce_hw_v2.h Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
hns_roce_main.c RDMA/hns: Limit the length of data copied between kernel and userspace 2020-12-11 15:21:33 -04:00
hns_roce_mr.c RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr 2020-12-07 14:06:23 -04:00
hns_roce_pd.c RDMA/hns: Limit the length of data copied between kernel and userspace 2020-12-11 15:21:33 -04:00
hns_roce_qp.c RDMA/hns: Limit the length of data copied between kernel and userspace 2020-12-11 15:21:33 -04:00
hns_roce_restrack.c RDMA: Add a dedicated CQ resource tracker function 2020-06-23 11:46:27 -03:00
hns_roce_srq.c RDMA/hns: Limit the length of data copied between kernel and userspace 2020-12-11 15:21:33 -04:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile RDMA/hns: Fix build error again 2019-10-29 16:16:54 -03:00