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.15.201' (ECDSA) to the list of known hosts. 2017/09/07 06:23:12 parsed 1 programs 2017/09/07 06:23:12 executed programs: 0 syzkaller login: [ 31.191888] dev_remove_pack: ffff8801cfa4abc0 not found [ 31.209298] ================================================================== [ 31.217325] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 31.224057] Read of size 8 at addr ffff8801cf5a2ea8 by task syz-executor0/3006 [ 31.231390] [ 31.233987] CPU: 1 PID: 3006 Comm: syz-executor0 Not tainted 4.13.0+ #42 [ 31.241238] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.250963] Call Trace: [ 31.253550] dump_stack+0x194/0x257 [ 31.257183] ? arch_local_irq_restore+0x53/0x53 [ 31.261849] ? show_regs_print_info+0x65/0x65 [ 31.266351] ? __dev_remove_pack+0x305/0x3b0 [ 31.270760] print_address_description+0x73/0x250 [ 31.275816] ? __dev_remove_pack+0x305/0x3b0 [ 31.280232] kasan_report+0x24e/0x340 [ 31.284032] __asan_report_load8_noabort+0x14/0x20 [ 31.288951] __dev_remove_pack+0x305/0x3b0 [ 31.293179] ? dev_get_by_name_rcu+0x270/0x270 [ 31.297753] ? refcount_sub_and_test+0x115/0x1b0 [ 31.302517] __unregister_prot_hook+0x211/0x280 [ 31.307196] packet_release+0x8bb/0xd70 [ 31.311173] ? packet_set_ring+0x1b70/0x1b70 [ 31.315580] ? dentry_free+0xcd/0x130 [ 31.319376] ? rcu_read_lock_sched_held+0x108/0x120 [ 31.324398] ? kmem_cache_free+0x249/0x280 [ 31.328634] ? dentry_free+0xd2/0x130 [ 31.332437] ? locks_remove_file+0x3fa/0x5a0 [ 31.336839] ? fcntl_setlk+0x10d0/0x10d0 [ 31.340900] ? __fsnotify_parent+0xb4/0x3a0 [ 31.345222] ? fsnotify+0x1af0/0x1af0 [ 31.349026] sock_release+0x8d/0x1e0 [ 31.352729] ? sock_release+0x8d/0x1e0 [ 31.356607] ? sock_release+0x1e0/0x1e0 [ 31.360580] sock_close+0x16/0x20 [ 31.364029] __fput+0x333/0x7f0 [ 31.367307] ? fput+0x140/0x140 [ 31.370577] ? check_same_owner+0x320/0x320 [ 31.374895] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.379394] ____fput+0x15/0x20 [ 31.382668] task_work_run+0x199/0x270 [ 31.386552] ? task_work_cancel+0x210/0x210 [ 31.390866] ? _raw_spin_unlock+0x22/0x30 [ 31.395006] ? switch_task_namespaces+0x87/0xc0 [ 31.399671] do_exit+0xa52/0x1b40 [ 31.403115] ? plist_check_list+0xa0/0xa0 [ 31.407271] ? plist_del+0x47b/0x990 [ 31.410973] ? mm_update_next_owner+0x930/0x930 [ 31.415630] ? plist_add+0x760/0x760 [ 31.419355] ? check_same_owner+0x320/0x320 [ 31.423677] ? find_held_lock+0x39/0x1d0 [ 31.427754] ? check_noncircular+0x20/0x20 [ 31.431985] ? lock_downgrade+0x990/0x990 [ 31.436126] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 31.441616] ? find_held_lock+0x39/0x1d0 [ 31.445694] ? lock_downgrade+0x990/0x990 [ 31.449833] ? recalc_sigpending_tsk+0x117/0x150 [ 31.454582] ? recalc_sigpending+0x103/0x160 [ 31.458983] ? recalc_sigpending_tsk+0x150/0x150 [ 31.463730] ? get_signal+0x397/0x17e0 [ 31.467628] do_group_exit+0x149/0x400 [ 31.471508] ? __lock_is_held+0xbc/0x140 [ 31.475564] ? SyS_exit+0x30/0x30 [ 31.479012] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.483507] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.488527] get_signal+0x7e8/0x17e0 [ 31.492280] ? ptrace_notify+0x130/0x130 [ 31.496329] ? __fget+0xbb/0x580 [ 31.499685] ? __lockdep_init_map+0xe4/0x650 [ 31.504089] ? lock_release+0xd70/0xd70 [ 31.508063] ? exit_robust_list+0x240/0x240 [ 31.512394] do_signal+0x94/0x1ee0 [ 31.515930] ? iterate_fd+0x3f0/0x3f0 [ 31.519728] ? setup_sigcontext+0x7d0/0x7d0 [ 31.524047] ? __lock_is_held+0xbc/0x140 [ 31.528203] ? __fget_light+0x29d/0x390 [ 31.532169] ? selinux_tun_dev_create+0xc0/0xc0 [ 31.536832] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 31.542541] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 31.547808] ? alloc_file+0x284/0x3a0 [ 31.551604] ? exit_to_usermode_loop+0x98/0x300 [ 31.556370] exit_to_usermode_loop+0x224/0x300 [ 31.560960] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 31.566686] syscall_return_slowpath+0x42f/0x500 [ 31.571436] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 31.576455] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 31.581487] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.586496] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.591257] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 31.595998] RIP: 0033:0x451e59 [ 31.599172] RSP: 002b:00007f458ed25cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 31.606885] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 31.614145] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 31.621407] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 31.628687] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 31.635948] R13: 00007ffddae3478f R14: 00007f458ed269c0 R15: 0000000000000000 [ 31.644253] [ 31.645856] Allocated by task 3006: [ 31.649459] save_stack_trace+0x16/0x20 [ 31.653662] save_stack+0x43/0xd0 [ 31.657105] kasan_kmalloc+0xad/0xe0 [ 31.660795] kmem_cache_alloc_trace+0x136/0x750 [ 31.665445] fanout_add+0xa50/0x1190 [ 31.669129] packet_setsockopt+0xfdc/0x1e80 [ 31.673432] SyS_setsockopt+0x189/0x360 [ 31.677399] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 31.682130] [ 31.683743] Freed by task 3006: [ 31.687011] save_stack_trace+0x16/0x20 [ 31.690972] save_stack+0x43/0xd0 [ 31.694401] kasan_slab_free+0x71/0xc0 [ 31.698271] kfree+0xca/0x250 [ 31.701356] packet_release+0xa8f/0xd70 [ 31.705328] sock_release+0x8d/0x1e0 [ 31.709024] sock_close+0x16/0x20 [ 31.712460] __fput+0x333/0x7f0 [ 31.715714] ____fput+0x15/0x20 [ 31.718978] task_work_run+0x199/0x270 [ 31.722837] do_exit+0xa52/0x1b40 [ 31.726268] do_group_exit+0x149/0x400 [ 31.730135] get_signal+0x7e8/0x17e0 [ 31.733842] do_signal+0x94/0x1ee0 [ 31.737376] exit_to_usermode_loop+0x224/0x300 [ 31.741956] syscall_return_slowpath+0x42f/0x500 [ 31.746693] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 31.751443] [ 31.753061] The buggy address belongs to the object at ffff8801cf5a2600 [ 31.753061] which belongs to the cache kmalloc-4096 of size 4096 [ 31.765875] The buggy address is located 2216 bytes inside of [ 31.765875] 4096-byte region [ffff8801cf5a2600, ffff8801cf5a3600) [ 31.777900] The buggy address belongs to the page: [ 31.782802] page:ffffea00073d6880 count:1 mapcount:0 mapping:ffff8801cf5a2600 index:0x0 compound_mapcount: 0 [ 31.792751] flags: 0x200000000008100(slab|head) [ 31.798347] raw: 0200000000008100 ffff8801cf5a2600 0000000000000000 0000000100000001 [ 31.806219] raw: ffffea00073b1fa0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 31.814089] page dumped because: kasan: bad access detected [ 31.820224] [ 31.821831] Memory state around the buggy address: [ 31.826752] ffff8801cf5a2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.834327] ffff8801cf5a2e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.841674] >ffff8801cf5a2e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.850403] ^ [ 31.855056] ffff8801cf5a2f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.863267] ffff8801cf5a2f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.870612] ================================================================== [ 31.877950] Disabling lock debugging due to kernel taint [ 31.883448] Kernel panic - not syncing: panic_on_warn set ... [ 31.883448] [ 31.890802] CPU: 1 PID: 3006 Comm: syz-executor0 Tainted: G B 4.13.0+ #42 [ 31.898825] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.908158] Call Trace: [ 31.910721] dump_stack+0x194/0x257 [ 31.914320] ? arch_local_irq_restore+0x53/0x53 [ 31.919012] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.923823] ? __dev_remove_pack+0x230/0x3b0 [ 31.928209] panic+0x1e4/0x417 [ 31.931376] ? __warn+0x1d9/0x1d9 [ 31.934801] ? __dev_remove_pack+0x305/0x3b0 [ 31.939181] kasan_end_report+0x50/0x50 [ 31.943213] kasan_report+0x137/0x340 [ 31.946982] __asan_report_load8_noabort+0x14/0x20 [ 31.951882] __dev_remove_pack+0x305/0x3b0 [ 31.956099] ? dev_get_by_name_rcu+0x270/0x270 [ 31.960650] ? refcount_sub_and_test+0x115/0x1b0 [ 31.965388] __unregister_prot_hook+0x211/0x280 [ 31.970038] packet_release+0x8bb/0xd70 [ 31.973984] ? packet_set_ring+0x1b70/0x1b70 [ 31.978383] ? dentry_free+0xcd/0x130 [ 31.982159] ? rcu_read_lock_sched_held+0x108/0x120 [ 31.987165] ? kmem_cache_free+0x249/0x280 [ 31.991370] ? dentry_free+0xd2/0x130 [ 31.995145] ? locks_remove_file+0x3fa/0x5a0 [ 32.000058] ? fcntl_setlk+0x10d0/0x10d0 [ 32.004105] ? __fsnotify_parent+0xb4/0x3a0 [ 32.008402] ? fsnotify+0x1af0/0x1af0 [ 32.012173] sock_release+0x8d/0x1e0 [ 32.015860] ? sock_release+0x8d/0x1e0 [ 32.019713] ? sock_release+0x1e0/0x1e0 [ 32.023676] sock_close+0x16/0x20 [ 32.027102] __fput+0x333/0x7f0 [ 32.030352] ? fput+0x140/0x140 [ 32.033612] ? check_same_owner+0x320/0x320 [ 32.037916] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.042386] ____fput+0x15/0x20 [ 32.045632] task_work_run+0x199/0x270 [ 32.049486] ? task_work_cancel+0x210/0x210 [ 32.053775] ? _raw_spin_unlock+0x22/0x30 [ 32.057889] ? switch_task_namespaces+0x87/0xc0 [ 32.062528] do_exit+0xa52/0x1b40 [ 32.065964] ? plist_check_list+0xa0/0xa0 [ 32.070085] ? plist_del+0x47b/0x990 [ 32.073780] ? mm_update_next_owner+0x930/0x930 [ 32.078415] ? plist_add+0x760/0x760 [ 32.082099] ? check_same_owner+0x320/0x320 [ 32.086389] ? find_held_lock+0x39/0x1d0 [ 32.090446] ? check_noncircular+0x20/0x20 [ 32.094652] ? lock_downgrade+0x990/0x990 [ 32.098765] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.104102] ? find_held_lock+0x39/0x1d0 [ 32.108135] ? lock_downgrade+0x990/0x990 [ 32.112248] ? recalc_sigpending_tsk+0x117/0x150 [ 32.116975] ? recalc_sigpending+0x103/0x160 [ 32.121349] ? recalc_sigpending_tsk+0x150/0x150 [ 32.126069] ? get_signal+0x397/0x17e0 [ 32.129928] do_group_exit+0x149/0x400 [ 32.133783] ? __lock_is_held+0xbc/0x140 [ 32.137807] ? SyS_exit+0x30/0x30 [ 32.141227] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.145708] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.150702] get_signal+0x7e8/0x17e0 [ 32.154410] ? ptrace_notify+0x130/0x130 [ 32.158450] ? __fget+0xbb/0x580 [ 32.161789] ? __lockdep_init_map+0xe4/0x650 [ 32.166168] ? lock_release+0xd70/0xd70 [ 32.170114] ? exit_robust_list+0x240/0x240 [ 32.174410] do_signal+0x94/0x1ee0 [ 32.177933] ? iterate_fd+0x3f0/0x3f0 [ 32.181815] ? setup_sigcontext+0x7d0/0x7d0 [ 32.186138] ? __lock_is_held+0xbc/0x140 [ 32.190209] ? __fget_light+0x29d/0x390