INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-mmots-kasan-gce-4,10.128.0.62' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 44.442096] dev_remove_pack: ffff8801c946dc00 not found [ 44.477264] ================================================================== [ 44.484660] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 44.491391] Read of size 8 at addr ffff8801c820f6a8 by task syzkaller785033/5865 [ 44.498895] [ 44.500502] CPU: 1 PID: 5865 Comm: syzkaller785033 Not tainted 4.13.0-mm1+ #7 [ 44.507748] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.517074] Call Trace: [ 44.519641] dump_stack+0x194/0x257 [ 44.523247] ? arch_local_irq_restore+0x53/0x53 [ 44.527889] ? show_regs_print_info+0x65/0x65 [ 44.532370] ? __dev_remove_pack+0x305/0x3b0 [ 44.536755] print_address_description+0x73/0x250 [ 44.541574] ? __dev_remove_pack+0x305/0x3b0 [ 44.545955] kasan_report+0x24e/0x340 [ 44.549741] __asan_report_load8_noabort+0x14/0x20 [ 44.554645] __dev_remove_pack+0x305/0x3b0 [ 44.558852] ? dev_get_by_name_rcu+0x270/0x270 [ 44.563415] ? refcount_sub_and_test+0x115/0x1b0 [ 44.568247] __unregister_prot_hook+0x211/0x280 [ 44.572898] packet_release+0x8bb/0xd70 [ 44.576858] ? packet_set_ring+0x1b70/0x1b70 [ 44.581241] ? dentry_free+0xcd/0x130 [ 44.585020] ? rcu_read_lock_sched_held+0x108/0x120 [ 44.590016] ? kmem_cache_free+0x249/0x280 [ 44.594227] ? dentry_free+0xd2/0x130 [ 44.598011] ? locks_remove_file+0x3fa/0x5a0 [ 44.602399] ? fcntl_setlk+0x10d0/0x10d0 [ 44.606438] ? __fsnotify_parent+0xb4/0x3a0 [ 44.610734] ? fsnotify+0x1af0/0x1af0 [ 44.614519] sock_release+0x8d/0x1e0 [ 44.618207] ? sock_release+0x8d/0x1e0 [ 44.622068] ? sock_release+0x1e0/0x1e0 [ 44.626020] sock_close+0x16/0x20 [ 44.629446] __fput+0x333/0x7f0 [ 44.632705] ? fput+0x140/0x140 [ 44.635958] ? check_same_owner+0x320/0x320 [ 44.640252] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.644727] ____fput+0x15/0x20 [ 44.647981] task_work_run+0x199/0x270 [ 44.651849] ? task_work_cancel+0x210/0x210 [ 44.656144] ? _raw_spin_unlock+0x22/0x30 [ 44.660265] ? switch_task_namespaces+0x87/0xc0 [ 44.664914] do_exit+0xa52/0x1b40 [ 44.668343] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.673332] ? trace_hardirqs_on+0xd/0x10 [ 44.677464] ? hrtimer_try_to_cancel+0x31/0x5c0 [ 44.682107] ? mm_update_next_owner+0x930/0x930 [ 44.686749] ? __hrtimer_get_remaining+0x1c0/0x1c0 [ 44.691656] ? check_same_owner+0x320/0x320 [ 44.695948] ? _do_fork+0x2f5/0xfe0 [ 44.699560] ? __might_sleep+0x95/0x190 [ 44.703512] ? do_nanosleep+0x508/0x6f0 [ 44.707467] ? schedule_timeout_idle+0x90/0x90 [ 44.712046] ? memset+0x31/0x40 [ 44.715307] ? hrtimer_nanosleep+0x2cc/0x860 [ 44.719692] ? nanosleep_copyout+0x100/0x100 [ 44.724071] ? __might_sleep+0x95/0x190 [ 44.728032] ? kasan_check_write+0x14/0x20 [ 44.732239] ? _copy_from_user+0x99/0x110 [ 44.736366] ? __hrtimer_init+0x140/0x140 [ 44.740491] ? syscall_return_slowpath+0x500/0x500 [ 44.745396] do_group_exit+0x149/0x400 [ 44.749260] ? SyS_exit+0x30/0x30 [ 44.752688] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.757681] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 44.762413] SyS_exit_group+0x1d/0x20 [ 44.766189] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.770916] RIP: 0033:0x446309 [ 44.774079] RSP: 002b:00007ffeea0e2258 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 44.781765] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 0000000000446309 [ 44.789010] RDX: 0000000000444a61 RSI: 0000000000000000 RDI: 0000000000000000 [ 44.796257] RBP: 0000000000000082 R08: 00000000006da1c0 R09: 0000000000000000 [ 44.803500] R10: 00000000006da144 R11: 0000000000000206 R12: 0000000000000000 [ 44.810749] R13: 00007ffeea0e21ff R14: 00007f0edaf769c0 R15: 0000000000000000 [ 44.818019] [ 44.819620] Allocated by task 5914: [ 44.823227] save_stack_trace+0x16/0x20 [ 44.827173] save_stack+0x43/0xd0 [ 44.830597] kasan_kmalloc+0xad/0xe0 [ 44.834283] kmem_cache_alloc_trace+0x136/0x750 [ 44.838925] fanout_add+0xa50/0x1190 [ 44.842608] packet_setsockopt+0xfdc/0x1e80 [ 44.846900] SyS_setsockopt+0x189/0x360 [ 44.850849] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.855574] [ 44.857174] Freed by task 5865: [ 44.860424] save_stack_trace+0x16/0x20 [ 44.864371] save_stack+0x43/0xd0 [ 44.867796] kasan_slab_free+0x71/0xc0 [ 44.871653] kfree+0xca/0x250 [ 44.874729] packet_release+0xa8f/0xd70 [ 44.878673] sock_release+0x8d/0x1e0 [ 44.882357] sock_close+0x16/0x20 [ 44.885781] __fput+0x333/0x7f0 [ 44.889032] ____fput+0x15/0x20 [ 44.892282] task_work_run+0x199/0x270 [ 44.896147] do_exit+0xa52/0x1b40 [ 44.899572] do_group_exit+0x149/0x400 [ 44.903431] SyS_exit_group+0x1d/0x20 [ 44.907205] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.911928] [ 44.913528] The buggy address belongs to the object at ffff8801c820ee00 [ 44.913528] which belongs to the cache kmalloc-4096 of size 4096 [ 44.926328] The buggy address is located 2216 bytes inside of [ 44.926328] 4096-byte region [ffff8801c820ee00, ffff8801c820fe00) [ 44.938345] The buggy address belongs to the page: [ 44.943247] page:ffffea0007208380 count:1 mapcount:0 mapping:ffff8801c820ee00 index:0x0 compound_mapcount: 0 [ 44.953192] flags: 0x200000000008100(slab|head) [ 44.957834] raw: 0200000000008100 ffff8801c820ee00 0000000000000000 0000000100000001 [ 44.965685] raw: ffffea0007270120 ffffea0007234720 ffff8801dac00dc0 0000000000000000 [ 44.973539] page dumped because: kasan: bad access detected [ 44.979216] [ 44.980815] Memory state around the buggy address: [ 44.985722] ffff8801c820f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.993058] ffff8801c820f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.000387] >ffff8801c820f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.007717] ^ [ 45.012354] ffff8801c820f700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.019692] ffff8801c820f780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.027023] ================================================================== [ 45.034351] Disabling lock debugging due to kernel taint [ 45.039870] Kernel panic - not syncing: panic_on_warn set ... [ 45.039870] [ 45.047200] CPU: 1 PID: 5865 Comm: syzkaller785033 Tainted: G B 4.13.0-mm1+ #7 [ 45.055651] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.064968] Call Trace: [ 45.067528] dump_stack+0x194/0x257 [ 45.071126] ? arch_local_irq_restore+0x53/0x53 [ 45.075764] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.080491] ? __dev_remove_pack+0x2f0/0x3b0 [ 45.084865] panic+0x1e4/0x417 [ 45.088023] ? __warn+0x1d9/0x1d9 [ 45.091453] ? __dev_remove_pack+0x305/0x3b0 [ 45.095826] kasan_end_report+0x50/0x50 [ 45.099765] kasan_report+0x137/0x340 [ 45.103534] __asan_report_load8_noabort+0x14/0x20 [ 45.108428] __dev_remove_pack+0x305/0x3b0 [ 45.112628] ? dev_get_by_name_rcu+0x270/0x270 [ 45.117178] ? refcount_sub_and_test+0x115/0x1b0 [ 45.121906] __unregister_prot_hook+0x211/0x280 [ 45.126546] packet_release+0x8bb/0xd70 [ 45.130489] ? packet_set_ring+0x1b70/0x1b70 [ 45.134865] ? dentry_free+0xcd/0x130 [ 45.138631] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.143712] ? kmem_cache_free+0x249/0x280 [ 45.147922] ? dentry_free+0xd2/0x130 [ 45.151694] ? locks_remove_file+0x3fa/0x5a0 [ 45.156072] ? fcntl_setlk+0x10d0/0x10d0 [ 45.160100] ? __fsnotify_parent+0xb4/0x3a0 [ 45.164387] ? fsnotify+0x1af0/0x1af0 [ 45.168158] sock_release+0x8d/0x1e0 [ 45.171837] ? sock_release+0x8d/0x1e0 [ 45.175693] ? sock_release+0x1e0/0x1e0 [ 45.179631] sock_close+0x16/0x20 [ 45.183049] __fput+0x333/0x7f0 [ 45.186298] ? fput+0x140/0x140 [ 45.189545] ? check_same_owner+0x320/0x320 [ 45.193832] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.198296] ____fput+0x15/0x20 [ 45.201540] task_work_run+0x199/0x270 [ 45.205394] ? task_work_cancel+0x210/0x210 [ 45.209683] ? _raw_spin_unlock+0x22/0x30 [ 45.213797] ? switch_task_namespaces+0x87/0xc0 [ 45.218435] do_exit+0xa52/0x1b40 [ 45.221860] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.226842] ? trace_hardirqs_on+0xd/0x10 [ 45.230960] ? hrtimer_try_to_cancel+0x31/0x5c0 [ 45.235594] ? mm_update_next_owner+0x930/0x930 [ 45.240227] ? __hrtimer_get_remaining+0x1c0/0x1c0 [ 45.245125] ? check_same_owner+0x320/0x320 [ 45.249410] ? _do_fork+0x2f5/0xfe0 [ 45.253012] ? __might_sleep+0x95/0x190 [ 45.256957] ? do_nanosleep+0x508/0x6f0 [ 45.260900] ? schedule_timeout_idle+0x90/0x90 [ 45.265459] ? memset+0x31/0x40 [ 45.268717] ? hrtimer_nanosleep+0x2cc/0x860 [ 45.273093] ? nanosleep_copyout+0x100/0x100 [ 45.277468] ? __might_sleep+0x95/0x190 [ 45.281412] ? kasan_check_write+0x14/0x20 [ 45.285611] ? _copy_from_user+0x99/0x110 [ 45.289727] ? __hrtimer_init+0x140/0x140 [ 45.293842] ? syscall_return_slowpath+0x500/0x500 [ 45.298738] do_group_exit+0x149/0x400 [ 45.302595] ? SyS_exit+0x30/0x30 [ 45.306017] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.310999] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.315725] SyS_exit_group+0x1d/0x20 [ 45.319492] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 45.324211] RIP: 0033:0x446309 [ 45.327365] RSP: 002b:00007ffeea0e2258 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 45.335039] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 0000000000446309 [ 45.342275] RDX: 0000000000444a61 RSI: 0000000000000000 RDI: 0000000000000000 [ 45.349512] RBP: 0000000000000082 R08: 00000000006da1c0 R09: 0000000000000000 [ 45.356748] R10: 00000000006da144 R11: 0000000000000206 R12: 0000000000000000 [ 45.363985] R13: 00007ffeea0e21ff R14: 00007f0edaf769c0 R15: 0000000000000000 [ 45.371647] Dumping ftrace buffer: [ 45.375154] (ftrace buffer empty) [ 45.378828] Kernel Offset: disabled [ 45.382422] Rebooting in 86400 seconds..