2017/09/05 04:57:03 parsed 1 programs 2017/09/05 04:57:03 executed programs: 0 syzkaller login: [ 27.172721] dev_remove_pack: ffff88006a2fe880 not found [ 27.194269] ================================================================== [ 27.195234] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 27.196002] Read of size 8 at addr ffff88006bf892a8 by task syz-executor0/3113 [ 27.196894] [ 27.197094] CPU: 2 PID: 3113 Comm: syz-executor0 Not tainted 4.13.0-next-20170904+ #14 [ 27.198066] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 27.199207] Call Trace: [ 27.199834] dump_stack+0x194/0x257 [ 27.200678] ? arch_local_irq_restore+0x53/0x53 [ 27.202070] ? show_regs_print_info+0x65/0x65 [ 27.203108] ? __dev_remove_pack+0x305/0x3b0 [ 27.204464] print_address_description+0x73/0x250 [ 27.205867] ? __dev_remove_pack+0x305/0x3b0 [ 27.206842] kasan_report+0x24e/0x340 [ 27.207706] __asan_report_load8_noabort+0x14/0x20 [ 27.208767] __dev_remove_pack+0x305/0x3b0 [ 27.209694] ? dev_get_by_name_rcu+0x270/0x270 [ 27.211031] ? refcount_sub_and_test+0x115/0x1b0 [ 27.212081] __unregister_prot_hook+0x211/0x280 [ 27.213131] packet_release+0x8bb/0xd70 [ 27.213887] ? packet_set_ring+0x1b70/0x1b70 [ 27.214855] ? dentry_free+0xcd/0x130 [ 27.215670] ? rcu_read_lock_sched_held+0x108/0x120 [ 27.216691] ? kmem_cache_free+0x249/0x280 [ 27.217465] ? dentry_free+0xd2/0x130 [ 27.218275] ? locks_remove_file+0x3fa/0x5a0 [ 27.219565] ? fcntl_setlk+0x10d0/0x10d0 [ 27.220369] ? __fsnotify_parent+0xb4/0x3a0 [ 27.221258] ? fsnotify+0x1af0/0x1af0 [ 27.221965] sock_release+0x8d/0x1e0 [ 27.223314] ? sock_release+0x8d/0x1e0 [ 27.223742] ? sock_release+0x1e0/0x1e0 [ 27.224161] sock_close+0x16/0x20 [ 27.224650] __fput+0x333/0x7f0 [ 27.225022] ? fput+0x140/0x140 [ 27.225460] ? check_same_owner+0x320/0x320 [ 27.225942] ? _raw_spin_unlock_irq+0x27/0x70 [ 27.226727] ____fput+0x15/0x20 [ 27.227325] task_work_run+0x199/0x270 [ 27.228565] ? task_work_cancel+0x210/0x210 [ 27.229530] ? _raw_spin_unlock+0x22/0x30 [ 27.230407] ? switch_task_namespaces+0x87/0xc0 [ 27.231393] do_exit+0xa52/0x1b40 [ 27.232278] ? plist_check_list+0xa0/0xa0 [ 27.233044] ? plist_del+0x47b/0x990 [ 27.233884] ? mm_update_next_owner+0x930/0x930 [ 27.234878] ? plist_add+0x760/0x760 [ 27.235675] ? check_same_owner+0x320/0x320 [ 27.236568] ? find_held_lock+0x39/0x1d0 [ 27.237438] ? check_noncircular+0x20/0x20 [ 27.238366] ? lock_downgrade+0x990/0x990 [ 27.239244] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 27.240400] ? find_held_lock+0x39/0x1d0 [ 27.241344] ? lock_downgrade+0x990/0x990 [ 27.242140] ? recalc_sigpending_tsk+0x117/0x150 [ 27.243149] ? recalc_sigpending+0x103/0x160 [ 27.244054] ? recalc_sigpending_tsk+0x150/0x150 [ 27.245644] ? get_signal+0x397/0x17e0 [ 27.246019] do_group_exit+0x149/0x400 [ 27.246382] ? __lock_is_held+0xbc/0x140 [ 27.246758] ? SyS_exit+0x30/0x30 [ 27.247379] ? _raw_spin_unlock_irq+0x27/0x70 [ 27.248212] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 27.249134] get_signal+0x7e8/0x17e0 [ 27.249839] ? ptrace_notify+0x130/0x130 [ 27.250607] ? __fget+0xbb/0x580 [ 27.251260] ? __lockdep_init_map+0xe4/0x650 [ 27.252097] ? lock_release+0xd70/0xd70 [ 27.252797] ? exit_robust_list+0x240/0x240 [ 27.253606] do_signal+0x94/0x1ee0 [ 27.254313] ? iterate_fd+0x3f0/0x3f0 [ 27.255022] ? setup_sigcontext+0x7d0/0x7d0 [ 27.255834] ? __lock_is_held+0xbc/0x140 [ 27.256627] ? __fget_light+0x29d/0x390 [ 27.257399] ? selinux_tun_dev_create+0xc0/0xc0 [ 27.258284] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 27.259366] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 27.260282] ? alloc_file+0x284/0x3a0 [ 27.260864] ? exit_to_usermode_loop+0x98/0x300 [ 27.261435] exit_to_usermode_loop+0x224/0x300 [ 27.262033] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 27.262925] syscall_return_slowpath+0x42f/0x500 [ 27.263449] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 27.264077] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 27.264927] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 27.266142] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 27.266687] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 27.267575] RIP: 0033:0x447299 [ 27.268163] RSP: 002b:00007f72461d6cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 27.269574] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 27.270920] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 27.272119] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 27.272803] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 27.273335] R13: 0000000000000000 R14: 00007f72461d79c0 R15: 00007f72461d7700 [ 27.275042] [ 27.275447] Allocated by task 3112: [ 27.275976] save_stack_trace+0x16/0x20 [ 27.276447] save_stack+0x43/0xd0 [ 27.276757] kasan_kmalloc+0xad/0xe0 [ 27.277073] kmem_cache_alloc_trace+0x136/0x750 [ 27.277472] fanout_add+0xa50/0x1190 [ 27.277700] packet_setsockopt+0xfdc/0x1e80 [ 27.277993] SyS_setsockopt+0x189/0x360 [ 27.278254] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 27.278614] [ 27.278731] Freed by task 3113: [ 27.279151] save_stack_trace+0x16/0x20 [ 27.279539] save_stack+0x43/0xd0 [ 27.279921] kasan_slab_free+0x71/0xc0 [ 27.280334] kfree+0xca/0x250 [ 27.280646] packet_release+0xa8f/0xd70 [ 27.281068] sock_release+0x8d/0x1e0 [ 27.281463] sock_close+0x16/0x20 [ 27.282022] __fput+0x333/0x7f0 [ 27.282348] ____fput+0x15/0x20 [ 27.282675] task_work_run+0x199/0x270 [ 27.283103] do_exit+0xa52/0x1b40 [ 27.284108] do_group_exit+0x149/0x400 [ 27.285132] get_signal+0x7e8/0x17e0 [ 27.286454] do_signal+0x94/0x1ee0 [ 27.287577] exit_to_usermode_loop+0x224/0x300 [ 27.288406] syscall_return_slowpath+0x42f/0x500 [ 27.289266] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 27.290139] [ 27.290454] The buggy address belongs to the object at ffff88006bf88a00 [ 27.290454] which belongs to the cache kmalloc-4096 of size 4096 [ 27.292698] The buggy address is located 2216 bytes inside of [ 27.292698] 4096-byte region [ffff88006bf88a00, ffff88006bf89a00) [ 27.294140] The buggy address belongs to the page: [ 27.295052] page:ffffea0001afe200 count:1 mapcount:0 mapping:ffff88006bf88a00 index:0x0 compound_mapcount: 0 [ 27.296592] flags: 0x500000000008100(slab|head) [ 27.297078] raw: 0500000000008100 ffff88006bf88a00 0000000000000000 0000000100000001 [ 27.298476] raw: ffffea0001af26a0 ffffea0001afe020 ffff88003e800dc0 0000000000000000 [ 27.299742] page dumped because: kasan: bad access detected [ 27.300480] [ 27.300655] Memory state around the buggy address: [ 27.301171] ffff88006bf89180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.302219] ffff88006bf89200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.303559] >ffff88006bf89280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.304875] ^ [ 27.305333] ffff88006bf89300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.306164] ffff88006bf89380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.306981] ================================================================== [ 27.308253] Disabling lock debugging due to kernel taint [ 27.322091] Kernel panic - not syncing: panic_on_warn set ... [ 27.322091] [ 27.323708] CPU: 2 PID: 3113 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170904+ #14 [ 27.325480] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 27.326983] Call Trace: [ 27.327369] dump_stack+0x194/0x257 [ 27.327730] ? arch_local_irq_restore+0x53/0x53 [ 27.328303] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 27.328784] ? __dev_remove_pack+0x2e0/0x3b0 [ 27.329377] panic+0x1e4/0x417 [ 27.329699] ? __warn+0x1d9/0x1d9 [ 27.329989] ? __dev_remove_pack+0x305/0x3b0 [ 27.334159] kasan_end_report+0x50/0x50 [ 27.334489] kasan_report+0x137/0x340 [ 27.334772] __asan_report_load8_noabort+0x14/0x20 [ 27.335338] __dev_remove_pack+0x305/0x3b0 [ 27.335640] ? dev_get_by_name_rcu+0x270/0x270 [ 27.335954] ? refcount_sub_and_test+0x115/0x1b0 [ 27.336333] __unregister_prot_hook+0x211/0x280 [ 27.336673] packet_release+0x8bb/0xd70 [ 27.336949] ? packet_set_ring+0x1b70/0x1b70 [ 27.337296] ? dentry_free+0xcd/0x130 [ 27.337572] ? rcu_read_lock_sched_held+0x108/0x120 [ 27.337923] ? kmem_cache_free+0x249/0x280 [ 27.338261] ? dentry_free+0xd2/0x130 [ 27.338522] ? locks_remove_file+0x3fa/0x5a0 [ 27.338840] ? fcntl_setlk+0x10d0/0x10d0 [ 27.339133] ? __fsnotify_parent+0xb4/0x3a0 [ 27.339510] ? fsnotify+0x1af0/0x1af0 [ 27.339789] sock_release+0x8d/0x1e0 [ 27.340063] ? sock_release+0x8d/0x1e0 [ 27.340414] ? sock_release+0x1e0/0x1e0 [ 27.340794] sock_close+0x16/0x20 [ 27.341107] __fput+0x333/0x7f0 [ 27.341454] ? fput+0x140/0x140 [ 27.341750] ? check_same_owner+0x320/0x320 [ 27.342139] ? _raw_spin_unlock_irq+0x27/0x70 [ 27.342490] ____fput+0x15/0x20 [ 27.342782] task_work_run+0x199/0x270 [ 27.343144] ? task_work_cancel+0x210/0x210 [ 27.343656] ? _raw_spin_unlock+0x22/0x30 [ 27.344030] ? switch_task_namespaces+0x87/0xc0 [ 27.344481] do_exit+0xa52/0x1b40 [ 27.344808] ? plist_check_list+0xa0/0xa0 [ 27.345188] ? plist_del+0x47b/0x990 [ 27.345526] ? mm_update_next_owner+0x930/0x930 [ 27.345950] ? plist_add+0x760/0x760 [ 27.346291] ? check_same_owner+0x320/0x320 [ 27.346683] ? find_held_lock+0x39/0x1d0 [ 27.347057] ? check_noncircular+0x20/0x20 [ 27.347432] ? lock_downgrade+0x990/0x990 [ 27.347803] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 27.348299] ? find_held_lock+0x39/0x1d0 [ 27.348681] ? lock_downgrade+0x990/0x990 [ 27.349056] ? recalc_sigpending_tsk+0x117/0x150 [ 27.349482] ? recalc_sigpending+0x103/0x160 [ 27.349878] ? recalc_sigpending_tsk+0x150/0x150 [ 27.350324] ? get_signal+0x397/0x17e0 [ 27.350720] do_group_exit+0x149/0x400 [ 27.351751] ? __lock_is_held+0xbc/0x140 [ 27.352114] ? SyS_exit+0x30/0x30 [ 27.352430] ? _raw_spin_unlock_irq+0x27/0x70 [ 27.352836] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 27.353293] get_signal+0x7e8/0x17e0 [ 27.353642] ? ptrace_notify+0x130/0x130 [ 27.354009] ? __fget+0xbb/0x580 [ 27.354317] ? __lockdep_init_map+0xe4/0x650 [ 27.354719] ? lock_release+0xd70/0xd70 [ 27.355093] ? exit_robust_list+0x240/0x240 [ 27.355486] do_signal+0x94/0x1ee0 [ 27.355808] ? iterate_fd+0x3f0/0x3f0 [ 27.356152] ? setup_sigcontext+0x7d0/0x7d0 [ 27.356544] ? __lock_is_held+0xbc/0x140 [ 27.356913] ? __fget_light+0x29d/0x390 [ 27.357272] ? selinux_tun_dev_create+0xc0/0xc0 [ 27.357705] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 27.358227] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 27.358748] ? alloc_file+0x284/0x3a0 [ 27.359111] ? exit_to_usermode_loop+0x98/0x300 [ 27.359874] exit_to_usermode_loop+0x224/0x300 [ 27.360282] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 27.360764] syscall_return_slowpath+0x42f/0x500 [ 27.361261] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 27.361737] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 27.362223] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 27.362763] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 27.363217] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 27.363659] RIP: 0033:0x447299 [ 27.363946] RSP: 002b:00007f72461d6cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 27.364638] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 27.365287] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 27.365938] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 27.366588] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 27.367238] R13: 0000000000000000 R14: 00007f72461d79c0 R15: 00007f72461d7700 [ 27.367987] Dumping ftrace buffer: [ 27.368306] (ftrace buffer empty) [ 27.368638] Kernel Offset: disabled [ 27.368968] Rebooting in 86400 seconds..