Commit bb6d73d
RDMA/irdma: Prevent zero-length STAG registration
Currently irdma allows zero-length STAGs to be programmed in HW during
the kernel mode fast register flow. Zero-length MR or STAG registration
disable HW memory length checks.
Improve gaps in bounds checking in irdma by preventing zero-length STAG or
MR registrations except if the IB_PD_UNSAFE_GLOBAL_RKEY is set.
This addresses the disclosure CVE-2023-25775.
Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Christopher Bednarz <christopher.n.bednarz@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20230818144838.1758-1-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>1 parent ed10435 commit bb6d73d
3 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1064 | 1067 | | |
1065 | 1068 | | |
1066 | 1069 | | |
| |||
1126 | 1129 | | |
1127 | 1130 | | |
1128 | 1131 | | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1129 | 1135 | | |
1130 | 1136 | | |
1131 | 1137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| 972 | + | |
972 | 973 | | |
973 | 974 | | |
974 | 975 | | |
| |||
996 | 997 | | |
997 | 998 | | |
998 | 999 | | |
| 1000 | + | |
999 | 1001 | | |
1000 | 1002 | | |
1001 | 1003 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2624 | 2624 | | |
2625 | 2625 | | |
2626 | 2626 | | |
2627 | | - | |
| 2627 | + | |
| 2628 | + | |
2628 | 2629 | | |
2629 | 2630 | | |
2630 | 2631 | | |
| |||
2640 | 2641 | | |
2641 | 2642 | | |
2642 | 2643 | | |
| 2644 | + | |
2643 | 2645 | | |
2644 | 2646 | | |
2645 | 2647 | | |
| |||
2687 | 2689 | | |
2688 | 2690 | | |
2689 | 2691 | | |
| 2692 | + | |
| 2693 | + | |
2690 | 2694 | | |
2691 | 2695 | | |
2692 | 2696 | | |
| |||
2766 | 2770 | | |
2767 | 2771 | | |
2768 | 2772 | | |
2769 | | - | |
| 2773 | + | |
| 2774 | + | |
2770 | 2775 | | |
2771 | 2776 | | |
2772 | 2777 | | |
| |||
2785 | 2790 | | |
2786 | 2791 | | |
2787 | 2792 | | |
| 2793 | + | |
2788 | 2794 | | |
2789 | 2795 | | |
2790 | 2796 | | |
| |||
0 commit comments