[syzbot] [rdma?] KASAN: null-ptr-deref Read in trace_event_raw_event_rtrs_clt_conn_class

syzbot <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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: [email protected]

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 [email protected].

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.