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.16' (ECDSA) to the list of known hosts. 2017/09/05 06:26:43 parsed 1 programs 2017/09/05 06:26:43 executed programs: 0 syzkaller login: [ 32.075787] dev_remove_pack: ffff8801cc975400 not found [ 32.089361] ================================================================== [ 32.096746] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 32.103471] Read of size 8 at addr ffff8801cc156968 by task syz-executor0/3083 [ 32.110798] [ 32.112397] CPU: 1 PID: 3083 Comm: syz-executor0 Not tainted 4.13.0+ #67 [ 32.119212] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.128551] Call Trace: [ 32.131117] dump_stack+0x194/0x257 [ 32.134720] ? arch_local_irq_restore+0x53/0x53 [ 32.139377] ? show_regs_print_info+0x65/0x65 [ 32.143854] ? __dev_remove_pack+0x305/0x3b0 [ 32.148257] print_address_description+0x73/0x250 [ 32.153075] ? __dev_remove_pack+0x305/0x3b0 [ 32.157461] kasan_report+0x24e/0x340 [ 32.161242] __asan_report_load8_noabort+0x14/0x20 [ 32.166162] __dev_remove_pack+0x305/0x3b0 [ 32.170403] ? dev_get_by_name_rcu+0x270/0x270 [ 32.174962] ? refcount_sub_and_test+0x115/0x1b0 [ 32.179733] __unregister_prot_hook+0x211/0x280 [ 32.184383] packet_release+0x8bb/0xd70 [ 32.188337] ? packet_set_ring+0x1b70/0x1b70 [ 32.192723] ? dentry_free+0xcd/0x130 [ 32.196503] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.201501] ? kmem_cache_free+0x249/0x280 [ 32.205729] ? dentry_free+0xd2/0x130 [ 32.209512] ? locks_remove_file+0x414/0x560 [ 32.213945] ? fcntl_setlk+0x10d0/0x10d0 [ 32.217988] ? __fsnotify_parent+0xb4/0x3a0 [ 32.222290] ? fsnotify+0x1af0/0x1af0 [ 32.226074] sock_release+0x8d/0x1e0 [ 32.229761] ? sock_release+0x8d/0x1e0 [ 32.233623] ? sock_release+0x1e0/0x1e0 [ 32.237577] sock_close+0x16/0x20 [ 32.241010] __fput+0x333/0x7f0 [ 32.244273] ? fput+0x140/0x140 [ 32.247532] ? check_same_owner+0x320/0x320 [ 32.251828] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.256307] ____fput+0x15/0x20 [ 32.259578] task_work_run+0x199/0x270 [ 32.263457] ? task_work_cancel+0x210/0x210 [ 32.267760] ? _raw_spin_unlock+0x22/0x30 [ 32.271884] ? switch_task_namespaces+0x87/0xc0 [ 32.276550] do_exit+0xa52/0x1b40 [ 32.279978] ? plist_check_list+0xa0/0xa0 [ 32.284145] ? plist_del+0x47b/0x990 [ 32.287835] ? mm_update_next_owner+0x930/0x930 [ 32.292491] ? plist_add+0x760/0x760 [ 32.296206] ? check_same_owner+0x320/0x320 [ 32.300506] ? find_held_lock+0x39/0x1d0 [ 32.304552] ? check_noncircular+0x20/0x20 [ 32.308760] ? lock_downgrade+0x990/0x990 [ 32.312883] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.318239] ? find_held_lock+0x39/0x1d0 [ 32.322284] ? lock_downgrade+0x990/0x990 [ 32.326404] ? recalc_sigpending_tsk+0x117/0x150 [ 32.331136] ? recalc_sigpending+0x103/0x160 [ 32.335520] ? recalc_sigpending_tsk+0x150/0x150 [ 32.340248] ? get_signal+0x397/0x17e0 [ 32.344137] do_group_exit+0x149/0x400 [ 32.348011] ? __lock_is_held+0xbc/0x140 [ 32.352043] ? SyS_exit+0x30/0x30 [ 32.355488] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.359966] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.364959] get_signal+0x7e8/0x17e0 [ 32.368677] ? ptrace_notify+0x130/0x130 [ 32.372735] ? __schedule+0x8f0/0x2070 [ 32.376616] ? lock_release+0xd70/0xd70 [ 32.380575] ? exit_robust_list+0x240/0x240 [ 32.384885] do_signal+0x94/0x1ee0 [ 32.388410] ? iterate_fd+0x3f0/0x3f0 [ 32.392187] ? setup_sigcontext+0x7d0/0x7d0 [ 32.396522] ? schedule+0x108/0x440 [ 32.400175] ? __schedule+0x2070/0x2070 [ 32.404136] ? __fget_light+0x29d/0x390 [ 32.408089] ? selinux_tun_dev_create+0xc0/0xc0 [ 32.412745] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 32.418434] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 32.423690] ? exit_to_usermode_loop+0x98/0x300 [ 32.428340] exit_to_usermode_loop+0x224/0x300 [ 32.432906] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 32.438433] syscall_return_slowpath+0x42f/0x500 [ 32.443166] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 32.448162] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 32.453068] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.458064] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.462803] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.467529] RIP: 0033:0x451e59 [ 32.470702] RSP: 002b:00007eff728dccf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 32.478399] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 32.485663] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 32.492908] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 32.500153] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 32.507398] R13: 00007fff14c64edf R14: 00007eff728dd9c0 R15: 0000000000000000 [ 32.514662] [ 32.516265] Allocated by task 3083: [ 32.519872] save_stack_trace+0x16/0x20 [ 32.523835] save_stack+0x43/0xd0 [ 32.527261] kasan_kmalloc+0xad/0xe0 [ 32.530957] kmem_cache_alloc_trace+0x136/0x750 [ 32.535607] fanout_add+0xa50/0x1190 [ 32.539292] packet_setsockopt+0xfdc/0x1e80 [ 32.543586] SyS_setsockopt+0x189/0x360 [ 32.547531] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.552255] [ 32.553853] Freed by task 3083: [ 32.557106] save_stack_trace+0x16/0x20 [ 32.561056] save_stack+0x43/0xd0 [ 32.564482] kasan_slab_free+0x71/0xc0 [ 32.568357] kfree+0xca/0x250 [ 32.571434] packet_release+0xa8f/0xd70 [ 32.575380] sock_release+0x8d/0x1e0 [ 32.579064] sock_close+0x16/0x20 [ 32.582492] __fput+0x333/0x7f0 [ 32.585742] ____fput+0x15/0x20 [ 32.588994] task_work_run+0x199/0x270 [ 32.592868] do_exit+0xa52/0x1b40 [ 32.596311] do_group_exit+0x149/0x400 [ 32.600173] get_signal+0x7e8/0x17e0 [ 32.603862] do_signal+0x94/0x1ee0 [ 32.607392] exit_to_usermode_loop+0x224/0x300 [ 32.611947] syscall_return_slowpath+0x42f/0x500 [ 32.616677] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.621401] [ 32.623003] The buggy address belongs to the object at ffff8801cc1560c0 [ 32.623003] which belongs to the cache kmalloc-4096 of size 4096 [ 32.635810] The buggy address is located 2216 bytes inside of [ 32.635810] 4096-byte region [ffff8801cc1560c0, ffff8801cc1570c0) [ 32.647829] The buggy address belongs to the page: [ 32.652730] page:ffffea0007305580 count:1 mapcount:0 mapping:ffff8801cc1560c0 index:0x0 compound_mapcount: 0 [ 32.662695] flags: 0x200000000008100(slab|head) [ 32.667350] raw: 0200000000008100 ffff8801cc1560c0 0000000000000000 0000000100000001 [ 32.675233] raw: ffffea0007305520 ffffea0007305f20 ffff8801dac00dc0 0000000000000000 [ 32.683095] page dumped because: kasan: bad access detected [ 32.688793] [ 32.690391] Memory state around the buggy address: [ 32.695310] ffff8801cc156800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.702647] ffff8801cc156880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.709987] >ffff8801cc156900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.717324] ^ [ 32.724060] ffff8801cc156980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.731398] ffff8801cc156a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.738770] ================================================================== [ 32.746128] Disabling lock debugging due to kernel taint [ 32.751636] Kernel panic - not syncing: panic_on_warn set ... [ 32.751636] [ 32.758979] CPU: 1 PID: 3083 Comm: syz-executor0 Tainted: G B 4.13.0+ #67 [ 32.767019] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.776702] Call Trace: [ 32.779270] dump_stack+0x194/0x257 [ 32.782868] ? arch_local_irq_restore+0x53/0x53 [ 32.787518] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.792246] ? __dev_remove_pack+0x240/0x3b0 [ 32.796624] panic+0x1e4/0x417 [ 32.799801] ? __warn+0x1d9/0x1d9 [ 32.803248] ? __dev_remove_pack+0x305/0x3b0 [ 32.807652] kasan_end_report+0x50/0x50 [ 32.811594] kasan_report+0x137/0x340 [ 32.815365] __asan_report_load8_noabort+0x14/0x20 [ 32.820272] __dev_remove_pack+0x305/0x3b0 [ 32.824472] ? dev_get_by_name_rcu+0x270/0x270 [ 32.829024] ? refcount_sub_and_test+0x115/0x1b0 [ 32.833797] __unregister_prot_hook+0x211/0x280 [ 32.838451] packet_release+0x8bb/0xd70 [ 32.842395] ? packet_set_ring+0x1b70/0x1b70 [ 32.846787] ? dentry_free+0xcd/0x130 [ 32.850557] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.855556] ? kmem_cache_free+0x249/0x280 [ 32.859791] ? dentry_free+0xd2/0x130 [ 32.863595] ? locks_remove_file+0x414/0x560 [ 32.867970] ? fcntl_setlk+0x10d0/0x10d0 [ 32.871998] ? __fsnotify_parent+0xb4/0x3a0 [ 32.876286] ? fsnotify+0x1af0/0x1af0 [ 32.880060] sock_release+0x8d/0x1e0 [ 32.883745] ? sock_release+0x8d/0x1e0 [ 32.887602] ? sock_release+0x1e0/0x1e0 [ 32.891543] sock_close+0x16/0x20 [ 32.894976] __fput+0x333/0x7f0 [ 32.898227] ? fput+0x140/0x140 [ 32.901475] ? check_same_owner+0x320/0x320 [ 32.905764] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.910232] ____fput+0x15/0x20 [ 32.913481] task_work_run+0x199/0x270 [ 32.917336] ? task_work_cancel+0x210/0x210 [ 32.921628] ? _raw_spin_unlock+0x22/0x30 [ 32.925756] ? switch_task_namespaces+0x87/0xc0 [ 32.930398] do_exit+0xa52/0x1b40 [ 32.933820] ? plist_check_list+0xa0/0xa0 [ 32.937977] ? plist_del+0x47b/0x990 [ 32.941661] ? mm_update_next_owner+0x930/0x930 [ 32.946301] ? plist_add+0x760/0x760 [ 32.949991] ? check_same_owner+0x320/0x320 [ 32.954284] ? find_held_lock+0x39/0x1d0 [ 32.958322] ? check_noncircular+0x20/0x20 [ 32.962525] ? lock_downgrade+0x990/0x990 [ 32.966657] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.971996] ? find_held_lock+0x39/0x1d0 [ 32.976044] ? lock_downgrade+0x990/0x990 [ 32.980158] ? recalc_sigpending_tsk+0x117/0x150 [ 32.984879] ? recalc_sigpending+0x103/0x160 [ 32.989253] ? recalc_sigpending_tsk+0x150/0x150 [ 32.993974] ? get_signal+0x397/0x17e0 [ 32.997833] do_group_exit+0x149/0x400 [ 33.001688] ? __lock_is_held+0xbc/0x140 [ 33.005715] ? SyS_exit+0x30/0x30 [ 33.009176] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.013652] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.018643] get_signal+0x7e8/0x17e0 [ 33.022337] ? ptrace_notify+0x130/0x130 [ 33.026367] ? __schedule+0x8f0/0x2070 [ 33.030234] ? lock_release+0xd70/0xd70 [ 33.034186] ? exit_robust_list+0x240/0x240 [ 33.038487] do_signal+0x94/0x1ee0 [ 33.041999] ? iterate_fd+0x3f0/0x3f0 [ 33.045767] ? setup_sigcontext+0x7d0/0x7d0 [ 33.050060] ? schedule+0x108/0x440 [ 33.053663] ? __schedule+0x2070/0x2070 [ 33.057609] ? __fget_light+0x29d/0x390 [ 33.061554] ? selinux_tun_dev_create+0xc0/0xc0 [ 33.066194] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 33.071874] ? selinux_netlbl_sock_rcv_skb+0x730/0x730