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-next-kasan-gce-3,10.128.0.3' (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 syzkaller login: [ 53.101855] dev_remove_pack: ffff8801cc437580 not found [ 53.114247] ================================================================== [ 53.121668] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 53.128403] Read of size 8 at addr ffff8801cc9b9268 by task syzkaller267581/3521 [ 53.135921] [ 53.137526] CPU: 0 PID: 3521 Comm: syzkaller267581 Not tainted 4.13.0-rc7-next-20170901+ #13 [ 53.146071] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 53.155401] Call Trace: [ 53.157971] dump_stack+0x194/0x257 [ 53.161580] ? arch_local_irq_restore+0x53/0x53 [ 53.166229] ? show_regs_print_info+0x65/0x65 [ 53.170707] ? __dev_remove_pack+0x305/0x3b0 [ 53.175091] print_address_description+0x73/0x250 [ 53.179911] ? __dev_remove_pack+0x305/0x3b0 [ 53.184301] kasan_report+0x24e/0x340 [ 53.188087] __asan_report_load8_noabort+0x14/0x20 [ 53.192997] __dev_remove_pack+0x305/0x3b0 [ 53.197217] ? dev_get_by_name_rcu+0x270/0x270 [ 53.201773] ? refcount_sub_and_test+0x115/0x1b0 [ 53.206513] __unregister_prot_hook+0x211/0x280 [ 53.211159] packet_release+0x8bb/0xd70 [ 53.215113] ? packet_set_ring+0x1b70/0x1b70 [ 53.219495] ? dentry_free+0xcd/0x130 [ 53.223268] ? rcu_read_lock_sched_held+0x108/0x120 [ 53.228258] ? kmem_cache_free+0x249/0x280 [ 53.232468] ? dentry_free+0xd2/0x130 [ 53.236246] ? locks_remove_file+0x3fa/0x5a0 [ 53.240633] ? fcntl_setlk+0x10d0/0x10d0 [ 53.244681] ? __fsnotify_parent+0xb4/0x3a0 [ 53.248978] ? fsnotify+0x1af0/0x1af0 [ 53.252758] sock_release+0x8d/0x1e0 [ 53.256444] ? sock_release+0x8d/0x1e0 [ 53.260301] ? sock_release+0x1e0/0x1e0 [ 53.264247] sock_close+0x16/0x20 [ 53.267685] __fput+0x333/0x7f0 [ 53.270942] ? fput+0x140/0x140 [ 53.274196] ? check_same_owner+0x320/0x320 [ 53.278492] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.282965] ____fput+0x15/0x20 [ 53.286226] task_work_run+0x199/0x270 [ 53.290093] ? task_work_cancel+0x210/0x210 [ 53.294390] ? _raw_spin_unlock+0x22/0x30 [ 53.298513] ? switch_task_namespaces+0x87/0xc0 [ 53.303162] do_exit+0xa52/0x1b40 [ 53.306609] ? match_held_lock+0x981/0x9f0 [ 53.310819] ? mm_update_next_owner+0x930/0x930 [ 53.315470] ? lock_downgrade+0x990/0x990 [ 53.319602] ? lock_downgrade+0x990/0x990 [ 53.323729] ? release_sock+0x74/0x2a0 [ 53.327599] ? do_raw_spin_trylock+0x190/0x190 [ 53.332155] ? check_noncircular+0x20/0x20 [ 53.336374] ? __local_bh_enable_ip+0x9d/0x160 [ 53.340931] ? release_sock+0x1d4/0x2a0 [ 53.344878] ? trace_hardirqs_on+0xd/0x10 [ 53.348995] ? __local_bh_enable_ip+0x9d/0x160 [ 53.353551] ? _raw_spin_unlock_bh+0x30/0x40 [ 53.357930] ? release_sock+0x1d4/0x2a0 [ 53.361879] ? __release_sock+0x360/0x360 [ 53.366002] ? find_held_lock+0x39/0x1d0 [ 53.370048] ? lock_downgrade+0x990/0x990 [ 53.374178] ? recalc_sigpending_tsk+0x117/0x150 [ 53.378907] ? recalc_sigpending+0x103/0x160 [ 53.383297] ? recalc_sigpending_tsk+0x150/0x150 [ 53.388031] ? get_signal+0x397/0x17e0 [ 53.391902] do_group_exit+0x149/0x400 [ 53.395761] ? __lock_is_held+0xbc/0x140 [ 53.399796] ? SyS_exit+0x30/0x30 [ 53.403220] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.407690] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.412682] get_signal+0x7e8/0x17e0 [ 53.416397] ? ptrace_notify+0x130/0x130 [ 53.420436] ? __fget+0xbb/0x580 [ 53.423780] ? lock_release+0xd70/0xd70 [ 53.427731] ? __lock_is_held+0xbc/0x140 [ 53.431782] do_signal+0x94/0x1ee0 [ 53.435299] ? iterate_fd+0x3f0/0x3f0 [ 53.439077] ? setup_sigcontext+0x7d0/0x7d0 [ 53.443375] ? find_held_lock+0x39/0x1d0 [ 53.447423] ? __fget_light+0x29d/0x390 [ 53.451382] ? selinux_tun_dev_create+0xc0/0xc0 [ 53.456027] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 53.461709] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 53.466959] ? exit_to_usermode_loop+0x98/0x300 [ 53.471606] exit_to_usermode_loop+0x224/0x300 [ 53.476174] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 53.481696] syscall_return_slowpath+0x42f/0x500 [ 53.486429] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 53.491422] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 53.496325] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.501340] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 53.506077] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 53.510892] RIP: 0033:0x4462b9 [ 53.514054] RSP: 002b:00007f1232ca6dc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000036 [ 53.521741] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000004462b9 [ 53.528983] RDX: 0000000000000005 RSI: 0000000000000107 RDI: 0000000000000004 [ 53.536232] RBP: 0000000000000000 R08: 000000000000047e R09: 00007f1232ca7700 [ 53.543477] R10: 0000000020001000 R11: 0000000000000202 R12: 0000000000000000 [ 53.550719] R13: 00007ffe5079238f R14: 00007f1232ca79c0 R15: 0000000000000000 [ 53.557986] [ 53.559588] Allocated by task 3520: [ 53.563189] save_stack_trace+0x16/0x20 [ 53.567137] save_stack+0x43/0xd0 [ 53.570568] kasan_kmalloc+0xad/0xe0 [ 53.574255] kmem_cache_alloc_trace+0x136/0x750 [ 53.578899] fanout_add+0xa50/0x1190 [ 53.582586] packet_setsockopt+0xfdc/0x1e80 [ 53.586891] SyS_setsockopt+0x189/0x360 [ 53.590841] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 53.595573] [ 53.597173] Freed by task 3521: [ 53.600436] save_stack_trace+0x16/0x20 [ 53.604388] save_stack+0x43/0xd0 [ 53.607826] kasan_slab_free+0x71/0xc0 [ 53.611683] kfree+0xca/0x250 [ 53.614773] packet_release+0xa8f/0xd70 [ 53.618737] sock_release+0x8d/0x1e0 [ 53.622421] sock_close+0x16/0x20 [ 53.625848] __fput+0x333/0x7f0 [ 53.629096] ____fput+0x15/0x20 [ 53.632371] task_work_run+0x199/0x270 [ 53.636230] do_exit+0xa52/0x1b40 [ 53.639662] do_group_exit+0x149/0x400 [ 53.643519] get_signal+0x7e8/0x17e0 [ 53.647206] do_signal+0x94/0x1ee0 [ 53.650721] exit_to_usermode_loop+0x224/0x300 [ 53.655273] syscall_return_slowpath+0x42f/0x500 [ 53.659999] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 53.664734] [ 53.666335] The buggy address belongs to the object at ffff8801cc9b89c0 [ 53.666335] which belongs to the cache kmalloc-4096 of size 4096 [ 53.679135] The buggy address is located 2216 bytes inside of [ 53.679135] 4096-byte region [ffff8801cc9b89c0, ffff8801cc9b99c0) [ 53.691153] The buggy address belongs to the page: [ 53.696056] page:ffffea0007326e00 count:1 mapcount:0 mapping:ffff8801cc9b89c0 index:0x0 compound_mapcount: 0 [ 53.706004] flags: 0x200000000008100(slab|head) [ 53.710644] raw: 0200000000008100 ffff8801cc9b89c0 0000000000000000 0000000100000001 [ 53.718495] raw: ffffea0007326d20 ffffea0007326fa0 ffff8801dac00dc0 0000000000000000 [ 53.726342] page dumped because: kasan: bad access detected [ 53.732022] [ 53.733620] Memory state around the buggy address: [ 53.738518] ffff8801cc9b9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.745849] ffff8801cc9b9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.753178] >ffff8801cc9b9200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.760507] ^ [ 53.767227] ffff8801cc9b9280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.774646] ffff8801cc9b9300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.782060] ================================================================== [ 53.789393] Disabling lock debugging due to kernel taint [ 53.794935] Kernel panic - not syncing: panic_on_warn set ... [ 53.794935] [ 53.802270] CPU: 0 PID: 3521 Comm: syzkaller267581 Tainted: G B 4.13.0-rc7-next-20170901+ #13 [ 53.812025] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 53.821344] Call Trace: [ 53.823905] dump_stack+0x194/0x257 [ 53.827500] ? arch_local_irq_restore+0x53/0x53 [ 53.832137] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 53.836862] ? __dev_remove_pack+0x2a0/0x3b0 [ 53.841239] panic+0x1e4/0x417 [ 53.844400] ? __warn+0x1d9/0x1d9 [ 53.847828] ? __dev_remove_pack+0x305/0x3b0 [ 53.852203] kasan_end_report+0x50/0x50 [ 53.856141] kasan_report+0x137/0x340 [ 53.859908] __asan_report_load8_noabort+0x14/0x20 [ 53.864817] __dev_remove_pack+0x305/0x3b0 [ 53.869027] ? dev_get_by_name_rcu+0x270/0x270 [ 53.873580] ? refcount_sub_and_test+0x115/0x1b0 [ 53.878320] __unregister_prot_hook+0x211/0x280 [ 53.882968] packet_release+0x8bb/0xd70 [ 53.886912] ? packet_set_ring+0x1b70/0x1b70 [ 53.891288] ? dentry_free+0xcd/0x130 [ 53.895059] ? rcu_read_lock_sched_held+0x108/0x120 [ 53.900040] ? kmem_cache_free+0x249/0x280 [ 53.904242] ? dentry_free+0xd2/0x130 [ 53.908011] ? locks_remove_file+0x3fa/0x5a0 [ 53.912388] ? fcntl_setlk+0x10d0/0x10d0 [ 53.916419] ? __fsnotify_parent+0xb4/0x3a0 [ 53.920708] ? fsnotify+0x1af0/0x1af0 [ 53.924477] sock_release+0x8d/0x1e0 [ 53.928155] ? sock_release+0x8d/0x1e0 [ 53.932006] ? sock_release+0x1e0/0x1e0 [ 53.935953] sock_close+0x16/0x20 [ 53.939371] __fput+0x333/0x7f0 [ 53.942631] ? fput+0x140/0x140 [ 53.945881] ? check_same_owner+0x320/0x320 [ 53.950168] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.954640] ____fput+0x15/0x20 [ 53.957887] task_work_run+0x199/0x270 [ 53.961740] ? task_work_cancel+0x210/0x210 [ 53.966029] ? _raw_spin_unlock+0x22/0x30 [ 53.970145] ? switch_task_namespaces+0x87/0xc0 [ 53.974782] do_exit+0xa52/0x1b40 [ 53.978210] ? match_held_lock+0x981/0x9f0 [ 53.982411] ? mm_update_next_owner+0x930/0x930 [ 53.987049] ? lock_downgrade+0x990/0x990 [ 53.991161] ? lock_downgrade+0x990/0x990 [ 53.995287] ? release_sock+0x74/0x2a0 [ 53.999144] ? do_raw_spin_trylock+0x190/0x190 [ 54.003693] ? check_noncircular+0x20/0x20 [ 54.007890] ? __local_bh_enable_ip+0x9d/0x160 [ 54.012437] ? release_sock+0x1d4/0x2a0 [ 54.016381] ? trace_hardirqs_on+0xd/0x10 [ 54.020496] ? __local_bh_enable_ip+0x9d/0x160 [ 54.025042] ? _raw_spin_unlock_bh+0x30/0x40 [ 54.029415] ? release_sock+0x1d4/0x2a0 [ 54.033355] ? __release_sock+0x360/0x360 [ 54.037473] ? find_held_lock+0x39/0x1d0 [ 54.041504] ? lock_downgrade+0x990/0x990 [ 54.045618] ? recalc_sigpending_tsk+0x117/0x150 [ 54.050352] ? recalc_sigpending+0x103/0x160 [ 54.054725] ? recalc_sigpending_tsk+0x150/0x150 [ 54.059446] ? get_signal+0x397/0x17e0 [ 54.063304] do_group_exit+0x149/0x400 [ 54.067157] ? __lock_is_held+0xbc/0x140 [ 54.071181] ? SyS_exit+0x30/0x30 [ 54.074598] ? _raw_spin_unlock_irq+0x27/0x70 [ 54.079057] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 54.084037] get_signal+0x7e8/0x17e0 [ 54.087732] ? ptrace_notify+0x130/0x130 [ 54.091757] ? __fget+0xbb/0x580 [ 54.095100] ? lock_release+0xd70/0xd70 [ 54.099043] ? __lock_is_held+0xbc/0x140 [ 54.103077] do_signal+0x94/0x1ee0