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-3,10.128.0.55' (ECDSA) to the list of known hosts. 2017/09/02 19:50:14 parsed 1 programs 2017/09/02 19:50:14 executed programs: 0 syzkaller login: [ 49.392698] dev_remove_pack: ffff8801cbacfb40 not found [ 49.412218] ================================================================== [ 49.419590] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 49.426309] Read of size 8 at addr ffff8801cbbbb1e8 by task syz-executor7/3433 [ 49.433635] [ 49.435233] CPU: 1 PID: 3433 Comm: syz-executor7 Not tainted 4.13.0-rc7-next-20170901+ #13 [ 49.443611] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 49.452934] Call Trace: [ 49.455491] dump_stack+0x194/0x257 [ 49.459088] ? arch_local_irq_restore+0x53/0x53 [ 49.463725] ? show_regs_print_info+0x65/0x65 [ 49.468191] ? __dev_remove_pack+0x305/0x3b0 [ 49.472570] print_address_description+0x73/0x250 [ 49.477384] ? __dev_remove_pack+0x305/0x3b0 [ 49.481762] kasan_report+0x24e/0x340 [ 49.485532] __asan_report_load8_noabort+0x14/0x20 [ 49.490426] __dev_remove_pack+0x305/0x3b0 [ 49.494630] ? dev_get_by_name_rcu+0x270/0x270 [ 49.499186] ? refcount_sub_and_test+0x115/0x1b0 [ 49.503969] __unregister_prot_hook+0x211/0x280 [ 49.508619] packet_release+0x8bb/0xd70 [ 49.512581] ? packet_set_ring+0x1b70/0x1b70 [ 49.516962] ? dentry_free+0xcd/0x130 [ 49.520734] ? rcu_read_lock_sched_held+0x108/0x120 [ 49.525725] ? kmem_cache_free+0x249/0x280 [ 49.529933] ? dentry_free+0xd2/0x130 [ 49.533727] ? locks_remove_file+0x3fa/0x5a0 [ 49.538109] ? fcntl_setlk+0x10d0/0x10d0 [ 49.542147] ? __fsnotify_parent+0xb4/0x3a0 [ 49.546440] ? fsnotify+0x1af0/0x1af0 [ 49.550217] sock_release+0x8d/0x1e0 [ 49.553901] ? sock_release+0x8d/0x1e0 [ 49.557768] ? sock_release+0x1e0/0x1e0 [ 49.561718] sock_close+0x16/0x20 [ 49.565143] __fput+0x333/0x7f0 [ 49.568400] ? fput+0x140/0x140 [ 49.571651] ? check_same_owner+0x320/0x320 [ 49.575947] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.580425] ____fput+0x15/0x20 [ 49.583681] task_work_run+0x199/0x270 [ 49.587545] ? task_work_cancel+0x210/0x210 [ 49.591845] ? _raw_spin_unlock+0x22/0x30 [ 49.595965] ? switch_task_namespaces+0x87/0xc0 [ 49.600620] do_exit+0xa52/0x1b40 [ 49.604048] ? plist_check_list+0xa0/0xa0 [ 49.608196] ? plist_del+0x47b/0x990 [ 49.611888] ? mm_update_next_owner+0x930/0x930 [ 49.616533] ? plist_add+0x760/0x760 [ 49.620239] ? check_same_owner+0x320/0x320 [ 49.624556] ? find_held_lock+0x39/0x1d0 [ 49.628601] ? check_noncircular+0x20/0x20 [ 49.632808] ? lock_downgrade+0x990/0x990 [ 49.636929] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 49.642305] ? find_held_lock+0x39/0x1d0 [ 49.646350] ? lock_downgrade+0x990/0x990 [ 49.650472] ? recalc_sigpending_tsk+0x117/0x150 [ 49.655200] ? recalc_sigpending+0x103/0x160 [ 49.659582] ? recalc_sigpending_tsk+0x150/0x150 [ 49.664308] ? get_signal+0x397/0x17e0 [ 49.668176] do_group_exit+0x149/0x400 [ 49.672032] ? __lock_is_held+0xbc/0x140 [ 49.676080] ? SyS_exit+0x30/0x30 [ 49.679508] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.683980] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.688976] get_signal+0x7e8/0x17e0 [ 49.692692] ? ptrace_notify+0x130/0x130 [ 49.696724] ? __fget+0xbb/0x580 [ 49.700068] ? lock_release+0xd70/0xd70 [ 49.704024] ? exit_robust_list+0x240/0x240 [ 49.708331] do_signal+0x94/0x1ee0 [ 49.711850] ? iterate_fd+0x3f0/0x3f0 [ 49.715631] ? setup_sigcontext+0x7d0/0x7d0 [ 49.719928] ? find_held_lock+0x39/0x1d0 [ 49.723972] ? __fget_light+0x29d/0x390 [ 49.727921] ? selinux_tun_dev_create+0xc0/0xc0 [ 49.732563] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 49.738262] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 49.743526] ? exit_to_usermode_loop+0x98/0x300 [ 49.748174] exit_to_usermode_loop+0x224/0x300 [ 49.752735] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 49.758269] syscall_return_slowpath+0x42f/0x500 [ 49.763037] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 49.768044] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 49.772984] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.777971] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 49.782721] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 49.787444] RIP: 0033:0x451e59 [ 49.790606] RSP: 002b:00007f11de71fcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 49.798303] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 49.805543] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 49.812784] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 49.820024] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 49.827261] R13: 0000000000a6f7ef R14: 00007f11de7209c0 R15: 0000000000000006 [ 49.834530] [ 49.836143] Allocated by task 3431: [ 49.839741] save_stack_trace+0x16/0x20 [ 49.843685] save_stack+0x43/0xd0 [ 49.847117] kasan_kmalloc+0xad/0xe0 [ 49.850800] kmem_cache_alloc_trace+0x136/0x750 [ 49.855439] fanout_add+0xa50/0x1190 [ 49.859134] packet_setsockopt+0xfdc/0x1e80 [ 49.863426] SyS_setsockopt+0x189/0x360 [ 49.867366] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 49.872087] [ 49.873683] Freed by task 3433: [ 49.876931] save_stack_trace+0x16/0x20 [ 49.880884] save_stack+0x43/0xd0 [ 49.884305] kasan_slab_free+0x71/0xc0 [ 49.888159] kfree+0xca/0x250 [ 49.891233] packet_release+0xa8f/0xd70 [ 49.895177] sock_release+0x8d/0x1e0 [ 49.898865] sock_close+0x16/0x20 [ 49.902286] __fput+0x333/0x7f0 [ 49.905534] ____fput+0x15/0x20 [ 49.908789] task_work_run+0x199/0x270 [ 49.912644] do_exit+0xa52/0x1b40 [ 49.916066] do_group_exit+0x149/0x400 [ 49.919934] get_signal+0x7e8/0x17e0 [ 49.923616] do_signal+0x94/0x1ee0 [ 49.927123] exit_to_usermode_loop+0x224/0x300 [ 49.931676] syscall_return_slowpath+0x42f/0x500 [ 49.936409] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 49.941141] [ 49.942748] The buggy address belongs to the object at ffff8801cbbba940 [ 49.942748] which belongs to the cache kmalloc-4096 of size 4096 [ 49.955548] The buggy address is located 2216 bytes inside of [ 49.955548] 4096-byte region [ffff8801cbbba940, ffff8801cbbbb940) [ 49.967564] The buggy address belongs to the page: [ 49.972476] page:ffffea00072eee80 count:1 mapcount:0 mapping:ffff8801cbbba940 index:0x0 compound_mapcount: 0 [ 49.982465] flags: 0x200000000008100(slab|head) [ 49.987104] raw: 0200000000008100 ffff8801cbbba940 0000000000000000 0000000100000001 [ 49.994954] raw: ffffea00072eee20 ffffea00072eef20 ffff8801dac00dc0 0000000000000000 [ 50.002799] page dumped because: kasan: bad access detected [ 50.008474] [ 50.010084] Memory state around the buggy address: [ 50.014978] ffff8801cbbbb080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.022305] ffff8801cbbbb100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.029633] >ffff8801cbbbb180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.036959] ^ [ 50.043682] ffff8801cbbbb200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.051007] ffff8801cbbbb280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.058329] ================================================================== [ 50.065651] Disabling lock debugging due to kernel taint [ 50.071164] Kernel panic - not syncing: panic_on_warn set ... [ 50.071164] [ 50.078495] CPU: 1 PID: 3433 Comm: syz-executor7 Tainted: G B 4.13.0-rc7-next-20170901+ #13 [ 50.088237] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.097552] Call Trace: [ 50.100135] dump_stack+0x194/0x257 [ 50.103725] ? arch_local_irq_restore+0x53/0x53 [ 50.108359] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 50.113079] ? __dev_remove_pack+0x2a0/0x3b0 [ 50.117447] panic+0x1e4/0x417 [ 50.120599] ? __warn+0x1d9/0x1d9 [ 50.124016] ? __dev_remove_pack+0x305/0x3b0 [ 50.128386] kasan_end_report+0x50/0x50 [ 50.132322] kasan_report+0x137/0x340 [ 50.136098] __asan_report_load8_noabort+0x14/0x20 [ 50.140988] __dev_remove_pack+0x305/0x3b0 [ 50.145184] ? dev_get_by_name_rcu+0x270/0x270 [ 50.149728] ? refcount_sub_and_test+0x115/0x1b0 [ 50.154451] __unregister_prot_hook+0x211/0x280 [ 50.159087] packet_release+0x8bb/0xd70 [ 50.163027] ? packet_set_ring+0x1b70/0x1b70 [ 50.167400] ? dentry_free+0xcd/0x130 [ 50.171169] ? rcu_read_lock_sched_held+0x108/0x120 [ 50.176189] ? kmem_cache_free+0x249/0x280 [ 50.180391] ? dentry_free+0xd2/0x130 [ 50.184157] ? locks_remove_file+0x3fa/0x5a0 [ 50.188540] ? fcntl_setlk+0x10d0/0x10d0 [ 50.192571] ? __fsnotify_parent+0xb4/0x3a0 [ 50.196859] ? fsnotify+0x1af0/0x1af0 [ 50.200625] sock_release+0x8d/0x1e0 [ 50.204302] ? sock_release+0x8d/0x1e0 [ 50.208151] ? sock_release+0x1e0/0x1e0 [ 50.212086] sock_close+0x16/0x20 [ 50.215503] __fput+0x333/0x7f0 [ 50.218748] ? fput+0x140/0x140 [ 50.221993] ? check_same_owner+0x320/0x320 [ 50.226322] ? _raw_spin_unlock_irq+0x27/0x70 [ 50.230784] ____fput+0x15/0x20 [ 50.234029] task_work_run+0x199/0x270 [ 50.237878] ? task_work_cancel+0x210/0x210 [ 50.242196] ? _raw_spin_unlock+0x22/0x30 [ 50.246340] ? switch_task_namespaces+0x87/0xc0 [ 50.250988] do_exit+0xa52/0x1b40 [ 50.254417] ? plist_check_list+0xa0/0xa0 [ 50.258546] ? plist_del+0x47b/0x990 [ 50.262256] ? mm_update_next_owner+0x930/0x930 [ 50.266896] ? plist_add+0x760/0x760 [ 50.270602] ? check_same_owner+0x320/0x320 [ 50.274900] ? find_held_lock+0x39/0x1d0 [ 50.278940] ? check_noncircular+0x20/0x20 [ 50.283147] ? lock_downgrade+0x990/0x990 [ 50.287285] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 50.292638] ? find_held_lock+0x39/0x1d0 [ 50.296682] ? lock_downgrade+0x990/0x990 [ 50.300805] ? recalc_sigpending_tsk+0x117/0x150 [ 50.305535] ? recalc_sigpending+0x103/0x160 [ 50.309917] ? recalc_sigpending_tsk+0x150/0x150 [ 50.314648] ? get_signal+0x397/0x17e0 [ 50.318513] do_group_exit+0x149/0x400 [ 50.322376] ? __lock_is_held+0xbc/0x140 [ 50.326409] ? SyS_exit+0x30/0x30 [ 50.329837] ? _raw_spin_unlock_irq+0x27/0x70 [ 50.334307] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 50.339302] get_signal+0x7e8/0x17e0 [ 50.343014] ? ptrace_notify+0x130/0x130 [ 50.347079] ? __fget+0xbb/0x580 [ 50.350424] ? lock_release+0xd70/0xd70 [ 50.354376] ? exit_robust_list+0x240/0x240 [ 50.358677] do_signal+0x94/0x1ee0 [ 50.362195] ? iterate_fd+0x3f0/0x3f0 [ 50.365972] ? setup_sigcontext+0x7d0/0x7d0 [ 50.370286] ? find_held_lock+0x39/0x1d0 [ 50.374333] ? __fget_light+0x29d/0x390 [ 50.378283] ? selinux_tun_dev_create+0xc0/0xc0 [ 50.382926] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 50.388608] ? selinux_netlbl_sock_rcv_skb+0x730/0x730