The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [syzbot] [rdma?] KASAN: null-ptr-deref Read in trace_event_raw_event_rtrs_clt_conn_class
@ 2026-08-22 22:56 syzbot
  2026-08-23  1:50 ` Forwarded: [PATCH] RDMA/rtrs-clt: guard against null kobj name syzbot
  0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2026-08-22 22:56 UTC (permalink / raw)
  To: haris.iqbal, jgg, jinpu.wang, leon, linux-kernel, linux-rdma,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    21d6ac051080 Merge branch 'for-next/core' into for-kernelci
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=13e45549580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d1128bc53f2ef7f3
dashboard link: https://syzkaller.appspot.com/bug?extid=1695193198994f4e7fed
compiler:       Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: arm64
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=146f8625580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=14f7c415580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/88380e2ddcb9/disk-21d6ac05.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5dba5c2896b7/vmlinux-21d6ac05.xz
kernel image: https://storage.googleapis.com/syzbot-assets/52ac739e37e0/Image-21d6ac05.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1695193198994f4e7fed@syzkaller.appspotmail.com

rtrs_client L2098: <s1>: Failed to resolve address, err: -ENODEV
rtrs_client L2641: <s1>: init_conns() failed: err=-ENODEV path=<invalid address family>@ip:127.0.0.1 [:0]
==================================================================
BUG: KASAN: null-ptr-deref in do_trace_event_raw_event_rtrs_clt_conn_class drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:58 [inline]
BUG: KASAN: null-ptr-deref in trace_event_raw_event_rtrs_clt_conn_class+0x220/0x480 drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:36
Read of size 255 at addr 0000000000000000 by task syz.0.17/4921

CPU: 0 UID: 0 PID: 4921 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/2026
Call trace:
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C)
 __dump_stack+0x30/0x40 lib/dump_stack.c:94
 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120
 print_report+0x58/0x84 mm/kasan/report.c:485
 kasan_report+0x8c/0xc4 mm/kasan/report.c:595
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x17c/0x1ac mm/kasan/generic.c:200
 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105
 do_trace_event_raw_event_rtrs_clt_conn_class drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:58 [inline]
 trace_event_raw_event_rtrs_clt_conn_class+0x220/0x480 drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:36
 __traceiter_rtrs_clt_close_conns+0x74/0xc8 drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:77
 __do_trace_rtrs_clt_close_conns drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:77 [inline]
 trace_rtrs_clt_close_conns drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h:77 [inline]
 rtrs_clt_close_conns+0x2f0/0x40c drivers/infiniband/ulp/rtrs/rtrs-clt.c:1949
 rtrs_clt_open+0xa6c/0xd54 drivers/infiniband/ulp/rtrs/rtrs-clt.c:2858
 find_and_get_or_create_sess drivers/block/rnbd/rnbd-clt.c:1268 [inline]
 rnbd_clt_map_device+0xcb8/0x1f64 drivers/block/rnbd/rnbd-clt.c:1551
 rnbd_clt_map_device_store+0x900/0xad8 drivers/block/rnbd/rnbd-clt-sysfs.c:612
 dev_attr_store+0x6c/0x90 drivers/base/core.c:2505
 sysfs_kf_write+0xe0/0x108 fs/sysfs/file.c:145
 kernfs_fop_write_iter+0x260/0x3b8 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x51c/0xa0c fs/read_write.c:687
 ksys_write+0x12c/0x228 fs/read_write.c:739
 __do_sys_write fs/read_write.c:750 [inline]
 __se_sys_write fs/read_write.c:747 [inline]
 __arm64_sys_write+0x84/0x98 fs/read_write.c:747
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x19c/0x23c arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
 el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:758
 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:777
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:590
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Forwarded: [PATCH] RDMA/rtrs-clt: guard against null kobj name
  2026-08-22 22:56 [syzbot] [rdma?] KASAN: null-ptr-deref Read in trace_event_raw_event_rtrs_clt_conn_class syzbot
@ 2026-08-23  1:50 ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2026-08-23  1:50 UTC (permalink / raw)
  To: linux-kernel

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

***

Subject: [PATCH] RDMA/rtrs-clt: guard against null kobj name
Author: ryan.mehri1@gmail.com

#syz test

Signed-off-by: Ryan Mehri <ryan.mehri1@gmail.com>
---
 drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h b/drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h
index 7738e2676855..33bf6215d26c 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt-trace.h
@@ -55,7 +55,8 @@ DECLARE_EVENT_CLASS(rtrs_clt_conn_class,
 		__entry->max_reconnect_attempts = clt->max_reconnect_attempts;
 		__entry->fail_cnt = clt_path->stats->reconnects.fail_cnt;
 		__entry->success_cnt = clt_path->stats->reconnects.successful_cnt;
-		memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX);
+		if (kobject_name(&clt_path->kobj))
+			memcpy(__entry->sessname, kobject_name(&clt_path->kobj), NAME_MAX);
 	),
 
 	TP_printk("RTRS-CLT: sess='%s' state=%s attempts='%d' max-attempts='%d' fail='%d' success='%d'",
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [syzbot] [rdma?] KASAN: null-ptr-deref Read in trace_event_raw_event_rtrs_clt_conn_class
       [not found] <20260823015042.102148-1-ryan.mehri1@gmail.com>
@ 2026-08-23  4:02 ` syzbot
  0 siblings, 0 replies; 3+ messages in thread
From: syzbot @ 2026-08-23  4:02 UTC (permalink / raw)
  To: linux-kernel, ryan.mehri1, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+1695193198994f4e7fed@syzkaller.appspotmail.com
Tested-by: syzbot+1695193198994f4e7fed@syzkaller.appspotmail.com

Tested on:

commit:         21d6ac05 Merge branch 'for-next/core' into for-kernelci
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=12464625580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d1128bc53f2ef7f3
dashboard link: https://syzkaller.appspot.com/bug?extid=1695193198994f4e7fed
compiler:       Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: arm64
patch:          https://syzkaller.appspot.com/x/patch.diff?x=1673f179580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-23  4:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-22 22:56 [syzbot] [rdma?] KASAN: null-ptr-deref Read in trace_event_raw_event_rtrs_clt_conn_class syzbot
2026-08-23  1:50 ` Forwarded: [PATCH] RDMA/rtrs-clt: guard against null kobj name syzbot
     [not found] <20260823015042.102148-1-ryan.mehri1@gmail.com>
2026-08-23  4:02 ` [syzbot] [rdma?] KASAN: null-ptr-deref Read in trace_event_raw_event_rtrs_clt_conn_class syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox