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-8,10.128.0.17' (ECDSA) to the list of known hosts. 2017/09/08 09:42:05 parsed 1 programs 2017/09/08 09:42:05 executed programs: 0 syzkaller login: [ 45.213116] dev_remove_pack: ffff8801cdf718c0 not found [ 45.229334] ================================================================== [ 45.236735] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 45.243482] Read of size 8 at addr ffff8801cc8b6fa8 by task syz-executor0/3140 [ 45.250834] [ 45.252454] CPU: 0 PID: 3140 Comm: syz-executor0 Not tainted 4.13.0+ #73 [ 45.259270] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.268600] Call Trace: [ 45.271168] dump_stack+0x194/0x257 [ 45.274773] ? arch_local_irq_restore+0x53/0x53 [ 45.279417] ? show_regs_print_info+0x65/0x65 [ 45.283902] ? __dev_remove_pack+0x305/0x3b0 [ 45.288291] print_address_description+0x73/0x250 [ 45.293113] ? __dev_remove_pack+0x305/0x3b0 [ 45.297496] kasan_report+0x24e/0x340 [ 45.301277] __asan_report_load8_noabort+0x14/0x20 [ 45.306185] __dev_remove_pack+0x305/0x3b0 [ 45.310404] ? dev_get_by_name_rcu+0x270/0x270 [ 45.314965] ? refcount_sub_and_test+0x115/0x1b0 [ 45.319711] __unregister_prot_hook+0x211/0x280 [ 45.324366] packet_release+0x8bb/0xd70 [ 45.328334] ? packet_set_ring+0x1b70/0x1b70 [ 45.332727] ? dentry_free+0xcd/0x130 [ 45.336507] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.341499] ? kmem_cache_free+0x249/0x280 [ 45.345711] ? dentry_free+0xd2/0x130 [ 45.349492] ? locks_remove_file+0x3fa/0x5a0 [ 45.353875] ? fcntl_setlk+0x10d0/0x10d0 [ 45.357912] ? __fsnotify_parent+0xb4/0x3a0 [ 45.362208] ? fsnotify+0x1af0/0x1af0 [ 45.365991] sock_release+0x8d/0x1e0 [ 45.369687] ? sock_release+0x8d/0x1e0 [ 45.373562] ? sock_release+0x1e0/0x1e0 [ 45.377511] sock_close+0x16/0x20 [ 45.380942] __fput+0x333/0x7f0 [ 45.384202] ? fput+0x140/0x140 [ 45.387455] ? check_same_owner+0x320/0x320 [ 45.391747] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.396224] ____fput+0x15/0x20 [ 45.399484] task_work_run+0x199/0x270 [ 45.403356] ? task_work_cancel+0x210/0x210 [ 45.407685] ? _raw_spin_unlock+0x22/0x30 [ 45.411806] ? switch_task_namespaces+0x87/0xc0 [ 45.416456] do_exit+0xa52/0x1b40 [ 45.419888] ? plist_check_list+0xa0/0xa0 [ 45.424030] ? plist_del+0x47b/0x990 [ 45.427724] ? mm_update_next_owner+0x930/0x930 [ 45.432382] ? plist_add+0x760/0x760 [ 45.436094] ? check_same_owner+0x320/0x320 [ 45.440403] ? find_held_lock+0x39/0x1d0 [ 45.444447] ? check_noncircular+0x20/0x20 [ 45.448657] ? lock_downgrade+0x990/0x990 [ 45.452784] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 45.458150] ? find_held_lock+0x39/0x1d0 [ 45.462198] ? lock_downgrade+0x990/0x990 [ 45.466328] ? recalc_sigpending_tsk+0x117/0x150 [ 45.471068] ? recalc_sigpending+0x103/0x160 [ 45.475452] ? recalc_sigpending_tsk+0x150/0x150 [ 45.480185] ? get_signal+0x397/0x17e0 [ 45.484065] do_group_exit+0x149/0x400 [ 45.487927] ? __lock_is_held+0xbc/0x140 [ 45.491961] ? SyS_exit+0x30/0x30 [ 45.495389] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.499858] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.504851] get_signal+0x7e8/0x17e0 [ 45.508569] ? ptrace_notify+0x130/0x130 [ 45.512604] ? __fget+0xbb/0x580 [ 45.515950] ? __lockdep_init_map+0xe4/0x650 [ 45.520337] ? lock_release+0xd70/0xd70 [ 45.524294] ? exit_robust_list+0x240/0x240 [ 45.528607] do_signal+0x94/0x1ee0 [ 45.532131] ? iterate_fd+0x3f0/0x3f0 [ 45.535911] ? setup_sigcontext+0x7d0/0x7d0 [ 45.540210] ? __lock_is_held+0xbc/0x140 [ 45.544265] ? __fget_light+0x29d/0x390 [ 45.548219] ? selinux_tun_dev_create+0xc0/0xc0 [ 45.552866] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 45.558564] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 45.563814] ? alloc_file+0x284/0x3a0 [ 45.567590] ? exit_to_usermode_loop+0x98/0x300 [ 45.572238] exit_to_usermode_loop+0x224/0x300 [ 45.576800] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 45.582326] syscall_return_slowpath+0x42f/0x500 [ 45.587066] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 45.592060] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 45.596974] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.601966] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.606707] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 45.611433] RIP: 0033:0x451e59 [ 45.614593] RSP: 002b:00007fed121dccf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 45.622278] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 45.629523] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 45.636769] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 45.644025] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 45.651291] R13: 00007ffd5adb2fbf R14: 00007fed121dd9c0 R15: 0000000000000004 [ 45.658567] [ 45.660173] Allocated by task 3140: [ 45.663783] save_stack_trace+0x16/0x20 [ 45.667737] save_stack+0x43/0xd0 [ 45.671173] kasan_kmalloc+0xad/0xe0 [ 45.674862] kmem_cache_alloc_trace+0x136/0x750 [ 45.679512] fanout_add+0xa50/0x1190 [ 45.683203] packet_setsockopt+0xfdc/0x1e80 [ 45.687501] SyS_setsockopt+0x189/0x360 [ 45.691452] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 45.696189] [ 45.697793] Freed by task 3140: [ 45.701056] save_stack_trace+0x16/0x20 [ 45.705017] save_stack+0x43/0xd0 [ 45.708453] kasan_slab_free+0x71/0xc0 [ 45.712323] kfree+0xca/0x250 [ 45.715412] packet_release+0xa8f/0xd70 [ 45.719369] sock_release+0x8d/0x1e0 [ 45.723070] sock_close+0x16/0x20 [ 45.726508] __fput+0x333/0x7f0 [ 45.729767] ____fput+0x15/0x20 [ 45.733026] task_work_run+0x199/0x270 [ 45.736919] do_exit+0xa52/0x1b40 [ 45.740379] do_group_exit+0x149/0x400 [ 45.744251] get_signal+0x7e8/0x17e0 [ 45.747957] do_signal+0x94/0x1ee0 [ 45.751480] exit_to_usermode_loop+0x224/0x300 [ 45.756071] syscall_return_slowpath+0x42f/0x500 [ 45.760823] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 45.765567] [ 45.767172] The buggy address belongs to the object at ffff8801cc8b6700 [ 45.767172] which belongs to the cache kmalloc-4096 of size 4096 [ 45.780002] The buggy address is located 2216 bytes inside of [ 45.780002] 4096-byte region [ffff8801cc8b6700, ffff8801cc8b7700) [ 45.792063] The buggy address belongs to the page: [ 45.796982] page:ffffea0007322d80 count:1 mapcount:0 mapping:ffff8801cc8b6700 index:0x0 compound_mapcount: 0 [ 45.806955] flags: 0x200000000008100(slab|head) [ 45.811612] raw: 0200000000008100 ffff8801cc8b6700 0000000000000000 0000000100000001 [ 45.819482] raw: ffffea0007322d20 ffffea0007322b20 ffff8801dac00dc0 0000000000000000 [ 45.827366] page dumped because: kasan: bad access detected [ 45.833073] [ 45.834681] Memory state around the buggy address: [ 45.839850] ffff8801cc8b6e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.847189] ffff8801cc8b6f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.854525] >ffff8801cc8b6f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.861859] ^ [ 45.866504] ffff8801cc8b7000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.873846] ffff8801cc8b7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.881199] ================================================================== [ 45.888566] Disabling lock debugging due to kernel taint [ 45.894080] Kernel panic - not syncing: panic_on_warn set ... [ 45.894080] [ 45.901431] CPU: 0 PID: 3140 Comm: syz-executor0 Tainted: G B 4.13.0+ #73 [ 45.909454] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.918789] Call Trace: [ 45.921356] dump_stack+0x194/0x257 [ 45.924961] ? arch_local_irq_restore+0x53/0x53 [ 45.929598] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.934325] ? __dev_remove_pack+0x230/0x3b0 [ 45.938703] panic+0x1e4/0x417 [ 45.941863] ? __warn+0x1d9/0x1d9 [ 45.945294] ? __dev_remove_pack+0x305/0x3b0 [ 45.949674] kasan_end_report+0x50/0x50 [ 45.953625] kasan_report+0x137/0x340 [ 45.957401] __asan_report_load8_noabort+0x14/0x20 [ 45.962299] __dev_remove_pack+0x305/0x3b0 [ 45.966504] ? dev_get_by_name_rcu+0x270/0x270 [ 45.971067] ? refcount_sub_and_test+0x115/0x1b0 [ 45.975804] __unregister_prot_hook+0x211/0x280 [ 45.980452] packet_release+0x8bb/0xd70 [ 45.984401] ? packet_set_ring+0x1b70/0x1b70 [ 45.988777] ? dentry_free+0xcd/0x130 [ 45.992550] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.997536] ? kmem_cache_free+0x249/0x280 [ 46.001744] ? dentry_free+0xd2/0x130 [ 46.005516] ? locks_remove_file+0x3fa/0x5a0 [ 46.009895] ? fcntl_setlk+0x10d0/0x10d0 [ 46.013929] ? __fsnotify_parent+0xb4/0x3a0 [ 46.018228] ? fsnotify+0x1af0/0x1af0 [ 46.022018] sock_release+0x8d/0x1e0 [ 46.025705] ? sock_release+0x8d/0x1e0 [ 46.029565] ? sock_release+0x1e0/0x1e0 [ 46.033511] sock_close+0x16/0x20 [ 46.036942] __fput+0x333/0x7f0 [ 46.040208] ? fput+0x140/0x140 [ 46.043462] ? check_same_owner+0x320/0x320 [ 46.047757] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.052229] ____fput+0x15/0x20 [ 46.055481] task_work_run+0x199/0x270 [ 46.059341] ? task_work_cancel+0x210/0x210 [ 46.063635] ? _raw_spin_unlock+0x22/0x30 [ 46.067760] ? switch_task_namespaces+0x87/0xc0 [ 46.072410] do_exit+0xa52/0x1b40 [ 46.075839] ? plist_check_list+0xa0/0xa0 [ 46.079974] ? plist_del+0x47b/0x990 [ 46.083664] ? mm_update_next_owner+0x930/0x930 [ 46.088310] ? plist_add+0x760/0x760 [ 46.092006] ? check_same_owner+0x320/0x320 [ 46.096394] ? find_held_lock+0x39/0x1d0 [ 46.100436] ? check_noncircular+0x20/0x20 [ 46.104646] ? lock_downgrade+0x990/0x990 [ 46.108778] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 46.114134] ? find_held_lock+0x39/0x1d0 [ 46.118178] ? lock_downgrade+0x990/0x990 [ 46.122318] ? recalc_sigpending_tsk+0x117/0x150 [ 46.127067] ? recalc_sigpending+0x103/0x160 [ 46.131471] ? recalc_sigpending_tsk+0x150/0x150 [ 46.136211] ? get_signal+0x397/0x17e0 [ 46.140077] do_group_exit+0x149/0x400 [ 46.143940] ? __lock_is_held+0xbc/0x140 [ 46.147970] ? SyS_exit+0x30/0x30 [ 46.151394] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.155863] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.160853] get_signal+0x7e8/0x17e0 [ 46.164553] ? ptrace_notify+0x130/0x130 [ 46.168581] ? __fget+0xbb/0x580 [ 46.171915] ? __lockdep_init_map+0xe4/0x650 [ 46.176297] ? lock_release+0xd70/0xd70 [ 46.180246] ? exit_robust_list+0x240/0x240 [ 46.184545] do_signal+0x94/0x1ee0 [ 46.188063] ? iterate_fd+0x3f0/0x3f0 [ 46.191839] ? setup_sigcontext+0x7d0/0x7d0 [ 46.196136] ? __lock_is_held+0xbc/0x140 [ 46.200174] ? __fget_light+0x29d/0x390 [ 46.204121] ? selinux_tun_dev_create+0xc0/0xc0 [ 46.208757] ? selinux_netlbl_socket_setsockopt+0x10c/0x460