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-5,10.128.0.49' (ECDSA) to the list of known hosts. 2017/09/20 09:41:34 parsed 1 programs 2017/09/20 09:41:34 executed programs: 0 syzkaller login: [ 24.382432] dev_remove_pack: ffff8801ce0c7d80 not found [ 24.398294] ================================================================== [ 24.405695] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 24.412417] Read of size 8 at addr ffff8801ce1c2f68 by task syz-executor0/3013 [ 24.419754] [ 24.421356] CPU: 0 PID: 3013 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 24.428426] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.437751] Call Trace: [ 24.440313] dump_stack+0x194/0x257 [ 24.443916] ? arch_local_irq_restore+0x53/0x53 [ 24.448555] ? show_regs_print_info+0x65/0x65 [ 24.453033] ? __dev_remove_pack+0x305/0x3b0 [ 24.457417] print_address_description+0x73/0x250 [ 24.462239] ? __dev_remove_pack+0x305/0x3b0 [ 24.466623] kasan_report+0x24e/0x340 [ 24.470399] __asan_report_load8_noabort+0x14/0x20 [ 24.475298] __dev_remove_pack+0x305/0x3b0 [ 24.479505] ? dev_get_by_name_rcu+0x270/0x270 [ 24.484062] ? refcount_sub_and_test+0x115/0x1b0 [ 24.488800] __unregister_prot_hook+0x211/0x280 [ 24.493445] packet_release+0x8bb/0xd70 [ 24.497398] ? packet_set_ring+0x1b70/0x1b70 [ 24.501780] ? dentry_free+0xcd/0x130 [ 24.505815] ? rcu_read_lock_sched_held+0x108/0x120 [ 24.510811] ? kmem_cache_free+0x249/0x280 [ 24.515020] ? dentry_free+0xd2/0x130 [ 24.518798] ? locks_remove_file+0x3fa/0x5a0 [ 24.523184] ? fcntl_setlk+0x10d0/0x10d0 [ 24.527219] ? __fsnotify_parent+0xb4/0x3a0 [ 24.531518] ? fsnotify+0x1af0/0x1af0 [ 24.535300] sock_release+0x8d/0x1e0 [ 24.538985] ? sock_release+0x8d/0x1e0 [ 24.542845] ? sock_release+0x1e0/0x1e0 [ 24.546799] sock_close+0x16/0x20 [ 24.550234] __fput+0x333/0x7f0 [ 24.553499] ? fput+0x140/0x140 [ 24.556752] ? check_same_owner+0x320/0x320 [ 24.561046] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.565520] ____fput+0x15/0x20 [ 24.568771] task_work_run+0x199/0x270 [ 24.572633] ? task_work_cancel+0x210/0x210 [ 24.576928] ? _raw_spin_unlock+0x22/0x30 [ 24.581048] ? switch_task_namespaces+0x87/0xc0 [ 24.585693] do_exit+0xa52/0x1b40 [ 24.589125] ? plist_check_list+0xa0/0xa0 [ 24.593267] ? plist_del+0x47b/0x990 [ 24.596955] ? mm_update_next_owner+0x930/0x930 [ 24.601599] ? plist_add+0x760/0x760 [ 24.605305] ? check_same_owner+0x320/0x320 [ 24.609604] ? find_held_lock+0x39/0x1d0 [ 24.613646] ? check_noncircular+0x20/0x20 [ 24.617851] ? lock_downgrade+0x990/0x990 [ 24.621973] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 24.627327] ? find_held_lock+0x39/0x1d0 [ 24.631371] ? lock_downgrade+0x990/0x990 [ 24.635492] ? recalc_sigpending_tsk+0x117/0x150 [ 24.640222] ? recalc_sigpending+0x103/0x160 [ 24.644603] ? recalc_sigpending_tsk+0x150/0x150 [ 24.649327] ? get_signal+0x397/0x17e0 [ 24.653197] do_group_exit+0x149/0x400 [ 24.657057] ? __lock_is_held+0xbc/0x140 [ 24.661089] ? SyS_exit+0x30/0x30 [ 24.664515] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.668987] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.673983] get_signal+0x7e8/0x17e0 [ 24.677700] ? ptrace_notify+0x130/0x130 [ 24.681733] ? __fget+0xbb/0x580 [ 24.685073] ? __lockdep_init_map+0xe4/0x650 [ 24.689457] ? lock_release+0xd70/0xd70 [ 24.693419] ? exit_robust_list+0x240/0x240 [ 24.697725] do_signal+0x94/0x1ee0 [ 24.701252] ? iterate_fd+0x3f0/0x3f0 [ 24.705027] ? setup_sigcontext+0x7d0/0x7d0 [ 24.709323] ? __lock_is_held+0xbc/0x140 [ 24.713368] ? __fget_light+0x29d/0x390 [ 24.717317] ? selinux_tun_dev_create+0xc0/0xc0 [ 24.721959] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 24.727646] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 24.732894] ? alloc_file+0x284/0x3a0 [ 24.736672] ? exit_to_usermode_loop+0x98/0x300 [ 24.741321] exit_to_usermode_loop+0x224/0x300 [ 24.745882] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 24.751402] syscall_return_slowpath+0x42f/0x500 [ 24.756131] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 24.761124] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 24.766031] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.771020] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.775755] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 24.780480] RIP: 0033:0x4520a9 [ 24.783642] RSP: 002b:00007f51639f3cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 24.791326] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 00000000004520a9 [ 24.798572] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 24.805827] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 24.813077] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 24.820323] R13: 00007ffe0fdb5f0f R14: 00007f51639f49c0 R15: 0000000000000002 [ 24.827588] [ 24.829190] Allocated by task 3012: [ 24.832792] save_stack_trace+0x16/0x20 [ 24.837323] save_stack+0x43/0xd0 [ 24.840761] kasan_kmalloc+0xad/0xe0 [ 24.844446] kmem_cache_alloc_trace+0x136/0x750 [ 24.849088] fanout_add+0xa50/0x1190 [ 24.852775] packet_setsockopt+0xfdc/0x1e80 [ 24.857069] SyS_setsockopt+0x189/0x360 [ 24.861017] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.865750] [ 24.867349] Freed by task 3013: [ 24.870603] save_stack_trace+0x16/0x20 [ 24.874550] save_stack+0x43/0xd0 [ 24.877980] kasan_slab_free+0x71/0xc0 [ 24.881837] kfree+0xca/0x250 [ 24.884912] packet_release+0xa8f/0xd70 [ 24.888856] sock_release+0x8d/0x1e0 [ 24.892541] sock_close+0x16/0x20 [ 24.895969] __fput+0x333/0x7f0 [ 24.899220] ____fput+0x15/0x20 [ 24.902469] task_work_run+0x199/0x270 [ 24.906328] do_exit+0xa52/0x1b40 [ 24.909751] do_group_exit+0x149/0x400 [ 24.913610] get_signal+0x7e8/0x17e0 [ 24.917292] do_signal+0x94/0x1ee0 [ 24.920803] exit_to_usermode_loop+0x224/0x300 [ 24.925354] syscall_return_slowpath+0x42f/0x500 [ 24.930080] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 24.934800] [ 24.936400] The buggy address belongs to the object at ffff8801ce1c26c0 [ 24.936400] which belongs to the cache kmalloc-4096 of size 4096 [ 24.949198] The buggy address is located 2216 bytes inside of [ 24.949198] 4096-byte region [ffff8801ce1c26c0, ffff8801ce1c36c0) [ 24.961215] The buggy address belongs to the page: [ 24.966114] page:ffffea0007387080 count:1 mapcount:0 mapping:ffff8801ce1c26c0 index:0x0 compound_mapcount: 0 [ 24.976059] flags: 0x200000000008100(slab|head) [ 24.980699] raw: 0200000000008100 ffff8801ce1c26c0 0000000000000000 0000000100000001 [ 24.988551] raw: ffffea0007386e20 ffffea0007387120 ffff8801dac00dc0 0000000000000000 [ 24.996403] page dumped because: kasan: bad access detected [ 25.002096] [ 25.003693] Memory state around the buggy address: [ 25.008591] ffff8801ce1c2e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.015919] ffff8801ce1c2e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.023247] >ffff8801ce1c2f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.030574] ^ [ 25.037294] ffff8801ce1c2f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.044623] ffff8801ce1c3000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.051949] ================================================================== [ 25.059275] Disabling lock debugging due to kernel taint [ 25.064797] Kernel panic - not syncing: panic_on_warn set ... [ 25.064797] [ 25.072131] CPU: 0 PID: 3013 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 25.080410] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.089730] Call Trace: [ 25.092286] dump_stack+0x194/0x257 [ 25.095970] ? arch_local_irq_restore+0x53/0x53 [ 25.100611] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.105338] ? __dev_remove_pack+0x2f0/0x3b0 [ 25.109716] panic+0x1e4/0x417 [ 25.112876] ? __warn+0x1d9/0x1d9 [ 25.116302] ? __dev_remove_pack+0x305/0x3b0 [ 25.120676] kasan_end_report+0x50/0x50 [ 25.124617] kasan_report+0x137/0x340 [ 25.128384] __asan_report_load8_noabort+0x14/0x20 [ 25.133291] __dev_remove_pack+0x305/0x3b0 [ 25.137493] ? dev_get_by_name_rcu+0x270/0x270 [ 25.142053] ? refcount_sub_and_test+0x115/0x1b0 [ 25.146780] __unregister_prot_hook+0x211/0x280 [ 25.151418] packet_release+0x8bb/0xd70 [ 25.155362] ? packet_set_ring+0x1b70/0x1b70 [ 25.159739] ? dentry_free+0xcd/0x130 [ 25.163507] ? rcu_read_lock_sched_held+0x108/0x120 [ 25.168510] ? kmem_cache_free+0x249/0x280 [ 25.172725] ? dentry_free+0xd2/0x130 [ 25.176495] ? locks_remove_file+0x3fa/0x5a0 [ 25.180870] ? fcntl_setlk+0x10d0/0x10d0 [ 25.184899] ? __fsnotify_parent+0xb4/0x3a0 [ 25.189187] ? fsnotify+0x1af0/0x1af0 [ 25.192957] sock_release+0x8d/0x1e0 [ 25.196637] ? sock_release+0x8d/0x1e0 [ 25.200492] ? sock_release+0x1e0/0x1e0 [ 25.204431] sock_close+0x16/0x20 [ 25.207852] __fput+0x333/0x7f0 [ 25.211102] ? fput+0x140/0x140 [ 25.214347] ? check_same_owner+0x320/0x320 [ 25.218636] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.223098] ____fput+0x15/0x20 [ 25.226343] task_work_run+0x199/0x270 [ 25.230197] ? task_work_cancel+0x210/0x210 [ 25.234483] ? _raw_spin_unlock+0x22/0x30 [ 25.238595] ? switch_task_namespaces+0x87/0xc0 [ 25.243233] do_exit+0xa52/0x1b40 [ 25.246654] ? plist_check_list+0xa0/0xa0 [ 25.250774] ? plist_del+0x47b/0x990 [ 25.254453] ? mm_update_next_owner+0x930/0x930 [ 25.259090] ? plist_add+0x760/0x760 [ 25.262788] ? check_same_owner+0x320/0x320 [ 25.267089] ? find_held_lock+0x39/0x1d0 [ 25.271120] ? check_noncircular+0x20/0x20 [ 25.275317] ? lock_downgrade+0x990/0x990 [ 25.279431] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 25.284782] ? find_held_lock+0x39/0x1d0 [ 25.288815] ? lock_downgrade+0x990/0x990 [ 25.292929] ? recalc_sigpending_tsk+0x117/0x150 [ 25.297653] ? recalc_sigpending+0x103/0x160 [ 25.302026] ? recalc_sigpending_tsk+0x150/0x150 [ 25.306748] ? get_signal+0x397/0x17e0 [ 25.310606] do_group_exit+0x149/0x400 [ 25.314459] ? __lock_is_held+0xbc/0x140 [ 25.318485] ? SyS_exit+0x30/0x30 [ 25.321904] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.326366] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.331349] get_signal+0x7e8/0x17e0 [ 25.335054] ? ptrace_notify+0x130/0x130 [ 25.339081] ? __fget+0xbb/0x580 [ 25.342413] ? __lockdep_init_map+0xe4/0x650 [ 25.346791] ? lock_release+0xd70/0xd70 [ 25.350756] ? exit_robust_list+0x240/0x240 [ 25.355232] do_signal+0x94/0x1ee0 [ 25.358750] ? iterate_fd+0x3f0/0x3f0 [ 25.362522] ? setup_sigcontext+0x7d0/0x7d0 [ 25.366811] ? __lock_is_held+0xbc/0x140 [ 25.370845] ? __fget_light+0x29d/0x390 [ 25.374788] ? selinux_tun_dev_create+0xc0/0xc0 [ 25.379422] ? selinux_netlbl_socket_setsockopt+0x10c/0x460