public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Leon Romanovsky <leon@kernel.org>
Cc: Andrea Cervesato <andrea.cervesato@suse.de>,
	Linux Test Project <ltp@lists.linux.it>,
	Eric Biggers <ebiggers3@gmail.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com
Subject: Re: [LTP] [PATCH 2/2] device-drivers/rdma: Add ucma_uaf01 test
Date: Tue, 14 Apr 2026 09:30:10 +0200	[thread overview]
Message-ID: <20260414073010.GB230573@pevik> (raw)
In-Reply-To: <20260412141439.GD21470@unreal>

Hi Leon, all,

> On Tue, Apr 07, 2026 at 03:24:26PM +0200, Petr Vorel wrote:
> > Hi Andrea,

> > it's been long time since this use-after-free was fixed, but IMHO still useful
> > to have a test (it's also kind of smoke test for rdma_cm).
> > Anyway, LGTM, but it'd be nice to reproduce the bug.

> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > > Test for use-after-free in RDMA UCMA triggered by racing CREATE_ID,
> > > BIND_IP, and LISTEN operations. Three threads concurrently issue
> > > these commands to /dev/infiniband/rdma_cm and the test checks for
> > > kernel taint (KASAN use-after-free detection).

> > > The bug was fixed by kernel commit 5fe23f262e05
> > > ("ucma: fix a use-after-free in ucma_resolve_ip()").

> > > Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> > > ---
> > >  runtest/kernel_misc                               |   1 +
> > >  testcases/kernel/device-drivers/Makefile          |   1 +
> > >  testcases/kernel/device-drivers/rdma/.gitignore   |   1 +
> > >  testcases/kernel/device-drivers/rdma/Makefile     |   7 +
> > >  testcases/kernel/device-drivers/rdma/ucma_uaf01.c | 208 ++++++++++++++++++++++
> > >  5 files changed, 218 insertions(+)

> <...>

> > > +static struct tst_test test = {
> > > +	.test_all = run,
> > > +	.setup = setup,
> > > +	.cleanup = cleanup,
> > > +	.runtime = 300,
> > > +	.needs_root = 1,
> > > +	.taint_check = TST_TAINT_W | TST_TAINT_D,
> > > +	.needs_kconfigs = (const char *[]) {
> > > +		"CONFIG_INFINIBAND",
> > > +		"CONFIG_INFINIBAND_USER_ACCESS",

> I’m not familiar with the LTP tests, but I wanted to point out that these
> config options are insufficient. You need an actual or virtual RDMA device
> connected to rdma-cm for the tests to work correctly.

Leon, thanks for looking into it. FYI these are just config options to skip
kernels without required kernel modules. 

So using /dev/infiniband/rdma_cm (via RDMA_CM_DEV) is not enough, we need
another device?

Kind regards,
Petr

  reply	other threads:[~2026-04-14  7:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260325-infiniband_rdma-v1-0-9c1bd3e69d29@suse.com>
     [not found] ` <20260325-infiniband_rdma-v1-2-9c1bd3e69d29@suse.com>
2026-04-07 13:24   ` [LTP] [PATCH 2/2] device-drivers/rdma: Add ucma_uaf01 test Petr Vorel
2026-04-12 14:14     ` Leon Romanovsky
2026-04-14  7:30       ` Petr Vorel [this message]
2026-04-14  9:17         ` Leon Romanovsky

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=20260414073010.GB230573@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.de \
    --cc=dledford@redhat.com \
    --cc=ebiggers3@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=rds-devel@oss.oracle.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