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-9,10.128.0.14' (ECDSA) to the list of known hosts. 2017/09/20 19:00:43 parsed 1 programs 2017/09/20 19:00:43 executed programs: 0 syzkaller login: [ 42.177694] dev_remove_pack: ffff8801ca691bc0 not found [ 42.199282] ================================================================== [ 42.206698] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 42.213436] Read of size 8 at addr ffff8801ca4f16a8 by task syz-executor4/3569 [ 42.220766] [ 42.222370] CPU: 1 PID: 3569 Comm: syz-executor4 Not tainted 4.13.0-mm1+ #7 [ 42.229443] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.238769] Call Trace: [ 42.241331] dump_stack+0x194/0x257 [ 42.244937] ? arch_local_irq_restore+0x53/0x53 [ 42.249580] ? show_regs_print_info+0x65/0x65 [ 42.254054] ? __dev_remove_pack+0x305/0x3b0 [ 42.258437] print_address_description+0x73/0x250 [ 42.263260] ? __dev_remove_pack+0x305/0x3b0 [ 42.267642] kasan_report+0x24e/0x340 [ 42.271419] __asan_report_load8_noabort+0x14/0x20 [ 42.276320] __dev_remove_pack+0x305/0x3b0 [ 42.280528] ? dev_get_by_name_rcu+0x270/0x270 [ 42.285086] ? refcount_sub_and_test+0x115/0x1b0 [ 42.289822] __unregister_prot_hook+0x211/0x280 [ 42.294468] packet_release+0x8bb/0xd70 [ 42.298427] ? packet_set_ring+0x1b70/0x1b70 [ 42.302808] ? dentry_free+0xcd/0x130 [ 42.306583] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.311575] ? kmem_cache_free+0x249/0x280 [ 42.315787] ? dentry_free+0xd2/0x130 [ 42.319568] ? locks_remove_file+0x3fa/0x5a0 [ 42.323951] ? fcntl_setlk+0x10d0/0x10d0 [ 42.327987] ? __fsnotify_parent+0xb4/0x3a0 [ 42.332282] ? fsnotify+0x1af0/0x1af0 [ 42.336059] sock_release+0x8d/0x1e0 [ 42.339742] ? sock_release+0x8d/0x1e0 [ 42.343600] ? sock_release+0x1e0/0x1e0 [ 42.347548] sock_close+0x16/0x20 [ 42.350973] __fput+0x333/0x7f0 [ 42.354230] ? fput+0x140/0x140 [ 42.357482] ? check_same_owner+0x320/0x320 [ 42.361774] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.366247] ____fput+0x15/0x20 [ 42.369499] task_work_run+0x199/0x270 [ 42.373364] ? task_work_cancel+0x210/0x210 [ 42.377660] ? _raw_spin_unlock+0x22/0x30 [ 42.381780] ? switch_task_namespaces+0x87/0xc0 [ 42.386428] do_exit+0xa52/0x1b40 [ 42.389853] ? plist_check_list+0xa0/0xa0 [ 42.393985] ? plist_del+0x47b/0x990 [ 42.397672] ? mm_update_next_owner+0x930/0x930 [ 42.402312] ? plist_add+0x760/0x760 [ 42.406009] ? check_same_owner+0x320/0x320 [ 42.410308] ? find_held_lock+0x39/0x1d0 [ 42.414353] ? check_noncircular+0x20/0x20 [ 42.418561] ? lock_downgrade+0x990/0x990 [ 42.422683] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.428037] ? find_held_lock+0x39/0x1d0 [ 42.432080] ? lock_downgrade+0x990/0x990 [ 42.436200] ? recalc_sigpending_tsk+0x117/0x150 [ 42.440930] ? recalc_sigpending+0x103/0x160 [ 42.445311] ? recalc_sigpending_tsk+0x150/0x150 [ 42.450035] ? get_signal+0x397/0x17e0 [ 42.453905] do_group_exit+0x149/0x400 [ 42.457767] ? __lock_is_held+0xbc/0x140 [ 42.461798] ? SyS_exit+0x30/0x30 [ 42.465222] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.469695] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.474687] get_signal+0x7e8/0x17e0 [ 42.478401] ? ptrace_notify+0x130/0x130 [ 42.482440] ? __schedule+0x8f0/0x2070 [ 42.486298] ? lock_release+0xd70/0xd70 [ 42.490252] ? exit_robust_list+0x240/0x240 [ 42.494558] do_signal+0x94/0x1ee0 [ 42.498078] ? iterate_fd+0x3f0/0x3f0 [ 42.501855] ? setup_sigcontext+0x7d0/0x7d0 [ 42.506166] ? schedule+0x108/0x440 [ 42.509762] ? mntput_no_expire+0x15e/0xa90 [ 42.514054] ? check_same_owner+0x320/0x320 [ 42.518348] ? __schedule+0x2070/0x2070 [ 42.522297] ? __fget_light+0x29d/0x390 [ 42.526245] ? selinux_tun_dev_create+0xc0/0xc0 [ 42.530888] ? putname+0xee/0x130 [ 42.534310] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 42.539992] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 42.545243] ? exit_to_usermode_loop+0x98/0x300 [ 42.549890] exit_to_usermode_loop+0x224/0x300 [ 42.554447] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 42.559964] syscall_return_slowpath+0x42f/0x500 [ 42.564695] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 42.569689] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 42.574603] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.579593] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.584328] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.589053] RIP: 0033:0x4520a9 [ 42.592213] RSP: 002b:00007efd322cccf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 42.599897] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 42.607150] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 42.614401] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 42.621645] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 42.628898] R13: 00007fffb130e56f R14: 00007efd322cd9c0 R15: 0000000000000000 [ 42.636186] [ 42.637797] Allocated by task 3569: [ 42.641412] save_stack_trace+0x16/0x20 [ 42.645363] save_stack+0x43/0xd0 [ 42.648789] kasan_kmalloc+0xad/0xe0 [ 42.652475] kmem_cache_alloc_trace+0x136/0x750 [ 42.657117] fanout_add+0xa50/0x1190 [ 42.660800] packet_setsockopt+0xfdc/0x1e80 [ 42.665095] SyS_setsockopt+0x189/0x360 [ 42.669040] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.673766] [ 42.675364] Freed by task 3569: [ 42.678617] save_stack_trace+0x16/0x20 [ 42.682572] save_stack+0x43/0xd0 [ 42.685995] kasan_slab_free+0x71/0xc0 [ 42.689869] kfree+0xca/0x250 [ 42.692958] packet_release+0xa8f/0xd70 [ 42.696918] sock_release+0x8d/0x1e0 [ 42.700612] sock_close+0x16/0x20 [ 42.704041] __fput+0x333/0x7f0 [ 42.707294] ____fput+0x15/0x20 [ 42.710547] task_work_run+0x199/0x270 [ 42.714417] do_exit+0xa52/0x1b40 [ 42.717845] do_group_exit+0x149/0x400 [ 42.721715] get_signal+0x7e8/0x17e0 [ 42.725403] do_signal+0x94/0x1ee0 [ 42.728918] exit_to_usermode_loop+0x224/0x300 [ 42.733482] syscall_return_slowpath+0x42f/0x500 [ 42.738212] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.742937] [ 42.744539] The buggy address belongs to the object at ffff8801ca4f0e00 [ 42.744539] which belongs to the cache kmalloc-4096 of size 4096 [ 42.757861] The buggy address is located 2216 bytes inside of [ 42.757861] 4096-byte region [ffff8801ca4f0e00, ffff8801ca4f1e00) [ 42.769880] The buggy address belongs to the page: [ 42.774782] page:ffffea0007293c00 count:1 mapcount:0 mapping:ffff8801ca4f0e00 index:0x0 compound_mapcount: 0 [ 42.784731] flags: 0x200000000008100(slab|head) [ 42.789375] raw: 0200000000008100 ffff8801ca4f0e00 0000000000000000 0000000100000001 [ 42.797231] raw: ffffea0007293ba0 ffffea0007294da0 ffff8801dac00dc0 0000000000000000 [ 42.805082] page dumped because: kasan: bad access detected [ 42.810761] [ 42.812361] Memory state around the buggy address: [ 42.817261] ffff8801ca4f1580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.824592] ffff8801ca4f1600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.831921] >ffff8801ca4f1680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.839249] ^ [ 42.843888] ffff8801ca4f1700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.851218] ffff8801ca4f1780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.858555] ================================================================== [ 42.865887] Disabling lock debugging due to kernel taint [ 42.871397] Kernel panic - not syncing: panic_on_warn set ... [ 42.871397] [ 42.878729] CPU: 1 PID: 3569 Comm: syz-executor4 Tainted: G B 4.13.0-mm1+ #7 [ 42.887010] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.896332] Call Trace: [ 42.898893] dump_stack+0x194/0x257 [ 42.902491] ? arch_local_irq_restore+0x53/0x53 [ 42.907129] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.911857] ? __dev_remove_pack+0x2f0/0x3b0 [ 42.916233] panic+0x1e4/0x417 [ 42.919394] ? __warn+0x1d9/0x1d9 [ 42.922825] ? __dev_remove_pack+0x305/0x3b0 [ 42.927200] kasan_end_report+0x50/0x50 [ 42.931141] kasan_report+0x137/0x340 [ 42.934911] __asan_report_load8_noabort+0x14/0x20 [ 42.939809] __dev_remove_pack+0x305/0x3b0 [ 42.944015] ? dev_get_by_name_rcu+0x270/0x270 [ 42.948565] ? refcount_sub_and_test+0x115/0x1b0 [ 42.953297] __unregister_prot_hook+0x211/0x280 [ 42.957938] packet_release+0x8bb/0xd70 [ 42.961884] ? packet_set_ring+0x1b70/0x1b70 [ 42.966261] ? dentry_free+0xcd/0x130 [ 42.970029] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.975015] ? kmem_cache_free+0x249/0x280 [ 42.979219] ? dentry_free+0xd2/0x130 [ 42.982989] ? locks_remove_file+0x3fa/0x5a0 [ 42.987368] ? fcntl_setlk+0x10d0/0x10d0 [ 42.991398] ? __fsnotify_parent+0xb4/0x3a0 [ 42.995689] ? fsnotify+0x1af0/0x1af0 [ 42.999460] sock_release+0x8d/0x1e0 [ 43.003140] ? sock_release+0x8d/0x1e0 [ 43.006996] ? sock_release+0x1e0/0x1e0 [ 43.010938] sock_close+0x16/0x20 [ 43.014357] __fput+0x333/0x7f0 [ 43.017608] ? fput+0x140/0x140 [ 43.020860] ? check_same_owner+0x320/0x320 [ 43.025147] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.029611] ____fput+0x15/0x20 [ 43.032857] task_work_run+0x199/0x270 [ 43.036714] ? task_work_cancel+0x210/0x210 [ 43.041007] ? _raw_spin_unlock+0x22/0x30 [ 43.045126] ? switch_task_namespaces+0x87/0xc0 [ 43.049767] do_exit+0xa52/0x1b40 [ 43.053187] ? plist_check_list+0xa0/0xa0 [ 43.057312] ? plist_del+0x47b/0x990 [ 43.060996] ? mm_update_next_owner+0x930/0x930 [ 43.065637] ? plist_add+0x760/0x760 [ 43.069327] ? check_same_owner+0x320/0x320 [ 43.073620] ? find_held_lock+0x39/0x1d0 [ 43.077654] ? check_noncircular+0x20/0x20 [ 43.081859] ? lock_downgrade+0x990/0x990 [ 43.085976] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.091320] ? find_held_lock+0x39/0x1d0 [ 43.095354] ? lock_downgrade+0x990/0x990 [ 43.099470] ? recalc_sigpending_tsk+0x117/0x150 [ 43.104192] ? recalc_sigpending+0x103/0x160 [ 43.108565] ? recalc_sigpending_tsk+0x150/0x150 [ 43.113286] ? get_signal+0x397/0x17e0 [ 43.117147] do_group_exit+0x149/0x400 [ 43.121005] ? __lock_is_held+0xbc/0x140 [ 43.125037] ? SyS_exit+0x30/0x30 [ 43.128457] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.132921] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.137906] get_signal+0x7e8/0x17e0 [ 43.141604] ? ptrace_notify+0x130/0x130 [ 43.145637] ? __schedule+0x8f0/0x2070 [ 43.149490] ? lock_release+0xd70/0xd70 [ 43.153434] ? exit_robust_list+0x240/0x240 [ 43.157728] do_signal+0x94/0x1ee0 [ 43.161241] ? iterate_fd+0x3f0/0x3f0 [ 43.165014] ? setup_sigcontext+0x7d0/0x7d0 [ 43.169309] ? schedule+0x108/0x440 [ 43.172901] ? mntput_no_expire+0x15e/0xa90 [ 43.177189] ? check_same_owner+0x320/0x320