From: Jason Gunthorpe <jgg@nvidia.com>
To: Michal Schmidt <mschmidt@redhat.com>
Cc: Krzysztof Czurylo <krzysztof.czurylo@intel.com>,
Tatyana Nikolova <tatyana.e.nikolova@intel.com>,
Leon Romanovsky <leon@kernel.org>,
Shiraz Saleem <shiraz.saleem@intel.com>,
Mustafa Ismail <mustafa.ismail@intel.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/irdma: avoid invalid read in irdma_net_event
Date: Wed, 17 Dec 2025 14:03:51 -0400 [thread overview]
Message-ID: <20251217180351.GB211693@nvidia.com> (raw)
In-Reply-To: <20251127143150.121099-1-mschmidt@redhat.com>
On Thu, Nov 27, 2025 at 03:31:50PM +0100, Michal Schmidt wrote:
> irdma_net_event() should not dereference anything from "neigh" (alias
> "ptr") until it has checked that the event is NETEVENT_NEIGH_UPDATE.
> Other events come with different structures pointed to by "ptr" and they
> may be smaller than struct neighbour.
>
> Move the read of neigh->dev under the NETEVENT_NEIGH_UPDATE case.
>
> The bug is mostly harmless, but it triggers KASAN on debug kernels:
>
> Fixes: 915cc7ac0f8e ("RDMA/irdma: Add miscellaneous utility definitions")
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---
> drivers/infiniband/hw/irdma/utils.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-rc, thanks
Jason
prev parent reply other threads:[~2025-12-17 23:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 14:31 [PATCH] RDMA/irdma: avoid invalid read in irdma_net_event Michal Schmidt
2025-12-17 18:03 ` 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=20251217180351.GB211693@nvidia.com \
--to=jgg@nvidia.com \
--cc=krzysztof.czurylo@intel.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=mustafa.ismail@intel.com \
--cc=shiraz.saleem@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).