mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+a6ffe86390c8a6afc818@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [rdma?] KASAN: slab-use-after-free Read in ucma_create_uevent
Date: Wed, 09 Jul 2025 19:12:47 -0700	[thread overview]
Message-ID: <686f219f.050a0220.385921.0025.GAE@google.com> (raw)
In-Reply-To: <686db3ea.050a0220.1ffab7.0028.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [rdma?] KASAN: slab-use-after-free Read in ucma_create_uevent
Author: lizhi.xu@windriver.com

#syz test

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 9b471548e7ae..9b3051bf5225 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2030,6 +2030,7 @@ static void destroy_mc(struct rdma_id_private *id_priv,
 		}
 		dev_put(ndev);
 
+		printk("cma, mc: %p, %s\n", mc, __func__);
 		cancel_work_sync(&mc->iboe_join.work);
 	}
 	kfree(mc);
@@ -5106,6 +5107,7 @@ void rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr)
 		spin_unlock_irq(&id_priv->lock);
 
 		WARN_ON(id_priv->cma_dev->device != id->device);
+		printk("cma, mc: %p, id: %p, %s\n", mc, id, __func__);
 		destroy_mc(id_priv, mc);
 		return;
 	}
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index 6e700b974033..df3cc11b1ef9 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -272,6 +272,7 @@ static struct ucma_event *ucma_create_uevent(struct ucma_context *ctx,
 	case RDMA_CM_EVENT_MULTICAST_ERROR:
 		uevent->mc = (struct ucma_multicast *)
 			     event->param.ud.private_data;
+		printk("mc: %p, evt: %d, %s\n", uevent->mc, event->event, __func__);
 		uevent->resp.uid = uevent->mc->uid;
 		uevent->resp.id = uevent->mc->id;
 		break;
@@ -1486,6 +1487,7 @@ static ssize_t ucma_process_join(struct ucma_file *file,
 	mutex_lock(&ctx->mutex);
 	ret = rdma_join_multicast(ctx->cm_id, (struct sockaddr *)&mc->addr,
 				  join_state, mc);
+	printk("ret: %d, id: %p, mc: %p, %s\n", ret, ctx->cm_id, mc, __func__);
 	mutex_unlock(&ctx->mutex);
 	if (ret)
 		goto err_xa_erase;
@@ -1504,6 +1506,7 @@ static ssize_t ucma_process_join(struct ucma_file *file,
 
 err_leave_multicast:
 	mutex_lock(&ctx->mutex);
+	printk("id: %p, %s\n", ctx->cm_id, __func__);
 	rdma_leave_multicast(ctx->cm_id, (struct sockaddr *) &mc->addr);
 	mutex_unlock(&ctx->mutex);
 	ucma_cleanup_mc_events(mc);

  parent reply	other threads:[~2025-07-10  2:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09  0:12 syzbot
2025-07-09  2:06 ` Hillf Danton
2025-07-09  2:57   ` syzbot
2025-07-09  2:22 ` Edward Adam Davis
2025-07-09  3:08   ` syzbot
2025-07-10  2:12 ` syzbot [this message]
2025-07-25  7:47 ` Forwarded: " syzbot
2025-07-26  1:36 ` Edward Adam Davis
2025-07-26  1:50   ` syzbot
     [not found] <20250710021243.1547487-1-lizhi.xu@windriver.com>
2025-07-10  2:31 ` syzbot
     [not found] <20250725074710.1498616-1-lizhi.xu@windriver.com>
2025-07-25  8:00 ` syzbot

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=686f219f.050a0220.385921.0025.GAE@google.com \
    --to=syzbot+a6ffe86390c8a6afc818@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®