INFO: task hung in nbd_ioctl

22 views
Skip to first unread message

syzbot

unread,
Oct 12, 2019, 9:11:08 AM10/12/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: dafd6344 Linux 4.19.79
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=162e6f2b600000
kernel config: https://syzkaller.appspot.com/x/.config?x=f825f73d8fea6b52
dashboard link: https://syzkaller.appspot.com/bug?extid=15643e4cfffac60a87ed
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

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

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

protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
INFO: task syz-executor.4:9959 blocked for more than 140 seconds.
Not tainted 4.19.79 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.4 D27824 9959 7606 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3515
schedule+0x92/0x1c0 kernel/sched/core.c:3559
schedule_timeout+0x8c8/0xfc0 kernel/time/timer.c:1782
do_wait_for_common kernel/sched/completion.c:83 [inline]
__wait_for_common kernel/sched/completion.c:104 [inline]
wait_for_common kernel/sched/completion.c:115 [inline]
wait_for_completion+0x29c/0x440 kernel/sched/completion.c:136
flush_workqueue+0x40f/0x14b0 kernel/workqueue.c:2707
nbd_start_device_ioctl drivers/block/nbd.c:1223 [inline]
__nbd_ioctl drivers/block/nbd.c:1294 [inline]
nbd_ioctl+0xb52/0xcb0 drivers/block/nbd.c:1334
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc38/0x1ab6 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1891
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459a59
Code: 70 c0 00 48 83 fb 10 7c 6e 49 c7 c4 00 00 00 00 48 89 f7 48 83 fb 20
0f 87 c8 00 00 00 48 8d 44 1e f0 eb 17 f3 0f 6f 0f 66 0f <74> c8 66 0f d7
d1 f3 0f b8 d2 49 01 d4 48 83 c7 10 48 39 c7 76 e4
RSP: 002b:00007f9df8ae4c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000459a59
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000005
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9df8ae56d4
R13: 00000000004c3381 R14: 00000000004d6f90 R15: 00000000ffffffff

Showing all locks held in the system:
2 locks held by kworker/u4:2/35:
#0: 00000000e72fe5e9 (&rq->lock){-.-.}, at: idle_balance
kernel/sched/fair.c:9656 [inline]
#0: 00000000e72fe5e9 (&rq->lock){-.-.}, at:
pick_next_task_fair+0xfae/0x1580 kernel/sched/fair.c:6837
#1: 00000000becb639f (rcu_read_lock){....}, at:
__update_idle_core+0x45/0x3f0 kernel/sched/fair.c:6054
1 lock held by khungtaskd/1042:
#0: 00000000becb639f (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4438
2 locks held by rsyslogd/7426:
#0: 000000007601d63f (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110
fs/file.c:767
#1: 00000000e72fe5e9 (&rq->lock){-.-.}, at: rq_lock
kernel/sched/sched.h:1821 [inline]
#1: 00000000e72fe5e9 (&rq->lock){-.-.}, at: __schedule+0x1f8/0x1dc0
kernel/sched/core.c:3453
2 locks held by getty/7549:
#0: 0000000008f52b2d (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000299cb56e (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7550:
#0: 00000000221a696b (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 000000007617c561 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7551:
#0: 00000000b16830de (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000318334b7 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7552:
#0: 000000005de1914c (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 000000006aa81925 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7553:
#0: 00000000e0ab71b3 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000acab5e8d (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7554:
#0: 00000000ffd67e62 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000b66678b0 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7555:
#0: 0000000026fb9014 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000893b4e6e (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by kworker/u5:1/8620:
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
__write_once_size include/linux/compiler.h:220 [inline]
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
atomic64_set include/asm-generic/atomic-instrumented.h:40 [inline]
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
atomic_long_set include/asm-generic/atomic-long.h:59 [inline]
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
set_work_data kernel/workqueue.c:617 [inline]
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline]
#0: 000000007e36a9c9 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at:
process_one_work+0x87e/0x1750 kernel/workqueue.c:2124
#1: 000000002b1fb0d8 ((work_completion)(&args->work)){+.+.}, at:
process_one_work+0x8b4/0x1750 kernel/workqueue.c:2128

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1042 Comm: khungtaskd Not tainted 4.19.79 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x9df/0xee0 kernel/hung_task.c:287
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt+0xe/0x10
arch/x86/include/asm/irqflags.h:60


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Oct 13, 2019, 7:28:08 PM10/13/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: e132c8d7 Linux 4.14.149
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17fcced7600000
kernel config: https://syzkaller.appspot.com/x/.config?x=65c18705ca007f2
dashboard link: https://syzkaller.appspot.com/bug?extid=51611e87a7e4efdbbee2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

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

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

ldm_validate_partition_table(): Disk read failed.
Dev nbd3: unable to read RDB block 0
nbd3: unable to read partition table
nbd3: partition table beyond EOD, truncated
input: syz1 as /devices/virtual/input/input272
INFO: task syz-executor.2:16411 blocked for more than 140 seconds.
Not tainted 4.14.149 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2 D27552 16411 6978 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2807 [inline]
__schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
schedule+0x92/0x1c0 kernel/sched/core.c:3427
schedule_timeout+0x93b/0xe10 kernel/time/timer.c:1723
do_wait_for_common kernel/sched/completion.c:91 [inline]
__wait_for_common kernel/sched/completion.c:112 [inline]
wait_for_common kernel/sched/completion.c:123 [inline]
wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
flush_workqueue+0x3d1/0x1400 kernel/workqueue.c:2668
nbd_start_device_ioctl drivers/block/nbd.c:1212 [inline]
__nbd_ioctl drivers/block/nbd.c:1283 [inline]
nbd_ioctl+0x9c4/0xb30 drivers/block/nbd.c:1323
__blkdev_driver_ioctl block/ioctl.c:297 [inline]
blkdev_ioctl+0x96b/0x1860 block/ioctl.c:594
block_ioctl+0xde/0x120 fs/block_dev.c:1881
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x459a59
RSP: 002b:00007f7be1f31c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000459a59
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000006
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7be1f326d4
R13: 00000000004c3381 R14: 00000000004d6f90 R15: 00000000ffffffff

Showing all locks held in the system:
1 lock held by khungtaskd/1015:
#0: (tasklist_lock){.+.+}, at: [<ffffffff814875e8>]
debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
2 locks held by kworker/u5:0/1143:
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf92e>] work_static
include/linux/workqueue.h:199 [inline]
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf92e>]
set_work_data kernel/workqueue.c:619 [inline]
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf92e>]
set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf92e>]
process_one_work+0x76e/0x1600 kernel/workqueue.c:2085
#1: ((&args->work)){+.+.}, at: [<ffffffff813cf96b>]
process_one_work+0x7ab/0x1600 kernel/workqueue.c:2089
2 locks held by getty/6928:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6929:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6930:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6931:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6932:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6933:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6934:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c4fb3>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff83111916>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1015 Comm: khungtaskd Not tainted 4.14.149 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x197 lib/dump_stack.c:53
nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
watchdog+0x5e7/0xb90 kernel/hung_task.c:274
kthread+0x319/0x430 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at pc 0xffffffff861c5a9e

syzbot

unread,
Oct 29, 2019, 8:57:07 AM10/29/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: ddef1e8e Linux 4.14.151
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12b4083f600000
kernel config: https://syzkaller.appspot.com/x/.config?x=a2b317f0c5f02ed3
dashboard link: https://syzkaller.appspot.com/bug?extid=51611e87a7e4efdbbee2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1776530f600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=150d4d70e00000

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

audit: type=1400 audit(1572353335.578:36): avc: denied { map } for
pid=6945 comm="syz-executor225" path="/root/syz-executor225508502"
dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
block nbd0: Device being setup by another task
block nbd0: shutting down sockets
INFO: task syz-executor225:6946 blocked for more than 140 seconds.
Not tainted 4.14.151 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor225 D28048 6946 6943 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2807 [inline]
__schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
schedule+0x92/0x1c0 kernel/sched/core.c:3427
schedule_timeout+0x93b/0xe10 kernel/time/timer.c:1723
do_wait_for_common kernel/sched/completion.c:91 [inline]
__wait_for_common kernel/sched/completion.c:112 [inline]
wait_for_common kernel/sched/completion.c:123 [inline]
wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
flush_workqueue+0x3d1/0x1400 kernel/workqueue.c:2668
nbd_start_device_ioctl drivers/block/nbd.c:1212 [inline]
__nbd_ioctl drivers/block/nbd.c:1283 [inline]
nbd_ioctl+0x9c4/0xb30 drivers/block/nbd.c:1323
__blkdev_driver_ioctl block/ioctl.c:297 [inline]
blkdev_ioctl+0x96b/0x1860 block/ioctl.c:594
block_ioctl+0xde/0x120 fs/block_dev.c:1881
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4496c9
RSP: 002b:00007f7d0091ece8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dac48 RCX: 00000000004496c9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000005
RBP: 00000000006dac40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac4c
R13: 00007ffc7862b8bf R14: 00007f7d0091f9c0 R15: 20c49ba5e353f7cf

Showing all locks held in the system:
1 lock held by khungtaskd/1016:
#0: (tasklist_lock){.+.+}, at: [<ffffffff814875a8>]
debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
2 locks held by kworker/u5:0/1144:
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>] work_static
include/linux/workqueue.h:199 [inline]
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>]
set_work_data kernel/workqueue.c:619 [inline]
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>]
set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
#0: ("knbd%d-recv"nbd->index){+.+.}, at: [<ffffffff813cf8ee>]
process_one_work+0x76e/0x1600 kernel/workqueue.c:2085
#1: ((&args->work)){+.+.}, at: [<ffffffff813cf92b>]
process_one_work+0x7ab/0x1600 kernel/workqueue.c:2089
1 lock held by rsyslogd/6798:
#0: (&f->f_pos_lock){+.+.}, at: [<ffffffff8194517b>]
__fdget_pos+0xab/0xd0 fs/file.c:769
2 locks held by getty/6920:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6921:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6922:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6923:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6924:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6925:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6926:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861c3073>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f286>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1016 Comm: khungtaskd Not tainted 4.14.151 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x197 lib/dump_stack.c:53
nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
watchdog+0x5e7/0xb90 kernel/hung_task.c:274
kthread+0x319/0x430 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at pc 0xffffffff861c3b5e

syzbot

unread,
Dec 25, 2019, 2:03:03 PM12/25/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 4df728651b8a99693c69962d8e5a5b9e5a3bbcc7
Author: Mike Christie <mchr...@redhat.com>
Date: Thu Oct 17 21:27:34 2019 +0000

nbd: verify socket is supported during setup

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1647918ee00000
start commit: ddef1e8e Linux 4.14.151
git tree: linux-4.14.y
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12bb4f5ce00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10e7c6c8e00000

If the result looks correct, please mark the bug fixed by replying with:

#syz fix: nbd: verify socket is supported during setup

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

syzbot

unread,
Feb 15, 2020, 3:44:13 PM2/15/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 9b15f7fa Linux 4.19.104
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14bdfa31e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a97eb020c5d0af85
dashboard link: https://syzkaller.appspot.com/bug?extid=15643e4cfffac60a87ed
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1382856ee00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=166f31e9e00000

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

audit: type=1400 audit(1581798586.477:36): avc: denied { map } for pid=7940 comm="syz-executor800" path="/root/syz-executor800336106" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
IPVS: ftp: loaded support on port[0] = 21
block nbd0: shutting down sockets
INFO: task syz-executor800:7942 blocked for more than 140 seconds.
Not tainted 4.19.104-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor800 D27936 7942 7941 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x866/0x1dc0 kernel/sched/core.c:3515
schedule+0x92/0x1c0 kernel/sched/core.c:3559
schedule_timeout+0x8c8/0xfc0 kernel/time/timer.c:1782
do_wait_for_common kernel/sched/completion.c:83 [inline]
__wait_for_common kernel/sched/completion.c:104 [inline]
wait_for_common kernel/sched/completion.c:115 [inline]
wait_for_completion+0x29c/0x440 kernel/sched/completion.c:136
flush_workqueue+0x40f/0x14b0 kernel/workqueue.c:2713
nbd_start_device_ioctl drivers/block/nbd.c:1252 [inline]
__nbd_ioctl drivers/block/nbd.c:1323 [inline]
nbd_ioctl+0x546/0xcc0 drivers/block/nbd.c:1363
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc2c/0x1ab3 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1894
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4454a9
Code: Bad RIP value.
RSP: 002b:00007fff8c5db528 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00000000004454a9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000006
RBP: 0000000000000004 R08: 0000000000000004 R09: 0000000000000000
R10: 00007fff8c5db080 R11: 0000000000000246 R12: 00000000011bc914
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1081:
#0: 00000000c63fdad1 (rcu_read_lock){....}, at: debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4438
2 locks held by kworker/u5:0/1217:
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: __write_once_size include/linux/compiler.h:220 [inline]
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:40 [inline]
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:59 [inline]
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: set_work_data kernel/workqueue.c:617 [inline]
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline]
#0: 000000003a8b1387 ((wq_completion)"knbd%d-recv"nbd->index){+.+.}, at: process_one_work+0x87e/0x1750 kernel/workqueue.c:2124
#1: 0000000032fea809 ((work_completion)(&args->work)){+.+.}, at: process_one_work+0x8b4/0x1750 kernel/workqueue.c:2128
1 lock held by rsyslogd/7791:
2 locks held by getty/7913:
#0: 000000005274481b (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 000000002f7f9ffb (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154
2 locks held by getty/7914:
#0: 000000002ce50d72 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 0000000092af2ede (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154
2 locks held by getty/7915:
#0: 0000000055bd61bc (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000a373e729 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154
2 locks held by getty/7916:
#0: 00000000cc6be82e (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 000000007c6abcb3 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154
2 locks held by getty/7917:
#0: 00000000b1af6aef (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 00000000e681d9f9 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154
2 locks held by getty/7918:
#0: 00000000fe3aed4b (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 000000003fcd29a8 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154
2 locks held by getty/7919:
#0: 000000008ef0a1f4 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:362
#1: 0000000030beef78 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2154

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1081 Comm: khungtaskd Not tainted 4.19.104-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x197/0x210 lib/dump_stack.c:118
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x9df/0xee0 kernel/hung_task.c:287
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60

Reply all
Reply to author
Forward
0 new messages