summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMaher Sanalla <msanalla@nvidia.com>2026-06-11 15:50:42 +0300
committerJason Gunthorpe <jgg@nvidia.com>2026-06-11 22:15:52 +0300
commitd881d60223aac8fdc12b227d89c76e131e92a9cd (patch)
treeefb17c0a5fc47603b8681a6282edb1da3e68df70 /include/linux
parent666031fed8f0fdfc29b20d125a628c1b0a04cdaf (diff)
downloadlinux-d881d60223aac8fdc12b227d89c76e131e92a9cd.tar.xz
RDMA/mlx5: Fix undefined shift of user RQ WQE size
set_rq_size() computes the RQ WQE size as "1 << rq_wqe_shift" based on the user-provided rq_wqe_shift, which is only checked to be greater than 32, so shifts of 32 are still accepted. A shift of 31 also overflows a signed integer, leading to undefined behavior. Use check_shl_overflow() to compute the RQ WQE size and reject any invalid values. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Link: https://patch.msgid.link/r/20260611-maher-sec-fixes-v1-1-cd8eb2542869@nvidia.com Signed-off-by: Maher Sanalla <msanalla@nvidia.com> Signed-off-by: Edward Srouji <edwards@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions