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-net-kasan-gce-7,10.128.0.32' (ECDSA) to the list of known hosts. 2017/09/06 16:39:02 parsed 1 programs 2017/09/06 16:39:02 executed programs: 0 syzkaller login: [ 38.668087] dev_remove_pack: ffff8801d5bddd80 not found [ 38.689236] ================================================================== [ 38.696742] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 38.703466] Read of size 8 at addr ffff8801d29dd5a8 by task syz-executor0/2973 [ 38.710793] [ 38.712392] CPU: 1 PID: 2973 Comm: syz-executor0 Not tainted 4.13.0-rc7+ #41 [ 38.719552] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.728874] Call Trace: [ 38.731435] dump_stack+0x194/0x257 [ 38.735033] ? arch_local_irq_restore+0x53/0x53 [ 38.739671] ? show_regs_print_info+0x65/0x65 [ 38.744141] ? __dev_remove_pack+0x305/0x3b0 [ 38.748605] print_address_description+0x73/0x250 [ 38.753416] ? __dev_remove_pack+0x305/0x3b0 [ 38.757791] kasan_report+0x24e/0x340 [ 38.761575] __asan_report_load8_noabort+0x14/0x20 [ 38.766480] __dev_remove_pack+0x305/0x3b0 [ 38.770769] ? dev_get_by_name_rcu+0x270/0x270 [ 38.775325] ? refcount_sub_and_test+0x115/0x1b0 [ 38.780067] __unregister_prot_hook+0x211/0x280 [ 38.784725] packet_release+0x8bb/0xd70 [ 38.788677] ? packet_set_ring+0x1b70/0x1b70 [ 38.793060] ? dentry_free+0xcd/0x130 [ 38.796839] ? rcu_read_lock_sched_held+0x108/0x120 [ 38.801829] ? kmem_cache_free+0x249/0x280 [ 38.806032] ? dentry_free+0xd2/0x130 [ 38.809805] ? locks_remove_file+0x414/0x560 [ 38.814183] ? fcntl_setlk+0x10c0/0x10c0 [ 38.818233] ? __fsnotify_parent+0xb4/0x3a0 [ 38.822536] ? fsnotify+0x1af0/0x1af0 [ 38.826313] sock_release+0x8d/0x1e0 [ 38.829996] ? sock_release+0x8d/0x1e0 [ 38.833855] ? sock_release+0x1e0/0x1e0 [ 38.837794] sock_close+0x16/0x20 [ 38.841238] __fput+0x327/0x7e0 [ 38.844502] ? fput+0x140/0x140 [ 38.847754] ? check_same_owner+0x320/0x320 [ 38.852059] ? do_raw_spin_trylock+0x190/0x190 [ 38.856707] ? check_same_owner+0x320/0x320 [ 38.861307] ____fput+0x15/0x20 [ 38.864566] task_work_run+0x18a/0x260 [ 38.868424] ? task_work_cancel+0x210/0x210 [ 38.872731] ? _raw_spin_unlock+0x22/0x30 [ 38.876848] ? switch_task_namespaces+0x87/0xc0 [ 38.881489] do_exit+0xa3a/0x1b10 [ 38.885001] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 38.890166] ? plist_check_list+0xa0/0xa0 [ 38.894293] ? plist_add+0x5cb/0x760 [ 38.897993] ? mm_update_next_owner+0x930/0x930 [ 38.902635] ? plist_add+0x760/0x760 [ 38.906326] ? check_noncircular+0x20/0x20 [ 38.910535] ? check_same_owner+0x320/0x320 [ 38.914830] ? lock_acquire+0x1d5/0x580 [ 38.918866] ? futex_wait_setup+0x14a/0x3d0 [ 38.923160] ? __might_sleep+0x95/0x190 [ 38.927213] ? check_noncircular+0x20/0x20 [ 38.931427] ? futex_wait+0x43e/0xa00 [ 38.935208] ? do_raw_spin_trylock+0x190/0x190 [ 38.939834] ? fault_in_user_writeable+0x90/0x90 [ 38.944568] ? find_held_lock+0x35/0x1d0 [ 38.948606] ? get_signal+0x855/0x17e0 [ 38.952464] ? lock_downgrade+0x990/0x990 [ 38.956588] do_group_exit+0x149/0x400 [ 38.960534] ? __lock_is_held+0xb6/0x140 [ 38.964563] ? SyS_exit+0x30/0x30 [ 38.968159] ? _raw_spin_unlock_irq+0x27/0x70 [ 38.972625] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 38.977705] get_signal+0x7e8/0x17e0 [ 38.981416] ? ptrace_notify+0x130/0x130 [ 38.985447] ? lock_downgrade+0x990/0x990 [ 38.989580] ? lock_release+0xa40/0xa40 [ 38.993537] ? exit_robust_list+0x240/0x240 [ 38.997843] do_signal+0x94/0x1ee0 [ 39.001360] ? iterate_fd+0x3f0/0x3f0 [ 39.005222] ? setup_sigcontext+0x7d0/0x7d0 [ 39.009532] ? selinux_tun_dev_create+0xc0/0xc0 [ 39.014188] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 39.019869] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 39.025127] ? exit_to_usermode_loop+0x98/0x300 [ 39.029777] exit_to_usermode_loop+0x224/0x300 [ 39.034332] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 39.039854] syscall_return_slowpath+0x3a7/0x450 [ 39.044586] ? prepare_exit_to_usermode+0x220/0x220 [ 39.049573] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 39.054481] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 39.059468] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 39.064229] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 39.068964] RIP: 0033:0x451e59 [ 39.072121] RSP: 002b:00007ffba56edcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 39.079816] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 39.087057] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 39.094391] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 39.101631] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 39.108957] R13: 00007fff8703a14f R14: 00007ffba56ee9c0 R15: 0000000000000002 [ 39.116214] [ 39.117811] Allocated by task 2972: [ 39.121408] save_stack_trace+0x16/0x20 [ 39.125381] save_stack+0x43/0xd0 [ 39.128802] kasan_kmalloc+0xad/0xe0 [ 39.132485] kmem_cache_alloc_trace+0x12f/0x740 [ 39.137276] fanout_add+0xa50/0x1190 [ 39.140961] packet_setsockopt+0xfdc/0x1e80 [ 39.145265] SyS_setsockopt+0x189/0x360 [ 39.149207] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 39.153931] [ 39.155619] Freed by task 2973: [ 39.158866] save_stack_trace+0x16/0x20 [ 39.162810] save_stack+0x43/0xd0 [ 39.166247] kasan_slab_free+0x71/0xc0 [ 39.170104] kfree+0xca/0x250 [ 39.173177] packet_release+0xa8f/0xd70 [ 39.177119] sock_release+0x8d/0x1e0 [ 39.180974] sock_close+0x16/0x20 [ 39.184395] __fput+0x327/0x7e0 [ 39.187650] ____fput+0x15/0x20 [ 39.190906] task_work_run+0x18a/0x260 [ 39.194762] do_exit+0xa3a/0x1b10 [ 39.198188] do_group_exit+0x149/0x400 [ 39.202046] get_signal+0x7e8/0x17e0 [ 39.205732] do_signal+0x94/0x1ee0 [ 39.209246] exit_to_usermode_loop+0x224/0x300 [ 39.213803] syscall_return_slowpath+0x3a7/0x450 [ 39.218528] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 39.223262] [ 39.224860] The buggy address belongs to the object at ffff8801d29dcd00 [ 39.224860] which belongs to the cache kmalloc-4096 of size 4096 [ 39.237698] The buggy address is located 2216 bytes inside of [ 39.237698] 4096-byte region [ffff8801d29dcd00, ffff8801d29ddd00) [ 39.249888] The buggy address belongs to the page: [ 39.254881] page:ffffea00074a7700 count:1 mapcount:0 mapping:ffff8801d29dcd00 index:0x0 compound_mapcount: 0 [ 39.264820] flags: 0x200000000008100(slab|head) [ 39.269465] raw: 0200000000008100 ffff8801d29dcd00 0000000000000000 0000000100000001 [ 39.277316] raw: ffffea00074a7820 ffff8801dac01a48 ffff8801dac00dc0 0000000000000000 [ 39.285162] page dumped because: kasan: bad access detected [ 39.290839] [ 39.292440] Memory state around the buggy address: [ 39.297336] ffff8801d29dd480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.304662] ffff8801d29dd500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.311992] >ffff8801d29dd580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.319331] ^ [ 39.325026] ffff8801d29dd600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.332364] ffff8801d29dd680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.339690] ================================================================== [ 39.347045] Disabling lock debugging due to kernel taint [ 39.352545] Kernel panic - not syncing: panic_on_warn set ... [ 39.352545] [ 39.359968] CPU: 1 PID: 2973 Comm: syz-executor0 Tainted: G B 4.13.0-rc7+ #41 [ 39.368430] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.377757] Call Trace: [ 39.380316] dump_stack+0x194/0x257 [ 39.383911] ? arch_local_irq_restore+0x53/0x53 [ 39.388550] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 39.393279] ? rcu_process_callbacks+0x66a/0x17b0 [ 39.398091] ? __dev_remove_pack+0x2b0/0x3b0 [ 39.402468] panic+0x1e4/0x417 [ 39.405628] ? __warn+0x1d9/0x1d9 [ 39.409066] ? __dev_remove_pack+0x305/0x3b0 [ 39.413449] kasan_end_report+0x50/0x50 [ 39.417396] kasan_report+0x137/0x340 [ 39.421165] __asan_report_load8_noabort+0x14/0x20 [ 39.426063] __dev_remove_pack+0x305/0x3b0 [ 39.430272] ? dev_get_by_name_rcu+0x270/0x270 [ 39.434838] ? refcount_sub_and_test+0x115/0x1b0 [ 39.439566] __unregister_prot_hook+0x211/0x280 [ 39.444204] packet_release+0x8bb/0xd70 [ 39.448155] ? packet_set_ring+0x1b70/0x1b70 [ 39.452533] ? dentry_free+0xcd/0x130 [ 39.456306] ? rcu_read_lock_sched_held+0x108/0x120 [ 39.461303] ? kmem_cache_free+0x249/0x280 [ 39.465511] ? dentry_free+0xd2/0x130 [ 39.469283] ? locks_remove_file+0x414/0x560 [ 39.473660] ? fcntl_setlk+0x10c0/0x10c0 [ 39.477691] ? __fsnotify_parent+0xb4/0x3a0 [ 39.481978] ? fsnotify+0x1af0/0x1af0 [ 39.485754] sock_release+0x8d/0x1e0 [ 39.489435] ? sock_release+0x8d/0x1e0 [ 39.493294] ? sock_release+0x1e0/0x1e0 [ 39.497253] sock_close+0x16/0x20 [ 39.500674] __fput+0x327/0x7e0 [ 39.503921] ? fput+0x140/0x140 [ 39.507168] ? check_same_owner+0x320/0x320 [ 39.511490] ? do_raw_spin_trylock+0x190/0x190 [ 39.516087] ? check_same_owner+0x320/0x320 [ 39.520393] ____fput+0x15/0x20 [ 39.523642] task_work_run+0x18a/0x260 [ 39.527498] ? task_work_cancel+0x210/0x210 [ 39.531790] ? _raw_spin_unlock+0x22/0x30 [ 39.535907] ? switch_task_namespaces+0x87/0xc0 [ 39.540550] do_exit+0xa3a/0x1b10 [ 39.543981] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 39.549232] ? plist_check_list+0xa0/0xa0 [ 39.553350] ? plist_add+0x5cb/0x760 [ 39.557035] ? mm_update_next_owner+0x930/0x930 [ 39.561675] ? plist_add+0x760/0x760 [ 39.565362] ? check_noncircular+0x20/0x20 [ 39.569575] ? check_same_owner+0x320/0x320 [ 39.573862] ? lock_acquire+0x1d5/0x580 [ 39.577811] ? futex_wait_setup+0x14a/0x3d0 [ 39.582103] ? __might_sleep+0x95/0x190 [ 39.586139] ? check_noncircular+0x20/0x20 [ 39.590343] ? futex_wait+0x43e/0xa00 [ 39.594115] ? do_raw_spin_trylock+0x190/0x190 [ 39.598681] ? fault_in_user_writeable+0x90/0x90 [ 39.603412] ? find_held_lock+0x35/0x1d0 [ 39.607446] ? get_signal+0x855/0x17e0 [ 39.611301] ? lock_downgrade+0x990/0x990 [ 39.615419] do_group_exit+0x149/0x400 [ 39.619274] ? __lock_is_held+0xb6/0x140 [ 39.623319] ? SyS_exit+0x30/0x30 [ 39.626753] ? _raw_spin_unlock_irq+0x27/0x70 [ 39.631214] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 39.636201] get_signal+0x7e8/0x17e0 [ 39.639894] ? ptrace_notify+0x130/0x130 [ 39.643919] ? lock_downgrade+0x990/0x990 [ 39.648033] ? lock_release+0xa40/0xa40 [ 39.651979] ? exit_robust_list+0x240/0x240 [ 39.656275] do_signal+0x94/0x1ee0 [ 39.659784] ? iterate_fd+0x3f0/0x3f0 [ 39.663568] ? setup_sigcontext+0x7d0/0x7d0 [ 39.667875] ? selinux_tun_dev_create+0xc0/0xc0 [ 39.672516] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 39.678194] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 39.683437] ? exit_to_usermode_loop+0x98/0x300 [ 39.688076] exit_to_usermode_loop+0x224/0x300