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-next-kasan-gce-5,10.128.0.44' (ECDSA) to the list of known hosts. 2017/09/06 16:40:06 parsed 1 programs 2017/09/06 16:40:06 executed programs: 0 syzkaller login: [ 37.921393] dev_remove_pack: ffff8801cf650a80 not found [ 37.943306] ================================================================== [ 37.950776] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 37.957504] Read of size 8 at addr ffff8801ce4d11e8 by task syz-executor0/3026 [ 37.964832] [ 37.966439] CPU: 1 PID: 3026 Comm: syz-executor0 Not tainted 4.13.0-next-20170906+ #16 [ 37.974463] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.983805] Call Trace: [ 37.986371] dump_stack+0x194/0x257 [ 37.989978] ? arch_local_irq_restore+0x53/0x53 [ 37.994623] ? show_regs_print_info+0x65/0x65 [ 37.999101] ? __dev_remove_pack+0x305/0x3b0 [ 38.003486] print_address_description+0x73/0x250 [ 38.008302] ? __dev_remove_pack+0x305/0x3b0 [ 38.012690] kasan_report+0x24e/0x340 [ 38.016470] __asan_report_load8_noabort+0x14/0x20 [ 38.021376] __dev_remove_pack+0x305/0x3b0 [ 38.025588] ? dev_get_by_name_rcu+0x270/0x270 [ 38.030148] ? refcount_sub_and_test+0x115/0x1b0 [ 38.034890] __unregister_prot_hook+0x211/0x280 [ 38.039542] packet_release+0x8bb/0xd70 [ 38.043497] ? packet_set_ring+0x1b70/0x1b70 [ 38.047882] ? dentry_free+0xcd/0x130 [ 38.051658] ? rcu_read_lock_sched_held+0x108/0x120 [ 38.056650] ? kmem_cache_free+0x249/0x280 [ 38.060861] ? dentry_free+0xd2/0x130 [ 38.064643] ? locks_remove_file+0x3fa/0x5a0 [ 38.069028] ? fcntl_setlk+0x10d0/0x10d0 [ 38.073069] ? __fsnotify_parent+0xb4/0x3a0 [ 38.077372] ? fsnotify+0x1af0/0x1af0 [ 38.081153] sock_release+0x8d/0x1e0 [ 38.084841] ? sock_release+0x8d/0x1e0 [ 38.088704] ? sock_release+0x1e0/0x1e0 [ 38.092651] sock_close+0x16/0x20 [ 38.096079] __fput+0x333/0x7f0 [ 38.099359] ? fput+0x140/0x140 [ 38.102616] ? check_same_owner+0x320/0x320 [ 38.106920] ? _raw_spin_unlock_irq+0x27/0x70 [ 38.111400] ____fput+0x15/0x20 [ 38.114657] task_work_run+0x199/0x270 [ 38.118521] ? task_work_cancel+0x210/0x210 [ 38.122817] ? _raw_spin_unlock+0x22/0x30 [ 38.126940] ? switch_task_namespaces+0x87/0xc0 [ 38.131588] do_exit+0xa52/0x1b40 [ 38.135016] ? plist_check_list+0xa0/0xa0 [ 38.139152] ? plist_del+0x47b/0x990 [ 38.142859] ? mm_update_next_owner+0x930/0x930 [ 38.147502] ? plist_add+0x760/0x760 [ 38.151200] ? check_same_owner+0x320/0x320 [ 38.155504] ? find_held_lock+0x39/0x1d0 [ 38.159549] ? check_noncircular+0x20/0x20 [ 38.163758] ? lock_downgrade+0x990/0x990 [ 38.167882] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 38.173241] ? find_held_lock+0x39/0x1d0 [ 38.177288] ? lock_downgrade+0x990/0x990 [ 38.181408] ? recalc_sigpending_tsk+0x117/0x150 [ 38.186143] ? recalc_sigpending+0x103/0x160 [ 38.190523] ? recalc_sigpending_tsk+0x150/0x150 [ 38.195250] ? get_signal+0x397/0x17e0 [ 38.199123] do_group_exit+0x149/0x400 [ 38.202986] ? __lock_is_held+0xbc/0x140 [ 38.207021] ? SyS_exit+0x30/0x30 [ 38.210448] ? _raw_spin_unlock_irq+0x27/0x70 [ 38.214932] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 38.219930] get_signal+0x7e8/0x17e0 [ 38.223651] ? ptrace_notify+0x130/0x130 [ 38.227688] ? __fget+0xbb/0x580 [ 38.231032] ? __lockdep_init_map+0xe4/0x650 [ 38.235419] ? lock_release+0xd70/0xd70 [ 38.239376] ? exit_robust_list+0x240/0x240 [ 38.243685] do_signal+0x94/0x1ee0 [ 38.247219] ? iterate_fd+0x3f0/0x3f0 [ 38.250999] ? setup_sigcontext+0x7d0/0x7d0 [ 38.255297] ? __lock_is_held+0xbc/0x140 [ 38.259365] ? __fget_light+0x29d/0x390 [ 38.263318] ? selinux_tun_dev_create+0xc0/0xc0 [ 38.267968] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 38.273652] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 38.278902] ? alloc_file+0x284/0x3a0 [ 38.282680] ? exit_to_usermode_loop+0x98/0x300 [ 38.287336] exit_to_usermode_loop+0x224/0x300 [ 38.291898] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 38.297422] syscall_return_slowpath+0x42f/0x500 [ 38.302153] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 38.307146] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 38.312069] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 38.317061] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 38.321800] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 38.326528] RIP: 0033:0x451e59 [ 38.329689] RSP: 002b:00007fa42af83cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 38.337384] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 38.344723] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 38.351968] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 38.359248] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 38.366492] R13: 00007fffe573667f R14: 00007fa42af849c0 R15: 0000000000000000 [ 38.373754] [ 38.375355] Allocated by task 3026: [ 38.378960] save_stack_trace+0x16/0x20 [ 38.382921] save_stack+0x43/0xd0 [ 38.386347] kasan_kmalloc+0xad/0xe0 [ 38.390035] kmem_cache_alloc_trace+0x136/0x750 [ 38.394682] fanout_add+0xa50/0x1190 [ 38.398367] packet_setsockopt+0xfdc/0x1e80 [ 38.402662] SyS_setsockopt+0x189/0x360 [ 38.406608] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 38.411335] [ 38.412935] Freed by task 3026: [ 38.416186] save_stack_trace+0x16/0x20 [ 38.420135] save_stack+0x43/0xd0 [ 38.423560] kasan_slab_free+0x71/0xc0 [ 38.427420] kfree+0xca/0x250 [ 38.430499] packet_release+0xa8f/0xd70 [ 38.434447] sock_release+0x8d/0x1e0 [ 38.438134] sock_close+0x16/0x20 [ 38.441573] __fput+0x333/0x7f0 [ 38.444825] ____fput+0x15/0x20 [ 38.448078] task_work_run+0x199/0x270 [ 38.451939] do_exit+0xa52/0x1b40 [ 38.455367] do_group_exit+0x149/0x400 [ 38.459228] get_signal+0x7e8/0x17e0 [ 38.462920] do_signal+0x94/0x1ee0 [ 38.466436] exit_to_usermode_loop+0x224/0x300 [ 38.470992] syscall_return_slowpath+0x42f/0x500 [ 38.475723] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 38.480451] [ 38.482053] The buggy address belongs to the object at ffff8801ce4d0940 [ 38.482053] which belongs to the cache kmalloc-4096 of size 4096 [ 38.494854] The buggy address is located 2216 bytes inside of [ 38.494854] 4096-byte region [ffff8801ce4d0940, ffff8801ce4d1940) [ 38.506875] The buggy address belongs to the page: [ 38.511797] page:ffffea0007393400 count:1 mapcount:0 mapping:ffff8801ce4d0940 index:0x0 compound_mapcount: 0 [ 38.521744] flags: 0x200000000008100(slab|head) [ 38.526391] raw: 0200000000008100 ffff8801ce4d0940 0000000000000000 0000000100000001 [ 38.534254] raw: ffffea00073d9c20 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 38.542108] page dumped because: kasan: bad access detected [ 38.547789] [ 38.549389] Memory state around the buggy address: [ 38.554290] ffff8801ce4d1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.561622] ffff8801ce4d1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.568956] >ffff8801ce4d1180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.576286] ^ [ 38.583014] ffff8801ce4d1200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.590348] ffff8801ce4d1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.597679] ================================================================== [ 38.605006] Disabling lock debugging due to kernel taint [ 38.610515] Kernel panic - not syncing: panic_on_warn set ... [ 38.610515] [ 38.617854] CPU: 1 PID: 3026 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170906+ #16 [ 38.627091] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.636414] Call Trace: [ 38.638990] dump_stack+0x194/0x257 [ 38.642587] ? arch_local_irq_restore+0x53/0x53 [ 38.647229] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 38.651955] ? __dev_remove_pack+0x2f0/0x3b0 [ 38.656343] panic+0x1e4/0x417 [ 38.659502] ? __warn+0x1d9/0x1d9 [ 38.662929] ? __dev_remove_pack+0x305/0x3b0 [ 38.667306] kasan_end_report+0x50/0x50 [ 38.671260] kasan_report+0x137/0x340 [ 38.675055] __asan_report_load8_noabort+0x14/0x20 [ 38.679972] __dev_remove_pack+0x305/0x3b0 [ 38.684206] ? dev_get_by_name_rcu+0x270/0x270 [ 38.688782] ? refcount_sub_and_test+0x115/0x1b0 [ 38.693516] __unregister_prot_hook+0x211/0x280 [ 38.698157] packet_release+0x8bb/0xd70 [ 38.702100] ? packet_set_ring+0x1b70/0x1b70 [ 38.706479] ? dentry_free+0xcd/0x130 [ 38.710249] ? rcu_read_lock_sched_held+0x108/0x120 [ 38.715243] ? kmem_cache_free+0x249/0x280 [ 38.719447] ? dentry_free+0xd2/0x130 [ 38.723220] ? locks_remove_file+0x3fa/0x5a0 [ 38.727597] ? fcntl_setlk+0x10d0/0x10d0 [ 38.731630] ? __fsnotify_parent+0xb4/0x3a0 [ 38.735917] ? fsnotify+0x1af0/0x1af0 [ 38.739691] sock_release+0x8d/0x1e0 [ 38.743376] ? sock_release+0x8d/0x1e0 [ 38.747242] ? sock_release+0x1e0/0x1e0 [ 38.751181] sock_close+0x16/0x20 [ 38.754605] __fput+0x333/0x7f0 [ 38.757861] ? fput+0x140/0x140 [ 38.761114] ? check_same_owner+0x320/0x320 [ 38.765401] ? _raw_spin_unlock_irq+0x27/0x70 [ 38.769878] ____fput+0x15/0x20 [ 38.773128] task_work_run+0x199/0x270 [ 38.776987] ? task_work_cancel+0x210/0x210 [ 38.781276] ? _raw_spin_unlock+0x22/0x30 [ 38.785394] ? switch_task_namespaces+0x87/0xc0 [ 38.790030] do_exit+0xa52/0x1b40 [ 38.793453] ? plist_check_list+0xa0/0xa0 [ 38.797573] ? plist_del+0x47b/0x990 [ 38.801252] ? mm_update_next_owner+0x930/0x930 [ 38.805887] ? plist_add+0x760/0x760 [ 38.809574] ? check_same_owner+0x320/0x320 [ 38.813869] ? find_held_lock+0x39/0x1d0 [ 38.817900] ? check_noncircular+0x20/0x20 [ 38.822101] ? lock_downgrade+0x990/0x990 [ 38.826219] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 38.831572] ? find_held_lock+0x39/0x1d0 [ 38.835607] ? lock_downgrade+0x990/0x990 [ 38.839723] ? recalc_sigpending_tsk+0x117/0x150 [ 38.844446] ? recalc_sigpending+0x103/0x160 [ 38.848822] ? recalc_sigpending_tsk+0x150/0x150 [ 38.853545] ? get_signal+0x397/0x17e0 [ 38.857406] do_group_exit+0x149/0x400 [ 38.861261] ? __lock_is_held+0xbc/0x140 [ 38.865290] ? SyS_exit+0x30/0x30 [ 38.868720] ? _raw_spin_unlock_irq+0x27/0x70 [ 38.873183] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 38.878172] get_signal+0x7e8/0x17e0 [ 38.881872] ? ptrace_notify+0x130/0x130 [ 38.885903] ? __fget+0xbb/0x580 [ 38.889242] ? __lockdep_init_map+0xe4/0x650 [ 38.893619] ? lock_release+0xd70/0xd70 [ 38.897564] ? exit_robust_list+0x240/0x240 [ 38.901862] do_signal+0x94/0x1ee0 [ 38.905383] ? iterate_fd+0x3f0/0x3f0 [ 38.909155] ? setup_sigcontext+0x7d0/0x7d0 [ 38.913457] ? __lock_is_held+0xbc/0x140 [ 38.917494] ? __fget_light+0x29d/0x390 [ 38.921558] ? selinux_tun_dev_create+0xc0/0xc0