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-mmots-kasan-gce-5,10.128.15.204' (ECDSA) to the list of known hosts. 2017/09/21 05:08:44 parsed 1 programs 2017/09/21 05:08:44 executed programs: 0 syzkaller login: [ 39.831344] dev_remove_pack: ffff8801cd17fd00 not found [ 39.861182] ================================================================== [ 39.868561] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 39.875283] Read of size 8 at addr ffff8801cd1655a8 by task syz-executor0/3286 [ 39.882606] [ 39.884209] CPU: 1 PID: 3286 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 39.891282] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.900603] Call Trace: [ 39.903167] dump_stack+0x194/0x257 [ 39.906768] ? arch_local_irq_restore+0x53/0x53 [ 39.911412] ? show_regs_print_info+0x65/0x65 [ 39.915884] ? __dev_remove_pack+0x305/0x3b0 [ 39.920268] print_address_description+0x73/0x250 [ 39.925085] ? __dev_remove_pack+0x305/0x3b0 [ 39.929465] kasan_report+0x24e/0x340 [ 39.933239] __asan_report_load8_noabort+0x14/0x20 [ 39.938138] __dev_remove_pack+0x305/0x3b0 [ 39.942345] ? dev_get_by_name_rcu+0x270/0x270 [ 39.946915] ? refcount_sub_and_test+0x115/0x1b0 [ 39.951651] __unregister_prot_hook+0x211/0x280 [ 39.956294] packet_release+0x8bb/0xd70 [ 39.960244] ? packet_set_ring+0x1b70/0x1b70 [ 39.964624] ? dentry_free+0xcd/0x130 [ 39.968396] ? rcu_read_lock_sched_held+0x108/0x120 [ 39.973384] ? kmem_cache_free+0x249/0x280 [ 39.977590] ? dentry_free+0xd2/0x130 [ 39.981366] ? locks_remove_file+0x3fa/0x5a0 [ 39.985746] ? fcntl_setlk+0x10d0/0x10d0 [ 39.989784] ? __fsnotify_parent+0xb4/0x3a0 [ 39.994078] ? fsnotify+0x1af0/0x1af0 [ 39.997853] sock_release+0x8d/0x1e0 [ 40.001535] ? sock_release+0x8d/0x1e0 [ 40.005398] ? sock_release+0x1e0/0x1e0 [ 40.009343] sock_close+0x16/0x20 [ 40.012764] __fput+0x333/0x7f0 [ 40.016017] ? fput+0x140/0x140 [ 40.019270] ? check_same_owner+0x320/0x320 [ 40.023560] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.028028] ____fput+0x15/0x20 [ 40.031280] task_work_run+0x199/0x270 [ 40.035141] ? task_work_cancel+0x210/0x210 [ 40.039431] ? _raw_spin_unlock+0x22/0x30 [ 40.043549] ? switch_task_namespaces+0x87/0xc0 [ 40.048196] do_exit+0xa52/0x1b40 [ 40.051617] ? plist_check_list+0xa0/0xa0 [ 40.055745] ? plist_del+0x47b/0x990 [ 40.059431] ? mm_update_next_owner+0x930/0x930 [ 40.064070] ? plist_add+0x760/0x760 [ 40.067765] ? check_same_owner+0x320/0x320 [ 40.072062] ? find_held_lock+0x39/0x1d0 [ 40.076100] ? check_noncircular+0x20/0x20 [ 40.080304] ? lock_downgrade+0x990/0x990 [ 40.084421] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 40.089772] ? find_held_lock+0x39/0x1d0 [ 40.093816] ? lock_downgrade+0x990/0x990 [ 40.097933] ? recalc_sigpending_tsk+0x117/0x150 [ 40.102662] ? recalc_sigpending+0x103/0x160 [ 40.107041] ? recalc_sigpending_tsk+0x150/0x150 [ 40.111764] ? get_signal+0x397/0x17e0 [ 40.115632] do_group_exit+0x149/0x400 [ 40.119487] ? __lock_is_held+0xbc/0x140 [ 40.123517] ? SyS_exit+0x30/0x30 [ 40.126939] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.131403] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 40.136394] get_signal+0x7e8/0x17e0 [ 40.140106] ? ptrace_notify+0x130/0x130 [ 40.144134] ? __fget+0xbb/0x580 [ 40.147469] ? __lockdep_init_map+0xe4/0x650 [ 40.151852] ? lock_release+0xd70/0xd70 [ 40.155802] ? exit_robust_list+0x240/0x240 [ 40.160108] do_signal+0x94/0x1ee0 [ 40.163624] ? iterate_fd+0x3f0/0x3f0 [ 40.167396] ? setup_sigcontext+0x7d0/0x7d0 [ 40.171689] ? __lock_is_held+0xbc/0x140 [ 40.175731] ? __fget_light+0x29d/0x390 [ 40.179677] ? selinux_tun_dev_create+0xc0/0xc0 [ 40.184319] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 40.189999] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 40.195241] ? alloc_file+0x284/0x3a0 [ 40.199013] ? exit_to_usermode_loop+0x98/0x300 [ 40.203657] exit_to_usermode_loop+0x224/0x300 [ 40.208210] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 40.213726] syscall_return_slowpath+0x42f/0x500 [ 40.218450] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 40.223436] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 40.228337] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 40.233323] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 40.238057] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 40.242781] RIP: 0033:0x4520a9 [ 40.245940] RSP: 002b:00007f7aba46ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 40.253618] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 40.260854] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 40.268092] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 40.275328] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 40.282566] R13: 0000000000a6f7ef R14: 00007f7aba46f9c0 R15: 0000000000000000 [ 40.289823] [ 40.291419] Allocated by task 3286: [ 40.295016] save_stack_trace+0x16/0x20 [ 40.298962] save_stack+0x43/0xd0 [ 40.302380] kasan_kmalloc+0xad/0xe0 [ 40.306063] kmem_cache_alloc_trace+0x136/0x750 [ 40.310703] fanout_add+0xa50/0x1190 [ 40.314384] packet_setsockopt+0xfdc/0x1e80 [ 40.318674] SyS_setsockopt+0x189/0x360 [ 40.322619] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 40.327341] [ 40.328938] Freed by task 3286: [ 40.332188] save_stack_trace+0x16/0x20 [ 40.336129] save_stack+0x43/0xd0 [ 40.339550] kasan_slab_free+0x71/0xc0 [ 40.343406] kfree+0xca/0x250 [ 40.346479] packet_release+0xa8f/0xd70 [ 40.350419] sock_release+0x8d/0x1e0 [ 40.354101] sock_close+0x16/0x20 [ 40.357522] __fput+0x333/0x7f0 [ 40.360768] ____fput+0x15/0x20 [ 40.364019] task_work_run+0x199/0x270 [ 40.367874] do_exit+0xa52/0x1b40 [ 40.371302] do_group_exit+0x149/0x400 [ 40.375156] get_signal+0x7e8/0x17e0 [ 40.378836] do_signal+0x94/0x1ee0 [ 40.382345] exit_to_usermode_loop+0x224/0x300 [ 40.386896] syscall_return_slowpath+0x42f/0x500 [ 40.391619] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 40.396340] [ 40.397938] The buggy address belongs to the object at ffff8801cd164d00 [ 40.397938] which belongs to the cache kmalloc-4096 of size 4096 [ 40.410740] The buggy address is located 2216 bytes inside of [ 40.410740] 4096-byte region [ffff8801cd164d00, ffff8801cd165d00) [ 40.422752] The buggy address belongs to the page: [ 40.427649] page:ffffea0007345900 count:1 mapcount:0 mapping:ffff8801cd164d00 index:0x0 compound_mapcount: 0 [ 40.437593] flags: 0x200000000008100(slab|head) [ 40.442230] raw: 0200000000008100 ffff8801cd164d00 0000000000000000 0000000100000001 [ 40.450082] raw: ffffea0007349820 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 40.457926] page dumped because: kasan: bad access detected [ 40.463604] [ 40.465199] Memory state around the buggy address: [ 40.470096] ffff8801cd165480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.477422] ffff8801cd165500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.484749] >ffff8801cd165580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.492074] ^ [ 40.496707] ffff8801cd165600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.504031] ffff8801cd165680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.511354] ================================================================== [ 40.519334] Disabling lock debugging due to kernel taint [ 40.524827] Kernel panic - not syncing: panic_on_warn set ... [ 40.524827] [ 40.532155] CPU: 1 PID: 3286 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 40.540429] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.549745] Call Trace: [ 40.552300] dump_stack+0x194/0x257 [ 40.555893] ? arch_local_irq_restore+0x53/0x53 [ 40.560527] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 40.565251] ? __dev_remove_pack+0x2f0/0x3b0 [ 40.569626] panic+0x1e4/0x417 [ 40.572782] ? __warn+0x1d9/0x1d9 [ 40.576209] ? __dev_remove_pack+0x305/0x3b0 [ 40.580585] kasan_end_report+0x50/0x50 [ 40.584522] kasan_report+0x137/0x340 [ 40.588288] __asan_report_load8_noabort+0x14/0x20 [ 40.593188] __dev_remove_pack+0x305/0x3b0 [ 40.597387] ? dev_get_by_name_rcu+0x270/0x270 [ 40.601934] ? refcount_sub_and_test+0x115/0x1b0 [ 40.606658] __unregister_prot_hook+0x211/0x280 [ 40.611293] packet_release+0x8bb/0xd70 [ 40.615235] ? packet_set_ring+0x1b70/0x1b70 [ 40.619607] ? dentry_free+0xcd/0x130 [ 40.623371] ? rcu_read_lock_sched_held+0x108/0x120 [ 40.628350] ? kmem_cache_free+0x249/0x280 [ 40.632548] ? dentry_free+0xd2/0x130 [ 40.636316] ? locks_remove_file+0x3fa/0x5a0 [ 40.640690] ? fcntl_setlk+0x10d0/0x10d0 [ 40.644718] ? __fsnotify_parent+0xb4/0x3a0 [ 40.649006] ? fsnotify+0x1af0/0x1af0 [ 40.652787] sock_release+0x8d/0x1e0 [ 40.656462] ? sock_release+0x8d/0x1e0 [ 40.660312] ? sock_release+0x1e0/0x1e0 [ 40.664250] sock_close+0x16/0x20 [ 40.667665] __fput+0x333/0x7f0 [ 40.670911] ? fput+0x140/0x140 [ 40.674155] ? check_same_owner+0x320/0x320 [ 40.678438] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.682898] ____fput+0x15/0x20 [ 40.686144] task_work_run+0x199/0x270 [ 40.689996] ? task_work_cancel+0x210/0x210 [ 40.694281] ? _raw_spin_unlock+0x22/0x30 [ 40.698393] ? switch_task_namespaces+0x87/0xc0 [ 40.703035] do_exit+0xa52/0x1b40 [ 40.706451] ? plist_check_list+0xa0/0xa0 [ 40.710567] ? plist_del+0x47b/0x990 [ 40.714245] ? mm_update_next_owner+0x930/0x930 [ 40.718876] ? plist_add+0x760/0x760 [ 40.722558] ? check_same_owner+0x320/0x320 [ 40.726847] ? find_held_lock+0x39/0x1d0 [ 40.730877] ? check_noncircular+0x20/0x20 [ 40.735075] ? lock_downgrade+0x990/0x990 [ 40.739188] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 40.744532] ? find_held_lock+0x39/0x1d0 [ 40.748561] ? lock_downgrade+0x990/0x990 [ 40.752673] ? recalc_sigpending_tsk+0x117/0x150 [ 40.757392] ? recalc_sigpending+0x103/0x160 [ 40.761765] ? recalc_sigpending_tsk+0x150/0x150 [ 40.766481] ? get_signal+0x397/0x17e0 [ 40.770339] do_group_exit+0x149/0x400 [ 40.774189] ? __lock_is_held+0xbc/0x140 [ 40.778217] ? SyS_exit+0x30/0x30 [ 40.781636] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.786095] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 40.791079] get_signal+0x7e8/0x17e0 [ 40.794770] ? ptrace_notify+0x130/0x130 [ 40.798793] ? __fget+0xbb/0x580 [ 40.802124] ? __lockdep_init_map+0xe4/0x650 [ 40.806496] ? lock_release+0xd70/0xd70 [ 40.810436] ? exit_robust_list+0x240/0x240 [ 40.814726] do_signal+0x94/0x1ee0 [ 40.818232] ? iterate_fd+0x3f0/0x3f0 [ 40.821997] ? setup_sigcontext+0x7d0/0x7d0 [ 40.826284] ? __lock_is_held+0xbc/0x140 [ 40.830315] ? __fget_light+0x29d/0x390