2017/09/10 04:34:57 parsed 1 programs 2017/09/10 04:34:57 executed programs: 0 syzkaller login: [ 29.163043] dev_remove_pack: ffff88006b0e1cc0 not found [ 29.180320] ================================================================== [ 29.180866] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 29.181407] Read of size 8 at addr ffff88006bfbd728 by task syz-executor0/2997 [ 29.181962] [ 29.182111] CPU: 3 PID: 2997 Comm: syz-executor0 Not tainted 4.13.0-next-20170908+ #18 [ 29.182714] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 29.183377] Call Trace: [ 29.183590] dump_stack+0x194/0x257 [ 29.183896] ? arch_local_irq_restore+0x53/0x53 [ 29.184253] ? show_regs_print_info+0x65/0x65 [ 29.184660] ? __dev_remove_pack+0x305/0x3b0 [ 29.184986] print_address_description+0x73/0x250 [ 29.185397] ? __dev_remove_pack+0x305/0x3b0 [ 29.185731] kasan_report+0x24e/0x340 [ 29.186044] __asan_report_load8_noabort+0x14/0x20 [ 29.186431] __dev_remove_pack+0x305/0x3b0 [ 29.186776] ? dev_get_by_name_rcu+0x270/0x270 [ 29.187167] ? refcount_sub_and_test+0x115/0x1b0 [ 29.187577] __unregister_prot_hook+0x211/0x280 [ 29.187933] packet_release+0x8bb/0xd70 [ 29.188248] ? packet_set_ring+0x1b70/0x1b70 [ 29.188596] ? dentry_free+0xcd/0x130 [ 29.188891] ? rcu_read_lock_sched_held+0x108/0x120 [ 29.189268] ? kmem_cache_free+0x249/0x280 [ 29.189624] ? dentry_free+0xd2/0x130 [ 29.189917] ? locks_remove_file+0x3fa/0x5a0 [ 29.190256] ? fcntl_setlk+0x10d0/0x10d0 [ 29.190592] ? __fsnotify_parent+0xb4/0x3a0 [ 29.190919] ? fsnotify+0x1af0/0x1af0 [ 29.191243] sock_release+0x8d/0x1e0 [ 29.191516] ? sock_release+0x8d/0x1e0 [ 29.191803] ? sock_release+0x1e0/0x1e0 [ 29.192102] sock_close+0x16/0x20 [ 29.192373] __fput+0x333/0x7f0 [ 29.192664] ? fput+0x140/0x140 [ 29.192982] ? check_same_owner+0x320/0x320 [ 29.193297] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.193655] ____fput+0x15/0x20 [ 29.193918] task_work_run+0x199/0x270 [ 29.194229] ? task_work_cancel+0x210/0x210 [ 29.194575] ? _raw_spin_unlock+0x22/0x30 [ 29.194863] ? switch_task_namespaces+0x87/0xc0 [ 29.195205] do_exit+0xa52/0x1b40 [ 29.195444] ? plist_check_list+0xa0/0xa0 [ 29.195739] ? plist_del+0x47b/0x990 [ 29.196038] ? mm_update_next_owner+0x930/0x930 [ 29.197019] ? plist_add+0x760/0x760 [ 29.197289] ? check_same_owner+0x320/0x320 [ 29.197597] ? osq_unlock+0x350/0x350 [ 29.197859] ? find_held_lock+0x39/0x1d0 [ 29.198145] ? check_noncircular+0x20/0x20 [ 29.198438] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 29.198818] ? find_held_lock+0x39/0x1d0 [ 29.199110] ? lock_downgrade+0x990/0x990 [ 29.199397] ? recalc_sigpending_tsk+0x117/0x150 [ 29.199723] ? recalc_sigpending+0x103/0x160 [ 29.200029] ? recalc_sigpending_tsk+0x150/0x150 [ 29.200361] ? get_signal+0x397/0x17e0 [ 29.200636] do_group_exit+0x149/0x400 [ 29.200904] ? __lock_is_held+0xbc/0x140 [ 29.201187] ? SyS_exit+0x30/0x30 [ 29.201427] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.201738] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.202085] get_signal+0x7e8/0x17e0 [ 29.202365] ? ptrace_notify+0x130/0x130 [ 29.202644] ? __fget+0xbb/0x580 [ 29.202878] ? __lockdep_init_map+0xe4/0x650 [ 29.203182] ? lock_release+0xd70/0xd70 [ 29.203461] ? exit_robust_list+0x240/0x240 [ 29.203766] do_signal+0x94/0x1ee0 [ 29.204017] ? iterate_fd+0x3f0/0x3f0 [ 29.204284] ? setup_sigcontext+0x7d0/0x7d0 [ 29.204584] ? __lock_is_held+0xbc/0x140 [ 29.204873] ? __fget_light+0x29d/0x390 [ 29.205148] ? selinux_tun_dev_create+0xc0/0xc0 [ 29.205468] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 29.205860] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 29.206219] ? alloc_file+0x284/0x3a0 [ 29.206480] ? exit_to_usermode_loop+0x98/0x300 [ 29.206804] exit_to_usermode_loop+0x224/0x300 [ 29.207135] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 29.207524] syscall_return_slowpath+0x42f/0x500 [ 29.207853] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 29.208198] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 29.208541] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.208886] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.209220] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 29.209546] RIP: 0033:0x447299 [ 29.209766] RSP: 002b:00007f58dbd45cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 29.210294] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 29.210787] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 29.211300] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 29.211802] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 29.212300] R13: 0000000000000000 R14: 00007f58dbd469c0 R15: 00007f58dbd46700 [ 29.212807] [ 29.212923] Allocated by task 2996: [ 29.213174] save_stack_trace+0x16/0x20 [ 29.213449] save_stack+0x43/0xd0 [ 29.213688] kasan_kmalloc+0xad/0xe0 [ 29.213945] kmem_cache_alloc_trace+0x136/0x750 [ 29.214265] fanout_add+0xa50/0x1190 [ 29.214522] packet_setsockopt+0xfdc/0x1e80 [ 29.214819] SyS_setsockopt+0x189/0x360 [ 29.215089] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 29.215429] [ 29.215549] Freed by task 2997: [ 29.215848] save_stack_trace+0x16/0x20 [ 29.216273] save_stack+0x43/0xd0 [ 29.216638] kasan_slab_free+0x71/0xc0 [ 29.217044] kfree+0xca/0x250 [ 29.217376] packet_release+0xa8f/0xd70 [ 29.218186] sock_release+0x8d/0x1e0 [ 29.218408] sock_close+0x16/0x20 [ 29.218613] __fput+0x333/0x7f0 [ 29.218808] ____fput+0x15/0x20 [ 29.219003] task_work_run+0x199/0x270 [ 29.219248] do_exit+0xa52/0x1b40 [ 29.219459] do_group_exit+0x149/0x400 [ 29.219687] get_signal+0x7e8/0x17e0 [ 29.219905] do_signal+0x94/0x1ee0 [ 29.220128] exit_to_usermode_loop+0x224/0x300 [ 29.220413] syscall_return_slowpath+0x42f/0x500 [ 29.220692] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 29.220968] [ 29.221105] The buggy address belongs to the object at ffff88006bfbce80 [ 29.221105] which belongs to the cache kmalloc-4096 of size 4096 [ 29.222211] The buggy address is located 2216 bytes inside of [ 29.222211] 4096-byte region [ffff88006bfbce80, ffff88006bfbde80) [ 29.223196] The buggy address belongs to the page: [ 29.223669] page:ffffea0001afef00 count:1 mapcount:0 mapping:ffff88006bfbce80 index:0x0 compound_mapcount: 0 [ 29.224421] flags: 0x500000000008100(slab|head) [ 29.224744] raw: 0500000000008100 ffff88006bfbce80 0000000000000000 0000000100000001 [ 29.225278] raw: ffffea0001ad0820 ffffea0001a47e20 ffff88003e800dc0 0000000000000000 [ 29.225818] page dumped because: kasan: bad access detected [ 29.226228] [ 29.226344] Memory state around the buggy address: [ 29.226682] ffff88006bfbd600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.227175] ffff88006bfbd680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.227674] >ffff88006bfbd700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.228168] ^ [ 29.228491] ffff88006bfbd780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.228989] ffff88006bfbd800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.229483] ================================================================== [ 29.229978] Disabling lock debugging due to kernel taint [ 29.230373] Kernel panic - not syncing: panic_on_warn set ... [ 29.230373] [ 29.230900] CPU: 3 PID: 2997 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170908+ #18 [ 29.231522] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 29.232076] Call Trace: [ 29.232263] dump_stack+0x194/0x257 [ 29.232536] ? arch_local_irq_restore+0x53/0x53 [ 29.232869] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.233206] ? __dev_remove_pack+0x2f0/0x3b0 [ 29.233522] panic+0x1e4/0x417 [ 29.233746] ? __warn+0x1d9/0x1d9 [ 29.233995] ? __dev_remove_pack+0x305/0x3b0 [ 29.234304] kasan_end_report+0x50/0x50 [ 29.234577] kasan_report+0x137/0x340 [ 29.234852] __asan_report_load8_noabort+0x14/0x20 [ 29.235197] __dev_remove_pack+0x305/0x3b0 [ 29.235527] ? dev_get_by_name_rcu+0x270/0x270 [ 29.235901] ? refcount_sub_and_test+0x115/0x1b0 [ 29.236245] __unregister_prot_hook+0x211/0x280 [ 29.236608] packet_release+0x8bb/0xd70 [ 29.236916] ? packet_set_ring+0x1b70/0x1b70 [ 29.237251] ? dentry_free+0xcd/0x130 [ 29.237534] ? rcu_read_lock_sched_held+0x108/0x120 [ 29.237874] ? kmem_cache_free+0x249/0x280 [ 29.238162] ? dentry_free+0xd2/0x130 [ 29.238423] ? locks_remove_file+0x3fa/0x5a0 [ 29.238725] ? fcntl_setlk+0x10d0/0x10d0 [ 29.239693] ? __fsnotify_parent+0xb4/0x3a0 [ 29.239993] ? fsnotify+0x1af0/0x1af0 [ 29.240264] sock_release+0x8d/0x1e0 [ 29.240540] ? sock_release+0x8d/0x1e0 [ 29.240806] ? sock_release+0x1e0/0x1e0 [ 29.241083] sock_close+0x16/0x20 [ 29.241319] __fput+0x333/0x7f0 [ 29.241556] ? fput+0x140/0x140 [ 29.241781] ? check_same_owner+0x320/0x320 [ 29.242084] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.242391] ____fput+0x15/0x20 [ 29.242629] task_work_run+0x199/0x270 [ 29.242895] ? task_work_cancel+0x210/0x210 [ 29.243199] ? _raw_spin_unlock+0x22/0x30 [ 29.243492] ? switch_task_namespaces+0x87/0xc0 [ 29.243824] do_exit+0xa52/0x1b40 [ 29.244069] ? plist_check_list+0xa0/0xa0 [ 29.244357] ? plist_del+0x47b/0x990 [ 29.244625] ? mm_update_next_owner+0x930/0x930 [ 29.244949] ? plist_add+0x760/0x760 [ 29.245233] ? check_same_owner+0x320/0x320 [ 29.245528] ? osq_unlock+0x350/0x350 [ 29.245803] ? find_held_lock+0x39/0x1d0 [ 29.246091] ? check_noncircular+0x20/0x20 [ 29.246382] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 29.246764] ? find_held_lock+0x39/0x1d0 [ 29.247055] ? lock_downgrade+0x990/0x990 [ 29.247338] ? recalc_sigpending_tsk+0x117/0x150 [ 29.247671] ? recalc_sigpending+0x103/0x160 [ 29.247974] ? recalc_sigpending_tsk+0x150/0x150 [ 29.248304] ? get_signal+0x397/0x17e0 [ 29.248572] do_group_exit+0x149/0x400 [ 29.248846] ? __lock_is_held+0xbc/0x140 [ 29.249132] ? SyS_exit+0x30/0x30 [ 29.249371] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.249687] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.250037] get_signal+0x7e8/0x17e0 [ 29.250303] ? ptrace_notify+0x130/0x130 [ 29.250579] ? __fget+0xbb/0x580 [ 29.250819] ? __lockdep_init_map+0xe4/0x650 [ 29.251127] ? lock_release+0xd70/0xd70 [ 29.251404] ? exit_robust_list+0x240/0x240 [ 29.251711] do_signal+0x94/0x1ee0 [ 29.251955] ? iterate_fd+0x3f0/0x3f0 [ 29.252223] ? setup_sigcontext+0x7d0/0x7d0 [ 29.252524] ? __lock_is_held+0xbc/0x140 [ 29.252816] ? __fget_light+0x29d/0x390 [ 29.253096] ? selinux_tun_dev_create+0xc0/0xc0 [ 29.253414] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 29.253812] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 29.254175] ? alloc_file+0x284/0x3a0 [ 29.254436] ? exit_to_usermode_loop+0x98/0x300 [ 29.254765] exit_to_usermode_loop+0x224/0x300 [ 29.255087] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 29.255470] syscall_return_slowpath+0x42f/0x500 [ 29.255812] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 29.256163] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 29.256506] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.256857] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.257189] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 29.257513] RIP: 0033:0x447299 [ 29.257739] RSP: 002b:00007f58dbd45cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 29.258267] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 29.258767] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 29.259265] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 29.259769] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 29.260961] R13: 0000000000000000 R14: 00007f58dbd469c0 R15: 00007f58dbd46700 [ 29.261517] Dumping ftrace buffer: [ 29.261761] (ftrace buffer empty) [ 29.262026] Kernel Offset: disabled [ 29.262277] Rebooting in 86400 seconds..