syzbot has found a reproducer for the following crash on:
HEAD commit: e109a984 Linux 4.19.48
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1198f751a00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=2d14dd88554f26bc
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=1036afbaa00000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=1243d81ea00000
IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_0: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
INFO: task syz-executor093:7840 blocked for more than 140 seconds.
Not tainted 4.19.48 #20
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor093 D23552 7840 7839 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x80d/0x1c70 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
rwsem_down_read_failed+0x21b/0x3c0 kernel/locking/rwsem-xadd.c:309
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:512 [inline]
do_exit+0x45b/0x2fa0 kernel/exit.c:863
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4461a8
Code: 20 73 70 61 63 65 20 69 6e 20 46 75 6e 63 44 42 20 66 6f 72 20 6d 75
74 65 78 20 69 6e 66 6f 20 28 6d 61 78 20 25 64 20 65 6e <74> 72 69 65 73
29 20 2d 20 69 67 6e 6f 72 69 6e 67 0a 00 00 00 00
RSP: 002b:00007ffef6927668 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00000000004461a8
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00000000004ce510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00007ffef69276d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006e27a0 R14: 000000000000002d R15: 0000000000000007
INFO: task syz-executor093:7848 blocked for more than 140 seconds.
Not tainted 4.19.48 #20
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor093 D28800 7848 7839 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x80d/0x1c70 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
rwsem_down_read_failed+0x21b/0x3c0 kernel/locking/rwsem-xadd.c:309
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:512 [inline]
do_exit+0x45b/0x2fa0 kernel/exit.c:863
do_group_exit+0x135/0x370 kernel/exit.c:979
get_signal+0x399/0x1d50 kernel/signal.c:2572
do_signal+0x95/0x1960 arch/x86/kernel/signal.c:821
exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x53d/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447659
Code: 64 20 62 79 74 65 73 0a 00 66 69 6c 65 20 25 64 20 45 4f 46 0a 00 00
00 00 73 74 72 65 61 6d 20 77 61 73 20 72 65 71 75 65 73 <74> 65 64 20 77
69 74 68 20 7a 69 70 20 6d 6f 64 65 2c 20 62 75 74
RSP: 002b:00007ff8a1127db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00000000006ddc58 RCX: 0000000000447659
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006ddc58
RBP: 00000000006ddc50 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc5c
R13: 00007ffef692762f R14: 00007ff8a11289c0 R15: 0000000000000005
Showing all locks held in the system:
1 lock held by khungtaskd/1032:
#0: 00000000ead221b0 (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4435
3 locks held by rs:main Q:Reg/7688:
#0: 0000000036f5ae72 (&rq->lock){-.-.}, at: rq_lock
kernel/sched/sched.h:1821 [inline]
#0: 0000000036f5ae72 (&rq->lock){-.-.}, at: __schedule+0x1f8/0x1c70
kernel/sched/core.c:3412
#1: 00000000ead221b0 (rcu_read_lock){....}, at: file_start_write
include/linux/fs.h:2773 [inline]
#1: 00000000ead221b0 (rcu_read_lock){....}, at: vfs_write+0x429/0x560
fs/read_write.c:548
#2: 00000000ead221b0 (rcu_read_lock){....}, at: fast_dput fs/dcache.c:714
[inline]
#2: 00000000ead221b0 (rcu_read_lock){....}, at: dput+0x38/0x690
fs/dcache.c:833
1 lock held by rsyslogd/7690:
#0: 00000000c94eb15a (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110
fs/file.c:767
2 locks held by getty/7812:
#0: 00000000beae4f46 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000005d3353ea (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7813:
#0: 0000000074914d06 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000a1012dad (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7814:
#0: 00000000cf9545b9 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000007cac3042 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7815:
#0: 000000001c53d4a6 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000054c12f8d (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7816:
#0: 00000000fb716cc5 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000021227abc (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7817:
#0: 00000000149bdeec (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000a43ee8a4 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7818:
#0: 00000000a1747150 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000a6160e7b (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
1 lock held by syz-executor093/7840:
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: exit_mm kernel/exit.c:512
[inline]
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: do_exit+0x45b/0x2fa0
kernel/exit.c:863
2 locks held by syz-executor093/7847:
1 lock held by syz-executor093/7848:
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: exit_mm kernel/exit.c:512
[inline]
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: do_exit+0x45b/0x2fa0
kernel/exit.c:863
=============================================
NMI backtrace for cpu 0
CPU: 0 PID: 1032 Comm: khungtaskd Not tainted 4.19.48 #20
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
CPU: 1 PID: 7847 Comm: syz-executor093 Not tainted 4.19.48 #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:kasan_mem_to_shadow include/linux/kasan.h:28 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/kasan.c:211 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/kasan.c:241 [inline]
RIP: 0010:check_memory_region_inline mm/kasan/kasan.c:257 [inline]
RIP: 0010:check_memory_region+0x3a/0x190 mm/kasan/kasan.c:267
Code: 7f ff ff 55 0f b6 d2 48 39 c7 48 89 e5 41 55 41 54 53 0f 86 f6 00 00
00 4c 8d 5c 37 ff 49 89 f8 48 b8 00 00 00 00 00 fc ff df <4d> 89 da 49 c1
e8 03 4d 8d 24 00 49 c1 ea 03 49 01 c2 4c 89 e0 49
RSP: 0018:ffff88807dbf7678 EFLAGS: 00000016
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8151ff0b
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffffff89ef11a8
RBP: ffff88807dbf7690 R08: ffffffff89ef11a8 R09: 0000000000000000
R10: 0000000000000001 R11: ffffffff89ef11ab R12: 0000000000000000
R13: 0000000000000000 R14: ffff88808f582580 R15: ffff88808f00b9d0
FS: 00007ff8a1149700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8a1127e78 CR3: 00000000885ae000 CR4: 00000000001406e0
Call Trace:
kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline]
__lock_acquire+0x23b/0x48f0 kernel/locking/lockdep.c:3303
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900
__mutex_lock_common kernel/locking/mutex.c:925 [inline]
__mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
perf_mmap+0x735/0x1730 kernel/events/core.c:5655
call_mmap include/linux/fs.h:1825 [inline]
mmap_region+0xc2f/0x1760 mm/mmap.c:1763
do_mmap+0x8e2/0x1080 mm/mmap.c:1536
do_mmap_pgoff include/linux/mm.h:2319 [inline]
vm_mmap_pgoff+0x1c5/0x230 mm/util.c:357
ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1586
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline]
__x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447659
Code: e8 5c 14 03 00 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 db 0c fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ff8a1148da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00000000006ddc48 RCX: 0000000000447659
RDX: 0000000000000000 RSI: 0000000000001000 RDI: 0000000020fff000
RBP: 00000000006ddc40 R08: 0000000000000003 R09: 0000000000000000
R10: 0002000000001011 R11: 0000000000000246 R12: 00000000006ddc4c
R13: 00007ffef692762f R14: 00007ff8a11499c0 R15: 0000000000000000