BUG: corrupted list in p9_fd_cancel

5 views
Skip to first unread message

syzbot

unread,
Jan 22, 2023, 11:01:38 PM1/22/23
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 72d681a01da5 Revert "net: use struct_group to copy ip/ipv6..
git tree: android13-5.15-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=16e4f239480000
kernel config: https://syzkaller.appspot.com/x/.config?x=f4ba95ecf3958808
dashboard link: https://syzkaller.appspot.com/bug?extid=f16f0917d568e2e29bb6
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10baa461480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15a4fc51480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9121a81631c9/disk-72d681a0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e5b495231897/vmlinux-72d681a0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/bbbaed45751a/bzImage-72d681a0.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f16f09...@syzkaller.appspotmail.com

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


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Jan 23, 2023, 2:19:31 AM1/23/23
to syzkaller-a...@googlegroups.com
syzbot has bisected this issue to:

commit a4f1a01b2e81378fce9ca528d4d8a049e4b58fcd
Author: Dominique Martinet <asma...@codewreck.org>
Date: Wed Aug 17 05:58:44 2022 +0000

9p: trans_fd/p9_conn_cancel: drop client lock earlier

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1573bed5480000
start commit: 72d681a01da5 Revert "net: use struct_group to copy ip/ipv6..
git tree: android13-5.15-lts
final oops: https://syzkaller.appspot.com/x/report.txt?x=1773bed5480000
console output: https://syzkaller.appspot.com/x/log.txt?x=1373bed5480000
Reported-by: syzbot+f16f09...@syzkaller.appspotmail.com
Fixes: a4f1a01b2e81 ("9p: trans_fd/p9_conn_cancel: drop client lock earlier")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Tudor Ambarus

unread,
Jan 23, 2023, 4:53:04 AM1/23/23
to syzbot+f16f09...@syzkaller.appspotmail.com, jone...@google.com, syzkaller-a...@googlegroups.com
#syz fix: 9p/fd: fix issue of list_del corruption in p9_fd_cancel()

syzbot

unread,
Jan 27, 2023, 2:47:38 AM1/27/23
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0ed90f62b184 UPSTREAM: ALSA: pcm: Move rwsem lock inside s..
git tree: android12-5.4
console output: https://syzkaller.appspot.com/x/log.txt?x=15da0835480000
kernel config: https://syzkaller.appspot.com/x/.config?x=8dc6bbfc90d8f09a
dashboard link: https://syzkaller.appspot.com/bug?extid=5d0b7b47fba1d8103429
compiler: Debian clang version 13.0.1-6~deb11u1, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dd9b08fe9f06/disk-0ed90f62.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4aa53427ed99/vmlinux-0ed90f62.xz
kernel image: https://storage.googleapis.com/syzbot-assets/58f56e9f6727/bzImage-0ed90f62.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5d0b7b...@syzkaller.appspotmail.com

list_del corruption, ffff8881ed2a8be0->next is LIST_POISON1 (dead000000000100)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:55!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3886 Comm: syz-executor.2 Not tainted 5.4.225-syzkaller-00026-g0ed90f62b184 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:__list_del_entry_valid+0xef/0x130 lib/list_debug.c:53
Code: 7e 58 18 02 0f 0b 48 c7 c7 40 4a fe 84 4c 89 f6 31 c0 e8 6b 58 18 02 0f 0b 48 c7 c7 a0 4a fe 84 4c 89 f6 31 c0 e8 58 58 18 02 <0f> 0b 48 c7 c7 00 4b fe 84 4c 89 f6 31 c0 e8 45 58 18 02 0f 0b 48
RSP: 0018:ffff8881cee97538 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000100 RCX: 529d43086a633700
RDX: ffffc90002556000 RSI: 0000000000016221 RDI: 0000000000016222
RBP: 0000000000000001 R08: ffffffff814e6f67 R09: ffffed103edcaa08
R10: ffffed103edcaa08 R11: 1ffff1103edcaa07 R12: dffffc0000000000
R13: ffff8881ed2a8b60 R14: ffff8881ed2a8be0 R15: dead000000000122
FS: 00007fd870374700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000001d1164000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_del_entry include/linux/list.h:131 [inline]
list_del include/linux/list.h:139 [inline]
p9_fd_cancel+0x68/0x1d0 net/9p/trans_fd.c:697
p9_client_rpc+0x81f/0xae0 net/9p/client.c:783
p9_client_version+0x179/0x710 net/9p/client.c:942
p9_client_create+0x8a1/0xb60 net/9p/client.c:1052
v9fs_session_init+0x1f0/0x17d0 fs/9p/v9fs.c:406
v9fs_mount+0x72/0x770 fs/9p/vfs_super.c:124
legacy_get_tree+0xde/0x170 fs/fs_context.c:647
vfs_get_tree+0x85/0x260 fs/super.c:1547
do_new_mount+0x299/0x580 fs/namespace.c:2843
do_mount+0x6ac/0xe10 fs/namespace.c:3163
ksys_mount+0xc2/0xf0 fs/namespace.c:3372
__do_sys_mount fs/namespace.c:3386 [inline]
__se_sys_mount fs/namespace.c:3383 [inline]
__x64_sys_mount+0xb1/0xc0 fs/namespace.c:3383
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Modules linked in:
---[ end trace 8be25047c950edb3 ]---
RIP: 0010:__list_del_entry_valid+0xef/0x130 lib/list_debug.c:53
Code: 7e 58 18 02 0f 0b 48 c7 c7 40 4a fe 84 4c 89 f6 31 c0 e8 6b 58 18 02 0f 0b 48 c7 c7 a0 4a fe 84 4c 89 f6 31 c0 e8 58 58 18 02 <0f> 0b 48 c7 c7 00 4b fe 84 4c 89 f6 31 c0 e8 45 58 18 02 0f 0b 48
RSP: 0018:ffff8881cee97538 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000100 RCX: 529d43086a633700
RDX: ffffc90002556000 RSI: 0000000000016221 RDI: 0000000000016222
RBP: 0000000000000001 R08: ffffffff814e6f67 R09: ffffed103edcaa08
R10: ffffed103edcaa08 R11: 1ffff1103edcaa07 R12: dffffc0000000000
R13: ffff8881ed2a8b60 R14: ffff8881ed2a8be0 R15: dead000000000122
FS: 00007fd870374700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000001d1164000 CR4: 00000000003406f0

syzbot

unread,
May 27, 2023, 3:47:35 AM5/27/23
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages