BUG: corrupted list in remove_wait_queue

104 views
Skip to first unread message

syzbot

unread,
Mar 21, 2018, 12:10:04 PM3/21/18
to jaso...@redhat.com, k...@vger.kernel.org, linux-...@vger.kernel.org, m...@redhat.com, net...@vger.kernel.org, syzkall...@googlegroups.com, virtual...@lists.linux-foundation.org
Hello,

syzbot hit the following crash on upstream commit
3215b9d57a2c75c4305a3956ca303d7004485200 (Wed Mar 21 00:44:27 2018 +0000)
Merge tag 'clk-fixes-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=c0272972b01b872e604a

Unfortunately, I don't have any reproducer for this crash yet.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+c02729...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
list_del corruption, 0000000031be84c4->next is LIST_POISON1
(0000000036055018)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:47!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 1219 Comm: syz-executor1 Not tainted 4.16.0-rc6+ #361
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0xd3/0x150 lib/list_debug.c:45
RSP: 0018:ffff8801ae8bf1b8 EFLAGS: 00010086
RAX: 000000000000004e RBX: dead000000000200 RCX: 0000000000000000
RDX: 000000000000004e RSI: 1ffff10035d17dec RDI: ffffed0035d17e2b
RBP: ffff8801ae8bf1d0 R08: 0000000000000000 R09: 1ffff10035d17d93
R10: ffff8801ae8bf090 R11: 0000000000000002 R12: dead000000000100
R13: ffff8801a084bc98 R14: ffff8801a084bca0 R15: ffff8801b1f168c0
FS: 00007f7733a6e700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000930008 CR3: 0000000006e22004 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_del_entry include/linux/list.h:117 [inline]
list_del include/linux/list.h:125 [inline]
__remove_wait_queue include/linux/wait.h:184 [inline]
remove_wait_queue+0x90/0x350 kernel/sched/wait.c:51
vhost_poll_stop+0x46/0x90 drivers/vhost/vhost.c:229
vhost_net_disable_vq drivers/vhost/net.c:405 [inline]
vhost_net_stop_vq+0x90/0xf0 drivers/vhost/net.c:972
vhost_net_stop drivers/vhost/net.c:982 [inline]
vhost_net_release+0x49/0x190 drivers/vhost/net.c:1015
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
get_signal+0x73a/0x16d0 kernel/signal.c:2469
do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x453e69
RSP: 002b:00007f7733a6dce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000072c038 RCX: 0000000000453e69
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000072c038
RBP: 000000000072c038 R08: 0000000000000000 R09: 000000000072c010
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000a3e8ef R14: 00007f7733a6e9c0 R15: 0000000000000002
Code: 8f 00 00 00 49 8b 54 24 08 48 39 f2 75 3b 48 83 c4 08 b8 01 00 00 00
5b 41 5c 5d c3 4c 89 e2 48 c7 c7 00 80 40 86 e8 45 e4 fb fe <0f> 0b 48 c7
c7 60 80 40 86 e8 37 e4 fb fe 0f 0b 48 c7 c7 c0 80
RIP: __list_del_entry_valid+0xd3/0x150 lib/list_debug.c:45 RSP:
ffff8801ae8bf1b8
---[ end trace 76e2c00ea8a52161 ]---


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
raw.log.txt
config.txt

syzbot

unread,
Mar 24, 2018, 8:12:08 AM3/24/18
to jaso...@redhat.com, k...@vger.kernel.org, linux-...@vger.kernel.org, m...@redhat.com, net...@vger.kernel.org, syzkall...@googlegroups.com, virtual...@lists.linux-foundation.org
syzbot has found reproducer for the following crash on upstream commit
99fec39e7725d091c94d1bb0242e40c8092994f6 (Fri Mar 23 22:34:18 2018 +0000)
Merge tag 'trace-v4.16-rc4' of
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
So far this crash happened 3 times on upstream.
syzkaller reproducer is attached.
Raw console output is attached.
.config is attached.
compiler: gcc (GCC) 7.1.1 20170620
user-space arch: i386

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+c02729...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed.

IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
list_del corruption, 0000000005e22148->next is LIST_POISON1
(00000000189fde61)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:47!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 4722 Comm: syz-executor0 Not tainted 4.16.0-rc6+ #274
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0xd3/0x150 lib/list_debug.c:45
RSP: 0018:ffff8801b81d7168 EFLAGS: 00010082
RAX: 000000000000004e RBX: dead000000000200 RCX: 0000000000000000
RDX: 000000000000004e RSI: 1ffff1003703ade2 RDI: ffffed003703ae21
RBP: ffff8801b81d7180 R08: ffffffff86f39cb8 R09: 1ffff1003703ad89
R10: ffff8801b81d7040 R11: 0000000000000002 R12: dead000000000100
R13: ffff8801b028e8d8 R14: ffff8801b028e8e0 R15: ffff8801c764d600
FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000008138024 CR3: 0000000006e22004 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_del_entry include/linux/list.h:117 [inline]
list_del include/linux/list.h:125 [inline]
__remove_wait_queue include/linux/wait.h:184 [inline]
remove_wait_queue+0x90/0x350 kernel/sched/wait.c:51
vhost_poll_stop+0x46/0x90 drivers/vhost/vhost.c:229
vhost_net_disable_vq drivers/vhost/net.c:405 [inline]
vhost_net_stop_vq+0x90/0x120 drivers/vhost/net.c:973
vhost_net_stop drivers/vhost/net.c:984 [inline]
vhost_net_release+0x49/0x190 drivers/vhost/net.c:1017
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
get_signal+0x73a/0x16d0 kernel/signal.c:2469
do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_32_irqs_on arch/x86/entry/common.c:336 [inline]
do_fast_syscall_32+0xbe6/0xf9f arch/x86/entry/common.c:392
entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f47c99
RSP: 002b:00000000f7f2210c EFLAGS: 00000296 ORIG_RAX: 00000000000000f0
RAX: fffffffffffffe00 RBX: 000000000813af98 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Code: 8f 00 00 00 49 8b 54 24 08 48 39 f2 75 3b 48 83 c4 08 b8 01 00 00 00
5b 41 5c 5d c3 4c 89 e2 48 c7 c7 00 80 40 86 e8 85 df fb fe <0f> 0b 48 c7
c7 60 80 40 86 e8 77 df fb fe 0f 0b 48 c7 c7 c0 80
RIP: __list_del_entry_valid+0xd3/0x150 lib/list_debug.c:45 RSP:
ffff8801b81d7168
---[ end trace 39a3fabeba42b75a ]---

raw.log.txt
repro.syz.txt
config.txt

syzbot

unread,
Mar 24, 2018, 8:32:02 AM3/24/18
to jaso...@redhat.com, k...@vger.kernel.org, linux-...@vger.kernel.org, m...@redhat.com, net...@vger.kernel.org, syzkall...@googlegroups.com, virtual...@lists.linux-foundation.org
syzbot has found reproducer for the following crash on upstream commit
99fec39e7725d091c94d1bb0242e40c8092994f6 (Fri Mar 23 22:34:18 2018 +0000)
Merge tag 'trace-v4.16-rc4' of
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
So far this crash happened 4 times on upstream.
C reproducer is attached.
syzkaller reproducer is attached.
Raw console output is attached.
.config is attached.
compiler: gcc (GCC) 7.1.1 20170620

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+c02729...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed.

list_del corruption, 0000000054a89bb5->next is LIST_POISON1
(00000000a63e4a19)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:47!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 4851 Comm: syzkaller762396 Not tainted 4.16.0-rc6+ #364
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0xd3/0x150 lib/list_debug.c:45
RSP: 0018:ffff8801d3ff71b8 EFLAGS: 00010086
RAX: 000000000000004e RBX: dead000000000200 RCX: 0000000000000000
RDX: 000000000000004e RSI: 1ffff1003a7fedec RDI: ffffed003a7fee2b
RBP: ffff8801d3ff71d0 R08: ffff8801db227fc0 R09: 1ffff1003a7fed93
R10: ffff8801d3ff7090 R11: 0000000000000002 R12: dead000000000100
R13: ffff8801b6a2d458 R14: ffff8801b6a2d460 R15: ffff8801d27d1780
FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002001d000 CR3: 0000000006e22002 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_del_entry include/linux/list.h:117 [inline]
list_del include/linux/list.h:125 [inline]
__remove_wait_queue include/linux/wait.h:184 [inline]
remove_wait_queue+0x90/0x350 kernel/sched/wait.c:51
vhost_poll_stop+0x46/0x90 drivers/vhost/vhost.c:229
vhost_net_disable_vq drivers/vhost/net.c:405 [inline]
vhost_net_stop_vq+0x90/0x120 drivers/vhost/net.c:973
vhost_net_stop drivers/vhost/net.c:984 [inline]
vhost_net_release+0x49/0x190 drivers/vhost/net.c:1017
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
get_signal+0x73a/0x16d0 kernel/signal.c:2469
do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x44a8e9
RSP: 002b:00007f7ec8480da8 EFLAGS: 00000293 ORIG_RAX: 0000000000000010
RAX: 0000000000000000 RBX: 00000000006e29e4 RCX: 000000000044a8e9
RDX: 0000000020000340 RSI: 00000000400454ca RDI: 0000000000000005
RBP: 00000000006e29e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 6f68762f7665642f
R13: 6475612f7665642f R14: 74656e2f7665642f R15: 0000000000000001
Code: 8f 00 00 00 49 8b 54 24 08 48 39 f2 75 3b 48 83 c4 08 b8 01 00 00 00
5b 41 5c 5d c3 4c 89 e2 48 c7 c7 00 80 40 86 e8 85 df fb fe <0f> 0b 48 c7
c7 60 80 40 86 e8 77 df fb fe 0f 0b 48 c7 c7 c0 80
RIP: __list_del_entry_valid+0xd3/0x150 lib/list_debug.c:45 RSP:
ffff8801d3ff71b8
---[ end trace bdcbea47fcda73ff ]---

raw.log.txt
repro.syz.txt
repro.c.txt
config.txt

Jason Wang

unread,
Mar 26, 2018, 11:36:35 PM3/26/18
to syzbot, k...@vger.kernel.org, linux-...@vger.kernel.org, m...@redhat.com, net...@vger.kernel.org, syzkall...@googlegroups.com, virtual...@lists.linux-foundation.org
This is because we do not clear poll->wqh when poll fails, then a double
free may be triggered. Will post a patch. And I suspect we need hold vq
mutex in vhost_dev_stop().

Thanks
Reply all
Reply to author
Forward
0 new messages