Reviewed-by: Jacob Moroni <[email protected]> On Wed, Mar 25, 2026 at 5:27 PM Jason Gunthorpe <[email protected]> wrote: > > irdma has a comp_mask field that was never checked for validity, check > it. > > Signed-off-by: Jason Gunthorpe <[email protected]> > --- > drivers/infiniband/hw/irdma/verbs.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/irdma/verbs.c > b/drivers/infiniband/hw/irdma/verbs.c > index b2978632241900..d695130b187bdd 100644 > --- a/drivers/infiniband/hw/irdma/verbs.c > +++ b/drivers/infiniband/hw/irdma/verbs.c > @@ -296,7 +296,9 @@ static int irdma_alloc_ucontext(struct ib_ucontext *uctx, > if (udata->outlen < IRDMA_ALLOC_UCTX_MIN_RESP_LEN) > return -EINVAL; > > - ret = ib_copy_validate_udata_in(udata, req, rsvd8); > + ret = ib_copy_validate_udata_in_cm(udata, req, rsvd8, > + IRDMA_ALLOC_UCTX_USE_RAW_ATTR | > + > IRDMA_SUPPORT_WQE_FORMAT_V2); > if (ret) > return ret; > > -- > 2.43.0 > >
- [PATCH v2 00/16] Update drivers to use ib_copy_validate_ud... Jason Gunthorpe
- [PATCH v2 03/16] RDMA: Consolidate patterns with size... Jason Gunthorpe
- [PATCH v2 16/16] RDMA/hns: Remove the duplicate calls... Jason Gunthorpe
- [PATCH v2 05/16] RDMA/pvrdma: Use ib_copy_validate_ud... Jason Gunthorpe
- [PATCH v2 14/16] RDMA/irdma: Add missing comp_mask ch... Jason Gunthorpe
- Re: [PATCH v2 14/16] RDMA/irdma: Add missing comp... Jacob Moroni
- [PATCH v2 13/16] RDMA/hns: Add missing comp_mask chec... Jason Gunthorpe
- [PATCH v2 15/16] RDMA: Remove redundant = {} for udat... Jason Gunthorpe
- [PATCH v2 11/16] RDMA: Use ib_copy_validate_udata_in_... Jason Gunthorpe
- [PATCH v2 12/16] RDMA/mlx5: Pull comp_mask validation... Jason Gunthorpe
- [PATCH v2 09/16] RDMA/mlx4: Use ib_copy_validate_udat... Jason Gunthorpe
- [PATCH v2 06/16] RDMA/mlx5: Use ib_copy_validate_udat... Jason Gunthorpe
- [PATCH v2 01/16] RDMA: Consolidate patterns with offs... Jason Gunthorpe
- [PATCH v2 08/16] RDMA/mlx4: Use ib_copy_validate_udat... Jason Gunthorpe
- [PATCH v2 04/16] RDMA: Use ib_copy_validate_udata_in(... Jason Gunthorpe
- [PATCH v2 07/16] RDMA/mlx5: Use ib_copy_validate_udat... Jason Gunthorpe
