From: Jason Gunthorpe Subject: Re: [PATCH rdma-next 08/14] RDMA/uverbs: Properly check command supported mask Date: Wed, 14 Feb 2018 16:47:14 -0700 Message-ID: <20180214234714.GE1718@ziepe.ca> References: <20180214123844.30321-1-leon@kernel.org> <20180214123844.30321-9-leon@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180214123844.30321-9-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Leon Romanovsky Cc: Doug Ledford , RDMA mailing list , Matan Barak , Noa Osherovich , Leon Romanovsky List-Id: linux-rdma@vger.kernel.org On Wed, Feb 14, 2018 at 02:38:38PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > The check based on index is not sufficient because > > IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ > > and IB_USER_VERBS_CMD_CREATE_CQ <= IB_USER_VERBS_CMD_OPEN_QP, > so if we execute IB_USER_VERBS_EX_CMD_CREATE_CQ this code checks > ib_dev->uverbs_cmd_mask not ib_dev->uverbs_ex_cmd_mask. > > Signed-off-by: Leon Romanovsky > drivers/infiniband/core/uverbs_main.c | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) This seems like an RC fix to me, since we are not properly validating input commands... ?? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html