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-6,10.128.0.62' (ECDSA) to the list of known hosts. 2017/09/24 18:53:32 parsed 1 programs 2017/09/24 18:53:32 executed programs: 0 syzkaller login: [ 45.073337] dev_remove_pack: ffff8801cdf9cb00 not found [ 45.093364] ================================================================== [ 45.100766] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 45.107490] Read of size 8 at addr ffff8801cdab1528 by task syz-executor0/3101 [ 45.114824] [ 45.116428] CPU: 1 PID: 3101 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 45.123495] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.132822] Call Trace: [ 45.135387] dump_stack+0x194/0x257 [ 45.138990] ? arch_local_irq_restore+0x53/0x53 [ 45.143634] ? show_regs_print_info+0x65/0x65 [ 45.148110] ? __dev_remove_pack+0x305/0x3b0 [ 45.152491] print_address_description+0x73/0x250 [ 45.157314] ? __dev_remove_pack+0x305/0x3b0 [ 45.161695] kasan_report+0x24e/0x340 [ 45.165470] __asan_report_load8_noabort+0x14/0x20 [ 45.170372] __dev_remove_pack+0x305/0x3b0 [ 45.174581] ? dev_get_by_name_rcu+0x270/0x270 [ 45.179135] ? refcount_sub_and_test+0x115/0x1b0 [ 45.183873] __unregister_prot_hook+0x211/0x280 [ 45.188520] packet_release+0x8bb/0xd70 [ 45.192473] ? packet_set_ring+0x1b70/0x1b70 [ 45.196880] ? dentry_free+0xcd/0x130 [ 45.200657] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.205657] ? kmem_cache_free+0x249/0x280 [ 45.209869] ? dentry_free+0xd2/0x130 [ 45.213657] ? locks_remove_file+0x3fa/0x5a0 [ 45.218041] ? fcntl_setlk+0x10d0/0x10d0 [ 45.222078] ? __fsnotify_parent+0xb4/0x3a0 [ 45.226374] ? fsnotify+0x1af0/0x1af0 [ 45.230151] sock_release+0x8d/0x1e0 [ 45.233838] ? sock_release+0x8d/0x1e0 [ 45.237699] ? sock_release+0x1e0/0x1e0 [ 45.241645] sock_close+0x16/0x20 [ 45.245078] __fput+0x333/0x7f0 [ 45.248342] ? fput+0x140/0x140 [ 45.251595] ? check_same_owner+0x320/0x320 [ 45.255888] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.260370] ____fput+0x15/0x20 [ 45.263624] task_work_run+0x199/0x270 [ 45.267494] ? task_work_cancel+0x210/0x210 [ 45.271790] ? _raw_spin_unlock+0x22/0x30 [ 45.275910] ? switch_task_namespaces+0x87/0xc0 [ 45.280558] do_exit+0xa52/0x1b40 [ 45.283982] ? plist_check_list+0xa0/0xa0 [ 45.288111] ? plist_del+0x47b/0x990 [ 45.291798] ? mm_update_next_owner+0x930/0x930 [ 45.296444] ? plist_add+0x760/0x760 [ 45.300143] ? check_same_owner+0x320/0x320 [ 45.304441] ? find_held_lock+0x39/0x1d0 [ 45.308488] ? check_noncircular+0x20/0x20 [ 45.312695] ? lock_downgrade+0x990/0x990 [ 45.316817] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 45.322187] ? find_held_lock+0x39/0x1d0 [ 45.327099] ? lock_downgrade+0x990/0x990 [ 45.331237] ? recalc_sigpending_tsk+0x117/0x150 [ 45.335966] ? recalc_sigpending+0x103/0x160 [ 45.340343] ? recalc_sigpending_tsk+0x150/0x150 [ 45.345067] ? get_signal+0x397/0x17e0 [ 45.348937] do_group_exit+0x149/0x400 [ 45.352799] ? __lock_is_held+0xbc/0x140 [ 45.356830] ? SyS_exit+0x30/0x30 [ 45.360261] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.364745] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.369742] get_signal+0x7e8/0x17e0 [ 45.373457] ? ptrace_notify+0x130/0x130 [ 45.377489] ? __fget+0xbb/0x580 [ 45.380828] ? lock_downgrade+0x990/0x990 [ 45.384951] ? lock_release+0xd70/0xd70 [ 45.388903] ? exit_robust_list+0x240/0x240 [ 45.393209] do_signal+0x94/0x1ee0 [ 45.396724] ? iterate_fd+0x3f0/0x3f0 [ 45.400500] ? setup_sigcontext+0x7d0/0x7d0 [ 45.404802] ? do_page_fault+0xee/0x720 [ 45.408751] ? __do_page_fault+0xb60/0xb60 [ 45.412957] ? __fget_light+0x29d/0x390 [ 45.416905] ? selinux_tun_dev_create+0xc0/0xc0 [ 45.421549] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 45.427230] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 45.432477] ? exit_to_usermode_loop+0x98/0x300 [ 45.437123] exit_to_usermode_loop+0x224/0x300 [ 45.441678] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 45.447197] syscall_return_slowpath+0x42f/0x500 [ 45.451935] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 45.456922] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 45.461823] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.466810] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.471552] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 45.476279] RIP: 0033:0x4520a9 [ 45.479444] RSP: 002b:00007f764bf63cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 45.487126] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 45.494373] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 45.501613] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 45.508855] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 45.516095] R13: 00007ffca43edc8f R14: 00007f764bf649c0 R15: 0000000000000000 [ 45.523359] [ 45.524959] Allocated by task 3101: [ 45.528562] save_stack_trace+0x16/0x20 [ 45.532507] save_stack+0x43/0xd0 [ 45.535942] kasan_kmalloc+0xad/0xe0 [ 45.539643] kmem_cache_alloc_trace+0x136/0x750 [ 45.544284] fanout_add+0xa50/0x1190 [ 45.547962] packet_setsockopt+0xfdc/0x1e80 [ 45.552253] SyS_setsockopt+0x189/0x360 [ 45.556193] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 45.560912] [ 45.562508] Freed by task 3101: [ 45.565756] save_stack_trace+0x16/0x20 [ 45.569697] save_stack+0x43/0xd0 [ 45.573118] kasan_slab_free+0x71/0xc0 [ 45.576971] kfree+0xca/0x250 [ 45.580044] packet_release+0xa8f/0xd70 [ 45.583984] sock_release+0x8d/0x1e0 [ 45.587664] sock_close+0x16/0x20 [ 45.591084] __fput+0x333/0x7f0 [ 45.594330] ____fput+0x15/0x20 [ 45.597577] task_work_run+0x199/0x270 [ 45.601431] do_exit+0xa52/0x1b40 [ 45.604851] do_group_exit+0x149/0x400 [ 45.608706] get_signal+0x7e8/0x17e0 [ 45.612388] do_signal+0x94/0x1ee0 [ 45.615896] exit_to_usermode_loop+0x224/0x300 [ 45.620444] syscall_return_slowpath+0x42f/0x500 [ 45.625166] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 45.629902] [ 45.631500] The buggy address belongs to the object at ffff8801cdab0c80 [ 45.631500] which belongs to the cache kmalloc-4096 of size 4096 [ 45.644296] The buggy address is located 2216 bytes inside of [ 45.644296] 4096-byte region [ffff8801cdab0c80, ffff8801cdab1c80) [ 45.656309] The buggy address belongs to the page: [ 45.661208] page:ffffea000736ac00 count:1 mapcount:0 mapping:ffff8801cdab0c80 index:0x0 compound_mapcount: 0 [ 45.671150] flags: 0x200000000008100(slab|head) [ 45.675789] raw: 0200000000008100 ffff8801cdab0c80 0000000000000000 0000000100000001 [ 45.683640] raw: ffffea000736af20 ffffea000736aca0 ffff8801dac00dc0 0000000000000000 [ 45.691484] page dumped because: kasan: bad access detected [ 45.697160] [ 45.698754] Memory state around the buggy address: [ 45.703653] ffff8801cdab1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.710982] ffff8801cdab1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.718311] >ffff8801cdab1500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.725634] ^ [ 45.730269] ffff8801cdab1580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.737594] ffff8801cdab1600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.744918] ================================================================== [ 45.752241] Disabling lock debugging due to kernel taint [ 45.757720] Kernel panic - not syncing: panic_on_warn set ... [ 45.757720] [ 45.765051] CPU: 1 PID: 3101 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 45.773330] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.782647] Call Trace: [ 45.785207] dump_stack+0x194/0x257 [ 45.788802] ? arch_local_irq_restore+0x53/0x53 [ 45.793436] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.798162] ? __dev_remove_pack+0x2f0/0x3b0 [ 45.802533] panic+0x1e4/0x417 [ 45.805689] ? __warn+0x1d9/0x1d9 [ 45.809111] ? __dev_remove_pack+0x305/0x3b0 [ 45.813489] kasan_end_report+0x50/0x50 [ 45.817426] kasan_report+0x137/0x340 [ 45.821191] __asan_report_load8_noabort+0x14/0x20 [ 45.826083] __dev_remove_pack+0x305/0x3b0 [ 45.830281] ? dev_get_by_name_rcu+0x270/0x270 [ 45.834826] ? refcount_sub_and_test+0x115/0x1b0 [ 45.839551] __unregister_prot_hook+0x211/0x280 [ 45.844186] packet_release+0x8bb/0xd70 [ 45.848127] ? packet_set_ring+0x1b70/0x1b70 [ 45.852502] ? dentry_free+0xcd/0x130 [ 45.856268] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.861253] ? kmem_cache_free+0x249/0x280 [ 45.865453] ? dentry_free+0xd2/0x130 [ 45.869220] ? locks_remove_file+0x3fa/0x5a0 [ 45.873592] ? fcntl_setlk+0x10d0/0x10d0 [ 45.877622] ? __fsnotify_parent+0xb4/0x3a0 [ 45.881907] ? fsnotify+0x1af0/0x1af0 [ 45.885675] sock_release+0x8d/0x1e0 [ 45.889354] ? sock_release+0x8d/0x1e0 [ 45.893205] ? sock_release+0x1e0/0x1e0 [ 45.897143] sock_close+0x16/0x20 [ 45.900560] __fput+0x333/0x7f0 [ 45.903815] ? fput+0x140/0x140 [ 45.907060] ? check_same_owner+0x320/0x320 [ 45.911344] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.915808] ____fput+0x15/0x20 [ 45.919053] task_work_run+0x199/0x270 [ 45.922905] ? task_work_cancel+0x210/0x210 [ 45.927192] ? _raw_spin_unlock+0x22/0x30 [ 45.931305] ? switch_task_namespaces+0x87/0xc0 [ 45.935943] do_exit+0xa52/0x1b40 [ 45.939362] ? plist_check_list+0xa0/0xa0 [ 45.943479] ? plist_del+0x47b/0x990 [ 45.947159] ? mm_update_next_owner+0x930/0x930 [ 45.951794] ? plist_add+0x760/0x760 [ 45.955475] ? check_same_owner+0x320/0x320 [ 45.959765] ? find_held_lock+0x39/0x1d0 [ 45.963794] ? check_noncircular+0x20/0x20 [ 45.967990] ? lock_downgrade+0x990/0x990 [ 45.972109] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 45.977443] ? find_held_lock+0x39/0x1d0 [ 45.981472] ? lock_downgrade+0x990/0x990 [ 45.985584] ? recalc_sigpending_tsk+0x117/0x150 [ 45.990304] ? recalc_sigpending+0x103/0x160 [ 45.994675] ? recalc_sigpending_tsk+0x150/0x150 [ 45.999391] ? get_signal+0x397/0x17e0 [ 46.003246] do_group_exit+0x149/0x400 [ 46.007097] ? __lock_is_held+0xbc/0x140 [ 46.011121] ? SyS_exit+0x30/0x30 [ 46.014546] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.019005] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.023993] get_signal+0x7e8/0x17e0 [ 46.027685] ? ptrace_notify+0x130/0x130 [ 46.031708] ? __fget+0xbb/0x580 [ 46.035601] ? lock_downgrade+0x990/0x990 [ 46.039715] ? lock_release+0xd70/0xd70 [ 46.043657] ? exit_robust_list+0x240/0x240 [ 46.047957] do_signal+0x94/0x1ee0 [ 46.051465] ? iterate_fd+0x3f0/0x3f0 [ 46.055233] ? setup_sigcontext+0x7d0/0x7d0 [ 46.059521] ? do_page_fault+0xee/0x720 [ 46.063460] ? __do_page_fault+0xb60/0xb60 [ 46.067665] ? __fget_light+0x29d/0x390 [ 46.071604] ? selinux_tun_dev_create+0xc0/0xc0