syzbot


BUG: corrupted list in p9_fd_cancel

Status: fixed on 2023/01/27 09:47
Reported-by: syzbot+f16f0917d568e2e29bb6@syzkaller.appspotmail.com
Fix commit: ee3ccd1abbe1 9p/fd: fix issue of list_del corruption in p9_fd_cancel()
First crash: 670d, last: 670d
Cause bisection: introduced by (bisect log) :
commit a4f1a01b2e81378fce9ca528d4d8a049e4b58fcd
Author: Dominique Martinet <asmadeus@codewreck.org>
Date: Wed Aug 17 05:58:44 2022 +0000

  9p: trans_fd/p9_conn_cancel: drop client lock earlier

Crash: BUG: corrupted list in p9_fd_cancel (log)
Repro: C syz .config
  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: corrupted list in p9_fd_cancel v9fs C 34 2314d 2328d 8/28 fixed on 2018/08/28 17:48
android-54 BUG: corrupted list in p9_fd_cancel 1 666d 666d 0/2 auto-obsoleted due to no activity on 2023/05/27 07:47
upstream BUG: corrupted list in p9_fd_cancel (2) v9fs fuse C error 8 736d 761d 22/28 fixed on 2023/02/24 13:50

Sample crash report:
list_del corruption, ffff8881051d2398->next is LIST_POISON1 (dead000000000100)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:55!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 1846 Comm: syz-executor191 Not tainted 5.15.80-syzkaller-00318-g72d681a01da5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:__list_del_entry_valid+0xf4/0x130 lib/list_debug.c:53
Code: 7d 9a 5b 02 0f 0b 48 c7 c7 60 9e 87 85 4c 89 f6 31 c0 e8 6a 9a 5b 02 0f 0b 48 c7 c7 c0 9e 87 85 4c 89 f6 31 c0 e8 57 9a 5b 02 <0f> 0b 48 c7 c7 20 9f 87 85 4c 89 f6 31 c0 e8 44 9a 5b 02 0f 0b 48
RSP: 0018:ffffc900028174c0 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000100 RCX: 9505f8103da74a00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900028174e0 R08: ffffffff81584a89 R09: ffffed103ee265e8
R10: ffffed103ee265e8 R11: 1ffff1103ee265e7 R12: dffffc0000000000
R13: 1ffff11020a3a464 R14: ffff8881051d2398 R15: dead000000000122
FS:  00007ff582251700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 0000000120011000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry include/linux/list.h:132 [inline]
 list_del include/linux/list.h:146 [inline]
 p9_fd_cancel+0x91/0x220 net/9p/trans_fd.c:705
 p9_client_rpc+0x7fb/0xa60 net/9p/client.c:778
 p9_client_version+0x179/0x680
 p9_client_create+0x8f5/0xbb0 net/9p/client.c:1047
 v9fs_session_init+0x1ef/0x17c0 fs/9p/v9fs.c:409
 v9fs_mount+0x75/0x7e0 fs/9p/vfs_super.c:126
 legacy_get_tree+0xf0/0x190 fs/fs_context.c:610
 vfs_get_tree+0x88/0x290 fs/super.c:1499
 do_new_mount+0x289/0xad0 fs/namespace.c:2994
 path_mount+0x60b/0x1050 fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x2d2/0x3c0 fs/namespace.c:3522
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3522
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff5822a00d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 00 00 90 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff582251278 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ff5823294c0 RCX: 00007ff5822a00d9
RDX: 0000000020000200 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 00007ff5822f61e4 R08: 0000000020000380 R09: 65732f636f72702f
R10: 0000000000000000 R11: 0000000000000246 R12: 0031656c69662f2e
R13: 00007ff582251280 R14: 64663d736e617274 R15: 00007ff5823294c8
 </TASK>
Modules linked in:
---[ end trace 21ebd20279b649f4 ]---
RIP: 0010:__list_del_entry_valid+0xf4/0x130 lib/list_debug.c:53
Code: 7d 9a 5b 02 0f 0b 48 c7 c7 60 9e 87 85 4c 89 f6 31 c0 e8 6a 9a 5b 02 0f 0b 48 c7 c7 c0 9e 87 85 4c 89 f6 31 c0 e8 57 9a 5b 02 <0f> 0b 48 c7 c7 20 9f 87 85 4c 89 f6 31 c0 e8 44 9a 5b 02 0f 0b 48
RSP: 0018:ffffc900028174c0 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000100 RCX: 9505f8103da74a00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900028174e0 R08: ffffffff81584a89 R09: ffffed103ee265e8
R10: ffffed103ee265e8 R11: 1ffff1103ee265e7 R12: dffffc0000000000
R13: 1ffff11020a3a464 R14: ffff8881051d2398 R15: dead000000000122
FS:  00007ff582251700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 0000000120011000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/23 03:51 android13-5.15-lts 72d681a01da5 cc0f9968 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: corrupted list in p9_fd_cancel
2023/01/22 23:00 android13-5.15-lts 72d681a01da5 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: corrupted list in p9_fd_cancel
* Struck through repros no longer work on HEAD.