1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/infiniband/hw/i40iw
Shiraz Saleem 2ed381439e RDMA/i40iw: Address an mmap handler exploit in i40iw
i40iw_mmap manipulates the vma->vm_pgoff to differentiate a push page mmap
vs a doorbell mmap, and uses it to compute the pfn in remap_pfn_range
without any validation. This is vulnerable to an mmap exploit as described
in: https://lore.kernel.org/r/20201119093523.7588-1-zhudi21@huawei.com

The push feature is disabled in the driver currently and therefore no push
mmaps are issued from user-space. The feature does not work as expected in
the x722 product.

Remove the push module parameter and all VMA attribute manipulations for
this feature in i40iw_mmap. Update i40iw_mmap to only allow DB user
mmapings at offset = 0. Check vm_pgoff for zero and if the mmaps are bound
to a single page.

Cc: <stable@kernel.org>
Fixes: d374984179 ("i40iw: add files for iwarp interface")
Link: https://lore.kernel.org/r/20201125005616.1800-2-shiraz.saleem@intel.com
Reported-by: Di Zhu <zhudi21@huawei.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-11-25 10:38:11 -04:00
..
i40iw.h i40iw: Add support to make destroy QP synchronous 2020-09-22 20:23:18 -03:00
i40iw_cm.c i40iw: Add support to make destroy QP synchronous 2020-09-22 20:23:18 -03:00
i40iw_cm.h RDMA: Replace zero-length array with flexible-array member 2020-02-20 13:33:51 -04:00
i40iw_ctrl.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i40iw_d.h i40iw: Report correct firmware version 2020-03-18 13:53:44 -03:00
i40iw_hmc.c i40iw: add hmc resource files 2016-02-29 17:10:53 -05:00
i40iw_hmc.h i40iw: add hmc resource files 2016-02-29 17:10:53 -05:00
i40iw_hw.c i40iw: Add support to make destroy QP synchronous 2020-09-22 20:23:18 -03:00
i40iw_main.c RDMA/i40iw: Address an mmap handler exploit in i40iw 2020-11-25 10:38:11 -04:00
i40iw_osdep.h i40iw: Redefine i40iw_mmiowb() to do nothing 2019-04-08 12:09:15 +01:00
i40iw_p.h i40iw: Report correct firmware version 2020-03-18 13:53:44 -03:00
i40iw_pble.c RDMA/i40iw: Avoid typecast from void to pci_dev 2020-09-16 13:40:29 -03:00
i40iw_pble.h i40iw: add pble resource files 2016-02-29 17:10:53 -05:00
i40iw_puda.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i40iw_puda.h i40iw: Free IEQ resources 2018-01-16 20:38:18 -07:00
i40iw_register.h i40iw: add X722 register file 2016-03-16 13:50:53 -04:00
i40iw_status.h i40iw: Report correct firmware version 2020-03-18 13:53:44 -03:00
i40iw_type.h RDMA/i40iw: Avoid typecast from void to pci_dev 2020-09-16 13:40:29 -03:00
i40iw_uk.c i40iw: Use utility function roundup_pow_of_two() 2017-12-22 13:37:51 -07:00
i40iw_user.h i40iw: Remove limit on re-posting AEQ entries to HW 2018-01-16 20:38:18 -07:00
i40iw_utils.c i40iw: Add support to make destroy QP synchronous 2020-09-22 20:23:18 -03:00
i40iw_verbs.c RDMA/i40iw: Address an mmap handler exploit in i40iw 2020-11-25 10:38:11 -04:00
i40iw_verbs.h i40iw: Add support to make destroy QP synchronous 2020-09-22 20:23:18 -03:00
i40iw_vf.c i40iw: constify i40iw_vf_cqp_ops structure 2016-05-13 13:47:07 -04:00
i40iw_vf.h i40iw: constify i40iw_vf_cqp_ops structure 2016-05-13 13:47:07 -04:00
i40iw_virtchnl.c RDMA/i40iw: fix duplicated code for different branches 2017-06-01 17:00:29 -04:00
i40iw_virtchnl.h i40iw: virtual channel handling files 2016-03-16 13:50:53 -04:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile i40e: Move client header location 2020-06-25 22:25:13 -07:00