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-kasan-gce-4,10.128.0.47' (ECDSA) to the list of known hosts. 2017/09/08 02:10:30 parsed 1 programs 2017/09/08 02:10:30 executed programs: 0 syzkaller login: [ 40.790397] dev_remove_pack: ffff8801cefa1300 not found [ 40.805299] ================================================================== [ 40.812688] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 40.819411] Read of size 8 at addr ffff8801ce510aa8 by task syz-executor0/2995 [ 40.826738] [ 40.828340] CPU: 0 PID: 2995 Comm: syz-executor0 Not tainted 4.13.0+ #73 [ 40.835148] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.844474] Call Trace: [ 40.847035] dump_stack+0x194/0x257 [ 40.850637] ? arch_local_irq_restore+0x53/0x53 [ 40.855277] ? show_regs_print_info+0x65/0x65 [ 40.859747] ? __dev_remove_pack+0x305/0x3b0 [ 40.864128] print_address_description+0x73/0x250 [ 40.868938] ? __dev_remove_pack+0x305/0x3b0 [ 40.873316] kasan_report+0x24e/0x340 [ 40.877091] __asan_report_load8_noabort+0x14/0x20 [ 40.881989] __dev_remove_pack+0x305/0x3b0 [ 40.886192] ? dev_get_by_name_rcu+0x270/0x270 [ 40.890745] ? refcount_sub_and_test+0x115/0x1b0 [ 40.895481] __unregister_prot_hook+0x211/0x280 [ 40.900125] packet_release+0x8bb/0xd70 [ 40.904076] ? packet_set_ring+0x1b70/0x1b70 [ 40.908458] ? dentry_free+0xcd/0x130 [ 40.912230] ? rcu_read_lock_sched_held+0x108/0x120 [ 40.917218] ? kmem_cache_free+0x249/0x280 [ 40.921426] ? dentry_free+0xd2/0x130 [ 40.925203] ? locks_remove_file+0x3fa/0x5a0 [ 40.929583] ? fcntl_setlk+0x10d0/0x10d0 [ 40.933617] ? __fsnotify_parent+0xb4/0x3a0 [ 40.937910] ? fsnotify+0x1af0/0x1af0 [ 40.941686] sock_release+0x8d/0x1e0 [ 40.945368] ? sock_release+0x8d/0x1e0 [ 40.949225] ? sock_release+0x1e0/0x1e0 [ 40.953169] sock_close+0x16/0x20 [ 40.956594] __fput+0x333/0x7f0 [ 40.959848] ? fput+0x140/0x140 [ 40.963101] ? check_same_owner+0x320/0x320 [ 40.967391] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.971861] ____fput+0x15/0x20 [ 40.975110] task_work_run+0x199/0x270 [ 40.978969] ? task_work_cancel+0x210/0x210 [ 40.983260] ? _raw_spin_unlock+0x22/0x30 [ 40.987376] ? switch_task_namespaces+0x87/0xc0 [ 40.992021] do_exit+0xa52/0x1b40 [ 40.995444] ? plist_check_list+0xa0/0xa0 [ 40.999571] ? plist_del+0x47b/0x990 [ 41.003254] ? mm_update_next_owner+0x930/0x930 [ 41.007892] ? plist_add+0x760/0x760 [ 41.011954] ? check_same_owner+0x320/0x320 [ 41.016251] ? find_held_lock+0x39/0x1d0 [ 41.020289] ? check_noncircular+0x20/0x20 [ 41.024494] ? lock_downgrade+0x990/0x990 [ 41.028612] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 41.033966] ? find_held_lock+0x39/0x1d0 [ 41.038006] ? lock_downgrade+0x990/0x990 [ 41.042127] ? recalc_sigpending_tsk+0x117/0x150 [ 41.046868] ? recalc_sigpending+0x103/0x160 [ 41.051247] ? recalc_sigpending_tsk+0x150/0x150 [ 41.055971] ? get_signal+0x397/0x17e0 [ 41.059837] do_group_exit+0x149/0x400 [ 41.063697] ? __lock_is_held+0xbc/0x140 [ 41.067727] ? SyS_exit+0x30/0x30 [ 41.071151] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.075617] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.080607] get_signal+0x7e8/0x17e0 [ 41.084319] ? ptrace_notify+0x130/0x130 [ 41.088349] ? __fget+0xbb/0x580 [ 41.091687] ? __lockdep_init_map+0xe4/0x650 [ 41.096068] ? lock_release+0xd70/0xd70 [ 41.100021] ? exit_robust_list+0x240/0x240 [ 41.104328] do_signal+0x94/0x1ee0 [ 41.107844] ? iterate_fd+0x3f0/0x3f0 [ 41.111617] ? setup_sigcontext+0x7d0/0x7d0 [ 41.115911] ? __lock_is_held+0xbc/0x140 [ 41.119953] ? __fget_light+0x29d/0x390 [ 41.123899] ? selinux_tun_dev_create+0xc0/0xc0 [ 41.128539] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 41.134220] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 41.139465] ? alloc_file+0x284/0x3a0 [ 41.143235] ? exit_to_usermode_loop+0x98/0x300 [ 41.147887] exit_to_usermode_loop+0x224/0x300 [ 41.152442] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 41.157960] syscall_return_slowpath+0x42f/0x500 [ 41.162689] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 41.167678] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 41.172580] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.177575] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.182311] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.187037] RIP: 0033:0x451e59 [ 41.190196] RSP: 002b:00007fc5ca0f7cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 41.197876] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 41.205116] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 41.212356] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 41.219594] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 41.226831] R13: 00007fffff297faf R14: 00007fc5ca0f89c0 R15: 0000000000000002 [ 41.234086] [ 41.235684] Allocated by task 2994: [ 41.239280] save_stack_trace+0x16/0x20 [ 41.243221] save_stack+0x43/0xd0 [ 41.246641] kasan_kmalloc+0xad/0xe0 [ 41.250321] kmem_cache_alloc_trace+0x136/0x750 [ 41.254959] fanout_add+0xa50/0x1190 [ 41.258639] packet_setsockopt+0xfdc/0x1e80 [ 41.262928] SyS_setsockopt+0x189/0x360 [ 41.266869] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.271590] [ 41.273185] Freed by task 2995: [ 41.276432] save_stack_trace+0x16/0x20 [ 41.280372] save_stack+0x43/0xd0 [ 41.283792] kasan_slab_free+0x71/0xc0 [ 41.287647] kfree+0xca/0x250 [ 41.290723] packet_release+0xa8f/0xd70 [ 41.294667] sock_release+0x8d/0x1e0 [ 41.298348] sock_close+0x16/0x20 [ 41.301768] __fput+0x333/0x7f0 [ 41.305014] ____fput+0x15/0x20 [ 41.308261] task_work_run+0x199/0x270 [ 41.312114] do_exit+0xa52/0x1b40 [ 41.315536] do_group_exit+0x149/0x400 [ 41.319390] get_signal+0x7e8/0x17e0 [ 41.323075] do_signal+0x94/0x1ee0 [ 41.326582] exit_to_usermode_loop+0x224/0x300 [ 41.331131] syscall_return_slowpath+0x42f/0x500 [ 41.335856] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.340578] [ 41.342177] The buggy address belongs to the object at ffff8801ce510200 [ 41.342177] which belongs to the cache kmalloc-4096 of size 4096 [ 41.354981] The buggy address is located 2216 bytes inside of [ 41.354981] 4096-byte region [ffff8801ce510200, ffff8801ce511200) [ 41.366995] The buggy address belongs to the page: [ 41.371893] page:ffffea0007394400 count:1 mapcount:0 mapping:ffff8801ce510200 index:0x0 compound_mapcount: 0 [ 41.381847] flags: 0x200000000008100(slab|head) [ 41.386485] raw: 0200000000008100 ffff8801ce510200 0000000000000000 0000000100000001 [ 41.394341] raw: ffffea00073932a0 ffffea0007392fa0 ffff8801dac00dc0 0000000000000000 [ 41.402193] page dumped because: kasan: bad access detected [ 41.407868] [ 41.409463] Memory state around the buggy address: [ 41.414359] ffff8801ce510980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.421692] ffff8801ce510a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.429018] >ffff8801ce510a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.436348] ^ [ 41.440985] ffff8801ce510b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.448311] ffff8801ce510b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.455636] ================================================================== [ 41.462960] Disabling lock debugging due to kernel taint [ 41.468445] Kernel panic - not syncing: panic_on_warn set ... [ 41.468445] [ 41.475778] CPU: 0 PID: 2995 Comm: syz-executor0 Tainted: G B 4.13.0+ #73 [ 41.483796] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.493113] Call Trace: [ 41.495672] dump_stack+0x194/0x257 [ 41.499265] ? arch_local_irq_restore+0x53/0x53 [ 41.503898] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.508623] ? __dev_remove_pack+0x230/0x3b0 [ 41.512997] panic+0x1e4/0x417 [ 41.516152] ? __warn+0x1d9/0x1d9 [ 41.519581] ? __dev_remove_pack+0x305/0x3b0 [ 41.523955] kasan_end_report+0x50/0x50 [ 41.527899] kasan_report+0x137/0x340 [ 41.531667] __asan_report_load8_noabort+0x14/0x20 [ 41.536559] __dev_remove_pack+0x305/0x3b0 [ 41.540759] ? dev_get_by_name_rcu+0x270/0x270 [ 41.545307] ? refcount_sub_and_test+0x115/0x1b0 [ 41.550031] __unregister_prot_hook+0x211/0x280 [ 41.554666] packet_release+0x8bb/0xd70 [ 41.558610] ? packet_set_ring+0x1b70/0x1b70 [ 41.562992] ? dentry_free+0xcd/0x130 [ 41.566758] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.571740] ? kmem_cache_free+0x249/0x280 [ 41.575939] ? dentry_free+0xd2/0x130 [ 41.579707] ? locks_remove_file+0x3fa/0x5a0 [ 41.584083] ? fcntl_setlk+0x10d0/0x10d0 [ 41.588108] ? __fsnotify_parent+0xb4/0x3a0 [ 41.592392] ? fsnotify+0x1af0/0x1af0 [ 41.596161] sock_release+0x8d/0x1e0 [ 41.599837] ? sock_release+0x8d/0x1e0 [ 41.603696] ? sock_release+0x1e0/0x1e0 [ 41.607632] sock_close+0x16/0x20 [ 41.611049] __fput+0x333/0x7f0 [ 41.614297] ? fput+0x140/0x140 [ 41.617540] ? check_same_owner+0x320/0x320 [ 41.621825] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.626285] ____fput+0x15/0x20 [ 41.629530] task_work_run+0x199/0x270 [ 41.633381] ? task_work_cancel+0x210/0x210 [ 41.637665] ? _raw_spin_unlock+0x22/0x30 [ 41.641778] ? switch_task_namespaces+0x87/0xc0 [ 41.646413] do_exit+0xa52/0x1b40 [ 41.649831] ? plist_check_list+0xa0/0xa0 [ 41.653949] ? plist_del+0x47b/0x990 [ 41.657626] ? mm_update_next_owner+0x930/0x930 [ 41.662257] ? plist_add+0x760/0x760 [ 41.665939] ? check_same_owner+0x320/0x320 [ 41.670226] ? find_held_lock+0x39/0x1d0 [ 41.674256] ? check_noncircular+0x20/0x20 [ 41.678454] ? lock_downgrade+0x990/0x990 [ 41.682565] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 41.687900] ? find_held_lock+0x39/0x1d0 [ 41.691932] ? lock_downgrade+0x990/0x990 [ 41.696045] ? recalc_sigpending_tsk+0x117/0x150 [ 41.700773] ? recalc_sigpending+0x103/0x160 [ 41.705145] ? recalc_sigpending_tsk+0x150/0x150 [ 41.709869] ? get_signal+0x397/0x17e0 [ 41.713727] do_group_exit+0x149/0x400 [ 41.717581] ? __lock_is_held+0xbc/0x140 [ 41.721605] ? SyS_exit+0x30/0x30 [ 41.725025] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.729486] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.734467] get_signal+0x7e8/0x17e0 [ 41.738159] ? ptrace_notify+0x130/0x130 [ 41.742186] ? __fget+0xbb/0x580 [ 41.745516] ? __lockdep_init_map+0xe4/0x650 [ 41.749889] ? lock_release+0xd70/0xd70 [ 41.753833] ? exit_robust_list+0x240/0x240 [ 41.758126] do_signal+0x94/0x1ee0 [ 41.761632] ? iterate_fd+0x3f0/0x3f0 [ 41.765397] ? setup_sigcontext+0x7d0/0x7d0 [ 41.769685] ? __lock_is_held+0xbc/0x140 [ 41.773717] ? __fget_light+0x29d/0x390 [ 41.777656] ? selinux_tun_dev_create+0xc0/0xc0 [ 41.782295] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 41.787968] ? selinux_netlbl_sock_rcv_skb+0x730/0x730