syzbot


BUG: corrupted list in cma_listen_on_dev

Status: closed as dup on 2020/03/09 17:20
Reported-by: syzbot+2b10b240fbbed30f10fb@syzkaller.appspotmail.com
First crash: 935d, last: 935d

Cause bisection: introduced by (bisect log) [merge commit]:
commit b753c5a7f99f390fc100de18647ce0dcacdceafc
Author: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Wed Aug 14 01:12:45 2019 +0000

  Merge branch 'r8152-RX-improve'

Crash: general protection fault in batadv_iv_ogm_queue_add (log)
Repro: C syz .config
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in rdma_listen (2) C done 354 906d 1274d
Patch testing requests:
Created Duration User Patch Repo Result
2020/03/04 13:56 17m 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 (ffff8880a96d3470), but was ffffffff89543330. (prev=ffff8880a660a1e0).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:28!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9161 Comm: syz-executor219 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+0xbb/0xc0 lib/list_debug.c:26
Code: 48 c7 c7 37 e9 f0 88 4c 89 e6 4c 89 f1 31 c0 e8 be 0d bb fd 0f 0b 48 c7 c7 9a e9 f0 88 4c 89 f6 4c 89 e1 31 c0 e8 a8 0d bb fd <0f> 0b 0f 1f 00 55 48 89 e5 41 57 41 56 41 54 53 49 89 fe 49 bc 00
RSP: 0018:ffffc90002217ba8 EFLAGS: 00010246
RAX: 0000000000000075 RBX: ffff8880a96d3478 RCX: 8fbfbd6f3e068e00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc90002217bd0 R08: ffffffff81601324 R09: ffffed1015d46618
R10: ffffed1015d46618 R11: 0000000000000000 R12: ffff8880a660a1e0
R13: dffffc0000000000 R14: ffff8880a96d3470 R15: ffff8880a7f691e0
FS:  00007f2670a0f700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f70fb63c000 CR3: 00000000a6af6000 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 drivers/infiniband/core/cma.c:471 [inline]
 cma_listen_on_dev+0x359/0x8e0 drivers/infiniband/core/cma.c:2493
 cma_listen_on_all drivers/infiniband/core/cma.c:2514 [inline]
 rdma_listen+0x43b/0x9a0 drivers/infiniband/core/cma.c:3622
 ucma_listen+0x245/0x300 drivers/infiniband/core/ucma.c:1092
 ucma_write+0x2da/0x360 drivers/infiniband/core/ucma.c:1684
 __vfs_write+0xb8/0x740 fs/read_write.c:494
 vfs_write+0x270/0x580 fs/read_write.c:558
 ksys_write+0x117/0x220 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+0x7b/0x90 fs/read_write.c:620
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4495e9
Code: e8 8c 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 fb 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f2670a0eda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006dec68 RCX: 00000000004495e9
RDX: 0000000000000010 RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00000000006dec60 R08: 00007f2670a0f700 R09: 0000000000000000
R10: 00007f2670a0f700 R11: 0000000000000246 R12: 00000000006dec6c
R13: 0000000000000000 R14: 0000000000006f6c R15: 00000000006dec6c
Modules linked in:
---[ end trace 4b9dfed7ba7e8985 ]---
RIP: 0010:__list_add_valid+0xbb/0xc0 lib/list_debug.c:26
Code: 48 c7 c7 37 e9 f0 88 4c 89 e6 4c 89 f1 31 c0 e8 be 0d bb fd 0f 0b 48 c7 c7 9a e9 f0 88 4c 89 f6 4c 89 e1 31 c0 e8 a8 0d bb fd <0f> 0b 0f 1f 00 55 48 89 e5 41 57 41 56 41 54 53 49 89 fe 49 bc 00
RSP: 0018:ffffc90002217ba8 EFLAGS: 00010246
RAX: 0000000000000075 RBX: ffff8880a96d3478 RCX: 8fbfbd6f3e068e00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc90002217bd0 R08: ffffffff81601324 R09: ffffed1015d46618
R10: ffffed1015d46618 R11: 0000000000000000 R12: ffff8880a660a1e0
R13: dffffc0000000000 R14: ffff8880a96d3470 R15: ffff8880a7f691e0
FS:  00007f2670a0f700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f70fb63c000 CR3: 00000000a6af6000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2020/03/03 19:49 upstream 63623fd44972 c88c7b75 .config log report syz C
* Struck through repros no longer work on HEAD.