syzbot


BUG: corrupted list in _cma_attach_to_dev

Status: closed as dup on 2020/03/09 23:03
Reported-by: syzbot+06b50ee4a9bd73e8b89f@syzkaller.appspotmail.com
First crash: 945d, last: 914d
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in rdma_listen (2) C done 354 914d 1283d
Patch testing requests:
Created Duration User Patch Repo Result
2020/03/09 17:24 19m jgg@ziepe.ca git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next OK

Sample crash report:
list_add corruption. prev->next should be next (ffff8880a26c8c70), but was ffffffff8a5d2f20. (prev=ffff8880a10f01e0).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:26!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9631 Comm: syz-executor605 Not tainted 5.6.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_add_valid.cold+0x3a/0x3c lib/list_debug.c:26
Code: 0b 48 89 f2 4c 89 e1 4c 89 ee 48 c7 c7 80 da 91 88 e8 29 3a b8 fd 0f 0b 48 89 f1 48 c7 c7 00 da 91 88 4c 89 e6 e8 15 3a b8 fd <0f> 0b 4c 89 f6 48 c7 c7 a0 db 91 88 e8 04 3a b8 fd 0f 0b 4c 89 ea
RSP: 0018:ffffc90002357b70 EFLAGS: 00010286
RAX: 0000000000000075 RBX: ffff88809d94d000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ebe46 RDI: fffff5200046af60
RBP: ffffc90002357b88 R08: 0000000000000075 R09: ffffed1015d06659
R10: ffffed1015d06658 R11: ffff8880ae8332c7 R12: ffff8880a26c8c70
R13: ffff88809d94d1e0 R14: ffff8880a10f01e0 R15: ffff88809d94d1e0
FS:  00007f24e0ef3700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055dc10c1b110 CR3: 00000000902d2000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_add include/linux/list.h:67 [inline]
 list_add_tail include/linux/list.h:100 [inline]
 _cma_attach_to_dev+0x150/0x2f0 drivers/infiniband/core/cma.c:471
 cma_listen_on_dev+0x252/0x6a0 drivers/infiniband/core/cma.c:2493
 cma_listen_on_all drivers/infiniband/core/cma.c:2514 [inline]
 rdma_listen+0x772/0x970 drivers/infiniband/core/cma.c:3622
 ucma_listen+0x14d/0x1c0 drivers/infiniband/core/ucma.c:1092
 ucma_write+0x2d7/0x3c0 drivers/infiniband/core/ucma.c:1684
 __vfs_write+0x8a/0x110 fs/read_write.c:494
 vfs_write+0x268/0x5d0 fs/read_write.c:558
 ksys_write+0x220/0x290 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:620
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4497d9
Code: e8 6c e7 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f24e0ef2da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006dfc68 RCX: 00000000004497d9
RDX: 0000000000000010 RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00000000006dfc60 R08: 00007f24e0ef3700 R09: 0000000000000000
R10: 00007f24e0ef3700 R11: 0000000000000246 R12: 00000000006dfc6c
R13: 0000000000000000 R14: 0000000000006f6c R15: 00000000006dfc6c
Modules linked in:
---[ end trace 785228753241a020 ]---
RIP: 0010:__list_add_valid.cold+0x3a/0x3c lib/list_debug.c:26
Code: 0b 48 89 f2 4c 89 e1 4c 89 ee 48 c7 c7 80 da 91 88 e8 29 3a b8 fd 0f 0b 48 89 f1 48 c7 c7 00 da 91 88 4c 89 e6 e8 15 3a b8 fd <0f> 0b 4c 89 f6 48 c7 c7 a0 db 91 88 e8 04 3a b8 fd 0f 0b 4c 89 ea
RSP: 0018:ffffc90002357b70 EFLAGS: 00010286
RAX: 0000000000000075 RBX: ffff88809d94d000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ebe46 RDI: fffff5200046af60
RBP: ffffc90002357b88 R08: 0000000000000075 R09: ffffed1015d06659
R10: ffffed1015d06658 R11: ffff8880ae8332c7 R12: ffff8880a26c8c70
R13: ffff88809d94d1e0 R14: ffff8880a10f01e0 R15: ffff88809d94d1e0
FS:  00007f24e0ef3700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055dc10c1b110 CR3: 00000000902d2000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2020/03/06 00:19 upstream 63623fd44972 c88c7b75 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/03/01 17:52 upstream 63623fd44972 c88c7b75 .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/03/19 16:26 linux-next 770fbb32d34e 2c31c529 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/04/01 13:56 upstream 56a451b78067 a34e2c33 .config log report
ci-upstream-kasan-gce-selinux-root 2020/03/01 15:45 upstream 63623fd44972 c88c7b75 .config log report
* Struck through repros no longer work on HEAD.