2017/09/12 06:47:31 parsed 1 programs 2017/09/12 06:47:31 executed programs: 0 syzkaller login: [ 23.623924] dev_remove_pack: ffff88003d6948c0 not found [ 23.646204] ================================================================== [ 23.647209] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 23.647970] Read of size 8 at addr ffff88003a4d2928 by task syz-executor0/3071 [ 23.648734] [ 23.648916] CPU: 0 PID: 3071 Comm: syz-executor0 Not tainted 4.13.0-next-20170912+ #2 [ 23.649766] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 23.650644] Call Trace: [ 23.650960] dump_stack+0x194/0x257 [ 23.651372] ? arch_local_irq_restore+0x53/0x53 [ 23.651869] ? show_regs_print_info+0x65/0x65 [ 23.652355] ? __dev_remove_pack+0x305/0x3b0 [ 23.652825] print_address_description+0x73/0x250 [ 23.653432] ? __dev_remove_pack+0x305/0x3b0 [ 23.653973] kasan_report+0x24e/0x340 [ 23.654429] __asan_report_load8_noabort+0x14/0x20 [ 23.655006] __dev_remove_pack+0x305/0x3b0 [ 23.655447] ? dev_get_by_name_rcu+0x270/0x270 [ 23.655920] ? refcount_sub_and_test+0x115/0x1b0 [ 23.656450] __unregister_prot_hook+0x211/0x280 [ 23.656976] packet_release+0x8bb/0xd70 [ 23.657492] ? packet_set_ring+0x1b70/0x1b70 [ 23.657965] ? dentry_free+0xcd/0x130 [ 23.658381] ? rcu_read_lock_sched_held+0x108/0x120 [ 23.658934] ? kmem_cache_free+0x249/0x280 [ 23.659418] ? dentry_free+0xd2/0x130 [ 23.660352] ? locks_remove_file+0x3fa/0x5a0 [ 23.660704] ? fcntl_setlk+0x10d0/0x10d0 [ 23.661002] ? __fsnotify_parent+0xb4/0x3a0 [ 23.661331] ? fsnotify+0x1af0/0x1af0 [ 23.661639] sock_release+0x8d/0x1e0 [ 23.661920] ? sock_release+0x8d/0x1e0 [ 23.662277] ? sock_release+0x1e0/0x1e0 [ 23.662606] sock_close+0x16/0x20 [ 23.662869] __fput+0x333/0x7f0 [ 23.663184] ? fput+0x140/0x140 [ 23.663444] ? check_same_owner+0x320/0x320 [ 23.663759] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.664172] ____fput+0x15/0x20 [ 23.664417] task_work_run+0x199/0x270 [ 23.664704] ? task_work_cancel+0x210/0x210 [ 23.665006] ? _raw_spin_unlock+0x22/0x30 [ 23.665442] ? switch_task_namespaces+0x87/0xc0 [ 23.665840] do_exit+0xa52/0x1b40 [ 23.666124] ? plist_check_list+0xa0/0xa0 [ 23.666461] ? plist_del+0x47b/0x990 [ 23.666763] ? mm_update_next_owner+0x930/0x930 [ 23.667119] ? plist_add+0x760/0x760 [ 23.667442] ? check_same_owner+0x320/0x320 [ 23.667801] ? find_held_lock+0x39/0x1d0 [ 23.668144] ? check_noncircular+0x20/0x20 [ 23.668522] ? lock_downgrade+0x990/0x990 [ 23.668883] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 23.669282] ? find_held_lock+0x39/0x1d0 [ 23.669617] ? lock_downgrade+0x990/0x990 [ 23.669949] ? recalc_sigpending_tsk+0x117/0x150 [ 23.670322] ? recalc_sigpending+0x103/0x160 [ 23.670670] ? recalc_sigpending_tsk+0x150/0x150 [ 23.671040] ? get_signal+0x397/0x17e0 [ 23.671333] do_group_exit+0x149/0x400 [ 23.671634] ? __lock_is_held+0xbc/0x140 [ 23.671972] ? SyS_exit+0x30/0x30 [ 23.672308] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.672677] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.673055] get_signal+0x7e8/0x17e0 [ 23.673362] ? ptrace_notify+0x130/0x130 [ 23.673647] ? __fget+0xbb/0x580 [ 23.673887] ? lock_release+0xd70/0xd70 [ 23.674168] ? exit_robust_list+0x240/0x240 [ 23.674477] do_signal+0x94/0x1ee0 [ 23.674755] ? iterate_fd+0x3f0/0x3f0 [ 23.675017] ? setup_sigcontext+0x7d0/0x7d0 [ 23.675386] ? __fget+0x362/0x580 [ 23.675670] ? find_held_lock+0x39/0x1d0 [ 23.675998] ? iterate_fd+0x3f0/0x3f0 [ 23.676309] ? __fget_light+0x29d/0x390 [ 23.676588] ? selinux_tun_dev_create+0xc0/0xc0 [ 23.676914] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 23.677339] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 23.677721] ? exit_to_usermode_loop+0x98/0x300 [ 23.678065] exit_to_usermode_loop+0x224/0x300 [ 23.678388] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 23.678781] syscall_return_slowpath+0x42f/0x500 [ 23.679114] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 23.679573] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 23.679959] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.680323] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.681013] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 23.681348] RIP: 0033:0x447299 [ 23.681584] RSP: 002b:00007ff7fcd1ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 23.682185] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 23.682699] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 23.683239] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 23.683779] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 23.684278] R13: 0000000000000000 R14: 00007ff7fcd1f9c0 R15: 00007ff7fcd1f700 [ 23.684803] [ 23.684933] Allocated by task 3070: [ 23.685201] save_stack_trace+0x16/0x20 [ 23.685493] save_stack+0x43/0xd0 [ 23.685749] kasan_kmalloc+0xad/0xe0 [ 23.686007] kmem_cache_alloc_trace+0x136/0x750 [ 23.686328] fanout_add+0xa50/0x1190 [ 23.686584] packet_setsockopt+0xfdc/0x1e80 [ 23.686889] SyS_setsockopt+0x189/0x360 [ 23.687178] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 23.687535] [ 23.687664] Freed by task 3071: [ 23.687944] save_stack_trace+0x16/0x20 [ 23.688232] save_stack+0x43/0xd0 [ 23.688471] kasan_slab_free+0x71/0xc0 [ 23.688751] kfree+0xca/0x250 [ 23.688963] packet_release+0xa8f/0xd70 [ 23.689253] sock_release+0x8d/0x1e0 [ 23.689525] sock_close+0x16/0x20 [ 23.689795] __fput+0x333/0x7f0 [ 23.690026] ____fput+0x15/0x20 [ 23.690267] task_work_run+0x199/0x270 [ 23.690550] do_exit+0xa52/0x1b40 [ 23.690789] do_group_exit+0x149/0x400 [ 23.691057] get_signal+0x7e8/0x17e0 [ 23.691316] do_signal+0x94/0x1ee0 [ 23.691588] exit_to_usermode_loop+0x224/0x300 [ 23.691910] syscall_return_slowpath+0x42f/0x500 [ 23.692230] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 23.692592] [ 23.692722] The buggy address belongs to the object at ffff88003a4d2080 [ 23.692722] which belongs to the cache kmalloc-4096 of size 4096 [ 23.693721] The buggy address is located 2216 bytes inside of [ 23.693721] 4096-byte region [ffff88003a4d2080, ffff88003a4d3080) [ 23.694588] The buggy address belongs to the page: [ 23.694945] page:ffffea0000e93480 count:1 mapcount:0 mapping:ffff88003a4d2080 index:0x0 compound_mapcount: 0 [ 23.695693] flags: 0x100000000008100(slab|head) [ 23.696018] raw: 0100000000008100 ffff88003a4d2080 0000000000000000 0000000100000001 [ 23.696563] raw: ffffea0000ebd6a0 ffff88003e801a50 ffff88003e800dc0 0000000000000000 [ 23.697118] page dumped because: kasan: bad access detected [ 23.697525] [ 23.697644] Memory state around the buggy address: [ 23.698026] ffff88003a4d2800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.698638] ffff88003a4d2880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.699240] >ffff88003a4d2900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.699797] ^ [ 23.700162] ffff88003a4d2980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.700682] ffff88003a4d2a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 23.701268] ================================================================== [ 23.701802] Disabling lock debugging due to kernel taint [ 23.702243] Kernel panic - not syncing: panic_on_warn set ... [ 23.702243] [ 23.703007] CPU: 0 PID: 3071 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170912+ #2 [ 23.703635] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 23.704193] Call Trace: [ 23.704372] dump_stack+0x194/0x257 [ 23.704624] ? arch_local_irq_restore+0x53/0x53 [ 23.704943] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.705269] ? __dev_remove_pack+0x2f0/0x3b0 [ 23.705578] panic+0x1e4/0x417 [ 23.705798] ? __warn+0x1d9/0x1d9 [ 23.706039] ? __dev_remove_pack+0x305/0x3b0 [ 23.706341] kasan_end_report+0x50/0x50 [ 23.706639] kasan_report+0x137/0x340 [ 23.706929] __asan_report_load8_noabort+0x14/0x20 [ 23.707294] __dev_remove_pack+0x305/0x3b0 [ 23.707676] ? dev_get_by_name_rcu+0x270/0x270 [ 23.708046] ? refcount_sub_and_test+0x115/0x1b0 [ 23.708389] __unregister_prot_hook+0x211/0x280 [ 23.708779] packet_release+0x8bb/0xd70 [ 23.709083] ? packet_set_ring+0x1b70/0x1b70 [ 23.709385] ? dentry_free+0xcd/0x130 [ 23.709703] ? rcu_read_lock_sched_held+0x108/0x120 [ 23.710075] ? kmem_cache_free+0x249/0x280 [ 23.710407] ? dentry_free+0xd2/0x130 [ 23.710698] ? locks_remove_file+0x3fa/0x5a0 [ 23.711029] ? fcntl_setlk+0x10d0/0x10d0 [ 23.711322] ? __fsnotify_parent+0xb4/0x3a0 [ 23.711672] ? fsnotify+0x1af0/0x1af0 [ 23.711953] sock_release+0x8d/0x1e0 [ 23.712208] ? sock_release+0x8d/0x1e0 [ 23.712479] ? sock_release+0x1e0/0x1e0 [ 23.712832] sock_close+0x16/0x20 [ 23.713071] __fput+0x333/0x7f0 [ 23.713366] ? fput+0x140/0x140 [ 23.713610] ? check_same_owner+0x320/0x320 [ 23.713947] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.714282] ____fput+0x15/0x20 [ 23.714520] task_work_run+0x199/0x270 [ 23.714829] ? task_work_cancel+0x210/0x210 [ 23.715167] ? _raw_spin_unlock+0x22/0x30 [ 23.715479] ? switch_task_namespaces+0x87/0xc0 [ 23.715842] do_exit+0xa52/0x1b40 [ 23.716148] ? plist_check_list+0xa0/0xa0 [ 23.716436] ? plist_del+0x47b/0x990 [ 23.716760] ? mm_update_next_owner+0x930/0x930 [ 23.717148] ? plist_add+0x760/0x760 [ 23.717463] ? check_same_owner+0x320/0x320 [ 23.717763] ? find_held_lock+0x39/0x1d0 [ 23.718088] ? check_noncircular+0x20/0x20 [ 23.718486] ? lock_downgrade+0x990/0x990 [ 23.718855] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 23.719258] ? find_held_lock+0x39/0x1d0 [ 23.719583] ? lock_downgrade+0x990/0x990 [ 23.719869] ? recalc_sigpending_tsk+0x117/0x150 [ 23.720199] ? recalc_sigpending+0x103/0x160 [ 23.720507] ? recalc_sigpending_tsk+0x150/0x150 [ 23.720834] ? get_signal+0x397/0x17e0 [ 23.721109] do_group_exit+0x149/0x400 [ 23.721379] ? __lock_is_held+0xbc/0x140 [ 23.721689] ? SyS_exit+0x30/0x30 [ 23.721952] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.722289] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.722686] get_signal+0x7e8/0x17e0 [ 23.722978] ? ptrace_notify+0x130/0x130 [ 23.723256] ? __fget+0xbb/0x580 [ 23.723810] ? lock_release+0xd70/0xd70 [ 23.724107] ? exit_robust_list+0x240/0x240 [ 23.724422] do_signal+0x94/0x1ee0 [ 23.724708] ? iterate_fd+0x3f0/0x3f0 [ 23.725013] ? setup_sigcontext+0x7d0/0x7d0 [ 23.725350] ? __fget+0x362/0x580 [ 23.725626] ? find_held_lock+0x39/0x1d0 [ 23.725909] ? iterate_fd+0x3f0/0x3f0 [ 23.726226] ? __fget_light+0x29d/0x390 [ 23.726556] ? selinux_tun_dev_create+0xc0/0xc0 [ 23.726892] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 23.727365] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 23.727808] ? exit_to_usermode_loop+0x98/0x300 [ 23.728144] exit_to_usermode_loop+0x224/0x300 [ 23.728461] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 23.728899] syscall_return_slowpath+0x42f/0x500 [ 23.729267] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 23.729629] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 23.729996] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.730393] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.730791] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 23.731170] RIP: 0033:0x447299 [ 23.731429] RSP: 002b:00007ff7fcd1ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 23.732038] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 23.732601] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 23.733178] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 23.733717] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 23.734320] R13: 0000000000000000 R14: 00007ff7fcd1f9c0 R15: 00007ff7fcd1f700 [ 23.734877] Dumping ftrace buffer: [ 23.735120] (ftrace buffer empty) [ 23.735375] Kernel Offset: disabled [ 23.735627] Rebooting in 86400 seconds..