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-9,10.128.0.8' (ECDSA) to the list of known hosts. 2017/09/21 16:39:36 parsed 1 programs 2017/09/21 16:39:36 executed programs: 0 syzkaller login: [ 34.181849] dev_remove_pack: ffff8801cc21c9c0 not found [ 34.201311] ================================================================== [ 34.208701] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 34.215421] Read of size 8 at addr ffff8801cbe94e68 by task syz-executor0/3109 [ 34.222747] [ 34.224347] CPU: 0 PID: 3109 Comm: syz-executor0 Not tainted 4.14.0-rc1+ #94 [ 34.231499] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.240849] Call Trace: [ 34.243409] dump_stack+0x194/0x257 [ 34.247011] ? arch_local_irq_restore+0x53/0x53 [ 34.251649] ? show_regs_print_info+0x65/0x65 [ 34.256121] ? __dev_remove_pack+0x305/0x3b0 [ 34.260501] print_address_description+0x73/0x250 [ 34.265313] ? __dev_remove_pack+0x305/0x3b0 [ 34.269692] kasan_report+0x24e/0x340 [ 34.273467] __asan_report_load8_noabort+0x14/0x20 [ 34.278367] __dev_remove_pack+0x305/0x3b0 [ 34.282575] ? dev_get_by_name_rcu+0x270/0x270 [ 34.287133] ? refcount_sub_and_test+0x115/0x1b0 [ 34.291868] __unregister_prot_hook+0x211/0x280 [ 34.296512] packet_release+0x8bb/0xd70 [ 34.300462] ? packet_set_ring+0x1b70/0x1b70 [ 34.304843] ? dentry_free+0xcd/0x130 [ 34.308616] ? rcu_read_lock_sched_held+0x108/0x120 [ 34.313602] ? kmem_cache_free+0x249/0x280 [ 34.317812] ? dentry_free+0xd2/0x130 [ 34.321602] ? locks_remove_file+0x3fa/0x5a0 [ 34.325987] ? fcntl_setlk+0x10d0/0x10d0 [ 34.330022] ? __fsnotify_parent+0xb4/0x3a0 [ 34.334317] ? fsnotify+0x1af0/0x1af0 [ 34.338094] sock_release+0x8d/0x1e0 [ 34.341778] ? sock_release+0x8d/0x1e0 [ 34.345648] ? sock_release+0x1e0/0x1e0 [ 34.349593] sock_close+0x16/0x20 [ 34.353017] __fput+0x333/0x7f0 [ 34.356274] ? fput+0x140/0x140 [ 34.359526] ? check_same_owner+0x320/0x320 [ 34.363822] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.368295] ____fput+0x15/0x20 [ 34.371545] task_work_run+0x199/0x270 [ 34.375407] ? task_work_cancel+0x210/0x210 [ 34.379701] ? _raw_spin_unlock+0x22/0x30 [ 34.383821] ? switch_task_namespaces+0x87/0xc0 [ 34.388466] do_exit+0xa52/0x1b40 [ 34.391889] ? plist_check_list+0xa0/0xa0 [ 34.396018] ? plist_del+0x47b/0x990 [ 34.399704] ? mm_update_next_owner+0x930/0x930 [ 34.404345] ? plist_add+0x760/0x760 [ 34.408043] ? check_same_owner+0x320/0x320 [ 34.412340] ? find_held_lock+0x39/0x1d0 [ 34.416379] ? check_noncircular+0x20/0x20 [ 34.420585] ? lock_downgrade+0x990/0x990 [ 34.424705] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 34.430058] ? find_held_lock+0x39/0x1d0 [ 34.434099] ? lock_downgrade+0x990/0x990 [ 34.438218] ? recalc_sigpending_tsk+0x117/0x150 [ 34.442946] ? recalc_sigpending+0x103/0x160 [ 34.447326] ? recalc_sigpending_tsk+0x150/0x150 [ 34.452050] ? get_signal+0x397/0x17e0 [ 34.455920] do_group_exit+0x149/0x400 [ 34.459779] ? __lock_is_held+0xbc/0x140 [ 34.463815] ? SyS_exit+0x30/0x30 [ 34.467239] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.471705] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.476698] get_signal+0x7e8/0x17e0 [ 34.480410] ? ptrace_notify+0x130/0x130 [ 34.484441] ? __fget+0xbb/0x580 [ 34.487779] ? __lockdep_init_map+0xe4/0x650 [ 34.492165] ? lock_release+0xd70/0xd70 [ 34.496116] ? exit_robust_list+0x240/0x240 [ 34.500422] do_signal+0x94/0x1ee0 [ 34.503938] ? iterate_fd+0x3f0/0x3f0 [ 34.507711] ? setup_sigcontext+0x7d0/0x7d0 [ 34.512004] ? __lock_is_held+0xbc/0x140 [ 34.516049] ? __fget_light+0x29d/0x390 [ 34.519998] ? selinux_tun_dev_create+0xc0/0xc0 [ 34.524639] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 34.530319] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 34.535564] ? alloc_file+0x284/0x3a0 [ 34.539333] ? exit_to_usermode_loop+0x98/0x300 [ 34.543978] exit_to_usermode_loop+0x224/0x300 [ 34.548533] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 34.554053] syscall_return_slowpath+0x42f/0x500 [ 34.558797] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 34.563785] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 34.568692] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.573683] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 34.578417] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 34.583144] RIP: 0033:0x4520a9 [ 34.586306] RSP: 002b:00007ff793491cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 34.593985] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 00000000004520a9 [ 34.601225] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 34.608464] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 34.615703] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 34.622943] R13: 00007fff25f9157f R14: 00007ff7934929c0 R15: 0000000000000002 [ 34.630200] [ 34.631798] Allocated by task 3108: [ 34.635394] save_stack_trace+0x16/0x20 [ 34.639337] save_stack+0x43/0xd0 [ 34.642768] kasan_kmalloc+0xad/0xe0 [ 34.646456] kmem_cache_alloc_trace+0x136/0x750 [ 34.651093] fanout_add+0xa50/0x1190 [ 34.654775] packet_setsockopt+0xfdc/0x1e80 [ 34.659067] SyS_setsockopt+0x189/0x360 [ 34.663019] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.667741] [ 34.669338] Freed by task 3109: [ 34.672585] save_stack_trace+0x16/0x20 [ 34.676528] save_stack+0x43/0xd0 [ 34.679950] kasan_slab_free+0x71/0xc0 [ 34.683807] kfree+0xca/0x250 [ 34.686883] packet_release+0xa8f/0xd70 [ 34.690825] sock_release+0x8d/0x1e0 [ 34.694507] sock_close+0x16/0x20 [ 34.697929] __fput+0x333/0x7f0 [ 34.701176] ____fput+0x15/0x20 [ 34.704431] task_work_run+0x199/0x270 [ 34.708287] do_exit+0xa52/0x1b40 [ 34.711709] do_group_exit+0x149/0x400 [ 34.715565] get_signal+0x7e8/0x17e0 [ 34.719247] do_signal+0x94/0x1ee0 [ 34.722759] exit_to_usermode_loop+0x224/0x300 [ 34.727312] syscall_return_slowpath+0x42f/0x500 [ 34.732035] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 34.736758] [ 34.738358] The buggy address belongs to the object at ffff8801cbe945c0 [ 34.738358] which belongs to the cache kmalloc-4096 of size 4096 [ 34.751154] The buggy address is located 2216 bytes inside of [ 34.751154] 4096-byte region [ffff8801cbe945c0, ffff8801cbe955c0) [ 34.763169] The buggy address belongs to the page: [ 34.768069] page:ffffea00072fa500 count:1 mapcount:0 mapping:ffff8801cbe945c0 index:0x0 compound_mapcount: 0 [ 34.778010] flags: 0x200000000008100(slab|head) [ 34.782648] raw: 0200000000008100 ffff8801cbe945c0 0000000000000000 0000000100000001 [ 34.790497] raw: ffffea00072faea0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 34.798343] page dumped because: kasan: bad access detected [ 34.804019] [ 34.805615] Memory state around the buggy address: [ 34.810524] ffff8801cbe94d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.817853] ffff8801cbe94d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.825180] >ffff8801cbe94e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.832506] ^ [ 34.839227] ffff8801cbe94e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.846738] ffff8801cbe94f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.854070] ================================================================== [ 34.861421] Disabling lock debugging due to kernel taint [ 34.866931] Kernel panic - not syncing: panic_on_warn set ... [ 34.866931] [ 34.874267] CPU: 0 PID: 3109 Comm: syz-executor0 Tainted: G B 4.14.0-rc1+ #94 [ 34.882634] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.891953] Call Trace: [ 34.894512] dump_stack+0x194/0x257 [ 34.898109] ? arch_local_irq_restore+0x53/0x53 [ 34.902896] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 34.907625] ? __dev_remove_pack+0x2e0/0x3b0 [ 34.912017] panic+0x1e4/0x417 [ 34.915184] ? __warn+0x1d9/0x1d9 [ 34.918614] ? __dev_remove_pack+0x305/0x3b0 [ 34.922991] kasan_end_report+0x50/0x50 [ 34.926939] kasan_report+0x137/0x340 [ 34.930708] __asan_report_load8_noabort+0x14/0x20 [ 34.935608] __dev_remove_pack+0x305/0x3b0 [ 34.939810] ? dev_get_by_name_rcu+0x270/0x270 [ 34.944361] ? refcount_sub_and_test+0x115/0x1b0 [ 34.949090] __unregister_prot_hook+0x211/0x280 [ 34.953730] packet_release+0x8bb/0xd70 [ 34.957671] ? packet_set_ring+0x1b70/0x1b70 [ 34.962046] ? dentry_free+0xcd/0x130 [ 34.965812] ? rcu_read_lock_sched_held+0x108/0x120 [ 34.970797] ? kmem_cache_free+0x249/0x280 [ 34.974998] ? dentry_free+0xd2/0x130 [ 34.978766] ? locks_remove_file+0x3fa/0x5a0 [ 34.983143] ? fcntl_setlk+0x10d0/0x10d0 [ 34.987172] ? __fsnotify_parent+0xb4/0x3a0 [ 34.991459] ? fsnotify+0x1af0/0x1af0 [ 34.995230] sock_release+0x8d/0x1e0 [ 34.998909] ? sock_release+0x8d/0x1e0 [ 35.002760] ? sock_release+0x1e0/0x1e0 [ 35.006700] sock_close+0x16/0x20 [ 35.010121] __fput+0x333/0x7f0 [ 35.013382] ? fput+0x140/0x140 [ 35.016631] ? check_same_owner+0x320/0x320 [ 35.020918] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.025380] ____fput+0x15/0x20 [ 35.028625] task_work_run+0x199/0x270 [ 35.032478] ? task_work_cancel+0x210/0x210 [ 35.036765] ? _raw_spin_unlock+0x22/0x30 [ 35.040879] ? switch_task_namespaces+0x87/0xc0 [ 35.045517] do_exit+0xa52/0x1b40 [ 35.048935] ? plist_check_list+0xa0/0xa0 [ 35.053053] ? plist_del+0x47b/0x990 [ 35.056735] ? mm_update_next_owner+0x930/0x930 [ 35.061372] ? plist_add+0x760/0x760 [ 35.065055] ? check_same_owner+0x320/0x320 [ 35.069345] ? find_held_lock+0x39/0x1d0 [ 35.073374] ? check_noncircular+0x20/0x20 [ 35.077575] ? lock_downgrade+0x990/0x990 [ 35.081699] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 35.087041] ? find_held_lock+0x39/0x1d0 [ 35.091075] ? lock_downgrade+0x990/0x990 [ 35.095187] ? recalc_sigpending_tsk+0x117/0x150 [ 35.099909] ? recalc_sigpending+0x103/0x160 [ 35.104316] ? recalc_sigpending_tsk+0x150/0x150 [ 35.109036] ? get_signal+0x397/0x17e0 [ 35.112892] do_group_exit+0x149/0x400 [ 35.116743] ? __lock_is_held+0xbc/0x140 [ 35.120770] ? SyS_exit+0x30/0x30 [ 35.124189] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.128649] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.133632] get_signal+0x7e8/0x17e0 [ 35.137410] ? ptrace_notify+0x130/0x130 [ 35.141436] ? __fget+0xbb/0x580 [ 35.144767] ? __lockdep_init_map+0xe4/0x650 [ 35.149141] ? lock_release+0xd70/0xd70 [ 35.153082] ? exit_robust_list+0x240/0x240 [ 35.157374] do_signal+0x94/0x1ee0 [ 35.160881] ? iterate_fd+0x3f0/0x3f0 [ 35.164647] ? setup_sigcontext+0x7d0/0x7d0 [ 35.168935] ? __lock_is_held+0xbc/0x140 [ 35.172968] ? __fget_light+0x29d/0x390 [ 35.176910] ? selinux_tun_dev_create+0xc0/0xc0