From: Jason Gunthorpe <jgg@nvidia.com>
To: Jacob Moroni <jmoroni@google.com>
Cc: tatyana.e.nikolova@intel.com, leon@kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/irdma: Prevent user-triggered null deref on QP create
Date: Thu, 2 Jul 2026 14:15:36 -0300 [thread overview]
Message-ID: <20260702171536.GA1502298@nvidia.com> (raw)
In-Reply-To: <20260617164013.280790-1-jmoroni@google.com>
On Wed, Jun 17, 2026 at 04:40:13PM +0000, Jacob Moroni wrote:
> Previously, the user QP creation path would only attempt to
> populate iwqp->iwpbl if the user-provided req.user_wqe_bufs
> field was non-zero. The problem is that iwqp->iwpbl is
> unconditionally dereferenced later on in irdma_setup_virt_qp.
>
> While there was a check for iwqp->iwpbl != NULL, this check
> would only occur if req.user_wqe_bufs was non-zero. The end
> result is that a user could send a zero user_wqe_bufs value
> and trigger a null ptr deref.
>
> Fix this by unconditionally calling irdma_get_pbl and bailing
> if it fails, similar to the CQ and SRQ paths.
>
> Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
> Signed-off-by: Jacob Moroni <jmoroni@google.com>
> Reviewed-by: David Hu <xuehaohu@google.com>
> ---
> drivers/infiniband/hw/irdma/verbs.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
Applied to for-rc
Thanks,
Jason
prev parent reply other threads:[~2026-07-02 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 16:40 [PATCH rdma-next] RDMA/irdma: Prevent user-triggered null deref on QP create Jacob Moroni
2026-06-17 19:59 ` David Hu
2026-07-02 17:15 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260702171536.GA1502298@nvidia.com \
--to=jgg@nvidia.com \
--cc=jmoroni@google.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=tatyana.e.nikolova@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.