[syzbot] [cifs?] WARNING in smbdirect_connect_rdma_event_handler

From: syzbot

Date: Sun Nov 22 2026 - 09:01:40 EST


Hello,

syzbot found the following issue on:

HEAD commit: d0f871bfb831 Merge tag 'arm64-fixes' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=107cbabd580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d16c0eae9c338e3c
dashboard link: https://syzkaller.appspot.com/bug?extid=a989758ffc6f93223eb6
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/14c5ba415020/disk-d0f871bf.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/90aa1edd6ee8/vmlinux-d0f871bf.xz
kernel image: https://storage.googleapis.com/syzbot-assets/45d67d635102/bzImage-d0f871bf.xz

The issue was bisected by AI to:

commit d1f187656797fc7434388c1795e05f8abe370d46
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date: Mon Sep 1 14:10:49 2025 +0000

smb: smbdirect: introduce smbdirect_connect[_sync]()

AI reasoning: https://syzkaller.appspot.com/ai_job?id=d29fe03c-f946-4e73-8c7d-eddda90b1783

AI-generated root cause summary:
smbdirect_connect_rdma_event_handler() accesses sc->first_error and sc->status
without synchronization or READ_ONCE/barriers against concurrent teardown in
smbdirect_connection_wait_for_connected(),
__smbdirect_socket_schedule_cleanup(), and smbdirect_socket_destroy_sync(),
which modify sc->first_error and sc->status (to SMBDIRECT_SOCKET_DISCONNECTED)
before acquiring rdma_lock_handler(sc->rdma.cm_id). When the waiter is
interrupted by a signal (-ERESTARTSYS), the cleanup/destroy path can advance
sc->status to SMBDIRECT_SOCKET_DISCONNECTED and set sc->first_error =
-ERESTARTSYS between the handler's sc->first_error check and its sc->status
check in SMBDIRECT_CHECK_STATUS_DISCONNECT(), triggering the WARN_ONCE at
fs/smb/smbdirect/connect.c:307. Moreover, because smbdirect_socket_destroy()
disables work items before taking rdma_lock_handler(), the same race allows
smbdirect_connect_rdma_connect() to re-initialize and schedule
sc->idle.timer_work after it was disabled, risking a use-after-free after sc is
freed.

full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=a989758ffc6f93223eb6

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a989758ffc6f93223eb6@xxxxxxxxxxxxxxxxxxxxxxxxx

The cause commit was identified by AI and may be wrong.
If you agree with it, please also add:
Fixes: d1f187656797 ("smb: smbdirect: introduce smbdirect_connect[_sync]()")

------------[ cut here ]------------
expected[RESOLVE_ADDR_RUNNING] != DISCONNECTED first_error=-ERESTARTSYS local=127.0.0.1:51036 remote=127.0.0.1:445
WARNING: fs/smb/smbdirect/connect.c:307 at smbdirect_connect_rdma_event_handler+0x1e02/0x2820 fs/smb/smbdirect/connect.c:307, CPU#1: kworker/u8:7/198
Modules linked in:
CPU: 1 UID: 0 PID: 198 Comm: kworker/u8:7 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: rdma_cm cma_work_handler
RIP: 0010:smbdirect_connect_rdma_event_handler+0x2086/0x2820 fs/smb/smbdirect/connect.c:307
Code: df 41 0f b6 04 06 84 c0 0f 85 67 06 00 00 49 63 8f 98 00 00 00 48 89 df 48 c7 c6 20 a8 be 8b 4c 89 ea 4d 89 e0 4c 8b 4c 24 08 <67> 48 0f b9 3a 4c 89 ff 48 c7 c6 60 97 be 8b 31 d2 48 c7 c1 6f 55
RSP: 0018:ffffc90004257a08 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffff90dcd1d0 RCX: fffffffffffffe00
RDX: ffffffff8bbeab40 RSI: ffffffff8bbea820 RDI: ffffffff90dcd1d0
RBP: ffff8880295a2098 R08: ffff888062fdc020 R09: ffff888062fdc0a0
R10: 0000000000000100 R11: 0000000000000012 R12: ffff888062fdc020
R13: ffffffff8bbeab40 R14: 1ffff110052b4413 R15: ffff8880295a2000
FS: 0000000000000000(0000) GS:ffff888124804000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4a41662068 CR3: 00000000352ee000 CR4: 00000000003526f0
Call Trace:
<TASK>
cma_cm_event_handler+0xac/0x2c0 drivers/infiniband/core/cma.c:2181
cma_work_handler+0x265/0x520 drivers/infiniband/core/cma.c:3040
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 41 0f b6 04 06 movzbl (%r14,%rax,1),%eax
5: 84 c0 test %al,%al
7: 0f 85 67 06 00 00 jne 0x674
d: 49 63 8f 98 00 00 00 movslq 0x98(%r15),%rcx
14: 48 89 df mov %rbx,%rdi
17: 48 c7 c6 20 a8 be 8b mov $0xffffffff8bbea820,%rsi
1e: 4c 89 ea mov %r13,%rdx
21: 4d 89 e0 mov %r12,%r8
24: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
* 29: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2e: 4c 89 ff mov %r15,%rdi
31: 48 c7 c6 60 97 be 8b mov $0xffffffff8bbe9760,%rsi
38: 31 d2 xor %edx,%edx
3a: 48 rex.W
3b: c7 .byte 0xc7
3c: c1 .byte 0xc1
3d: 6f outsl %ds:(%rsi),(%dx)
3e: 55 push %rbp


---
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@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about AI bisection see: https://goo.gl/tpsmEJ#ai-bisection

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

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