2017/09/08 22:16:47 parsed 1 programs 2017/09/08 22:16:47 executed programs: 0 syzkaller login: [ 28.104152] dev_remove_pack: ffff88006ad289c0 not found [ 28.123287] ================================================================== [ 28.123832] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 28.124309] Read of size 8 at addr ffff88006d30e968 by task syz-executor0/3006 [ 28.124811] [ 28.124930] CPU: 3 PID: 3006 Comm: syz-executor0 Not tainted 4.13.0-next-20170908+ #18 [ 28.125494] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 28.126053] Call Trace: [ 28.126238] dump_stack+0x194/0x257 [ 28.126492] ? arch_local_irq_restore+0x53/0x53 [ 28.126815] ? show_regs_print_info+0x65/0x65 [ 28.127131] ? __dev_remove_pack+0x305/0x3b0 [ 28.127436] print_address_description+0x73/0x250 [ 28.127767] ? __dev_remove_pack+0x305/0x3b0 [ 28.128068] kasan_report+0x24e/0x340 [ 28.128335] __asan_report_load8_noabort+0x14/0x20 [ 28.128798] __dev_remove_pack+0x305/0x3b0 [ 28.129100] ? dev_get_by_name_rcu+0x270/0x270 [ 28.129421] ? refcount_sub_and_test+0x115/0x1b0 [ 28.129790] __unregister_prot_hook+0x211/0x280 [ 28.130319] packet_release+0x8bb/0xd70 [ 28.130692] ? packet_set_ring+0x1b70/0x1b70 [ 28.131095] ? dentry_free+0xcd/0x130 [ 28.131363] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.131706] ? kmem_cache_free+0x249/0x280 [ 28.132037] ? dentry_free+0xd2/0x130 [ 28.132316] ? locks_remove_file+0x3fa/0x5a0 [ 28.132622] ? fcntl_setlk+0x10d0/0x10d0 [ 28.132905] ? __fsnotify_parent+0xb4/0x3a0 [ 28.133204] ? fsnotify+0x1af0/0x1af0 [ 28.133472] sock_release+0x8d/0x1e0 [ 28.133728] ? sock_release+0x8d/0x1e0 [ 28.133998] ? sock_release+0x1e0/0x1e0 [ 28.134275] sock_close+0x16/0x20 [ 28.134539] __fput+0x333/0x7f0 [ 28.134868] ? fput+0x140/0x140 [ 28.135125] ? check_same_owner+0x320/0x320 [ 28.135424] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.135743] ____fput+0x15/0x20 [ 28.135974] task_work_run+0x199/0x270 [ 28.136248] ? task_work_cancel+0x210/0x210 [ 28.136617] ? _raw_spin_unlock+0x22/0x30 [ 28.136995] ? switch_task_namespaces+0x87/0xc0 [ 28.137422] do_exit+0xa52/0x1b40 [ 28.137736] ? plist_check_list+0xa0/0xa0 [ 28.138120] ? plist_del+0x47b/0x990 [ 28.138492] ? mm_update_next_owner+0x930/0x930 [ 28.138959] ? plist_add+0x760/0x760 [ 28.139328] ? check_same_owner+0x320/0x320 [ 28.139767] ? find_held_lock+0x39/0x1d0 [ 28.140260] ? check_noncircular+0x20/0x20 [ 28.140662] ? lock_downgrade+0x990/0x990 [ 28.141038] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 28.141573] ? find_held_lock+0x39/0x1d0 [ 28.141945] ? lock_downgrade+0x990/0x990 [ 28.142317] ? recalc_sigpending_tsk+0x117/0x150 [ 28.142770] ? recalc_sigpending+0x103/0x160 [ 28.143192] ? recalc_sigpending_tsk+0x150/0x150 [ 28.143623] ? get_signal+0x397/0x17e0 [ 28.143943] do_group_exit+0x149/0x400 [ 28.144211] ? __lock_is_held+0xbc/0x140 [ 28.144495] ? SyS_exit+0x30/0x30 [ 28.144734] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.145045] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.145418] get_signal+0x7e8/0x17e0 [ 28.145703] ? ptrace_notify+0x130/0x130 [ 28.146002] ? __fget+0xbb/0x580 [ 28.146304] ? __lockdep_init_map+0xe4/0x650 [ 28.146637] ? lock_release+0xd70/0xd70 [ 28.146969] ? exit_robust_list+0x240/0x240 [ 28.147330] do_signal+0x94/0x1ee0 [ 28.147620] ? iterate_fd+0x3f0/0x3f0 [ 28.147900] ? setup_sigcontext+0x7d0/0x7d0 [ 28.148201] ? __lock_is_held+0xbc/0x140 [ 28.148582] ? __fget_light+0x29d/0x390 [ 28.148863] ? selinux_tun_dev_create+0xc0/0xc0 [ 28.149202] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 28.149632] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.149987] ? alloc_file+0x284/0x3a0 [ 28.150270] ? exit_to_usermode_loop+0x98/0x300 [ 28.150616] exit_to_usermode_loop+0x224/0x300 [ 28.151047] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 28.151945] syscall_return_slowpath+0x42f/0x500 [ 28.152329] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 28.152679] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 28.153024] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.153413] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.153761] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.154090] RIP: 0033:0x447299 [ 28.154312] RSP: 002b:00007f8ac4be7cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 28.154929] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 28.155472] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 28.156049] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 28.156644] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 28.157189] R13: 0000000000000000 R14: 00007f8ac4be89c0 R15: 00007f8ac4be8700 [ 28.157730] [ 28.157850] Allocated by task 3005: [ 28.158105] save_stack_trace+0x16/0x20 [ 28.158424] save_stack+0x43/0xd0 [ 28.158695] kasan_kmalloc+0xad/0xe0 [ 28.158960] kmem_cache_alloc_trace+0x136/0x750 [ 28.159325] fanout_add+0xa50/0x1190 [ 28.159607] packet_setsockopt+0xfdc/0x1e80 [ 28.159918] SyS_setsockopt+0x189/0x360 [ 28.160234] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 28.160574] [ 28.160743] Freed by task 3006: [ 28.161011] save_stack_trace+0x16/0x20 [ 28.161284] save_stack+0x43/0xd0 [ 28.161549] kasan_slab_free+0x71/0xc0 [ 28.161856] kfree+0xca/0x250 [ 28.162098] packet_release+0xa8f/0xd70 [ 28.162406] sock_release+0x8d/0x1e0 [ 28.162663] sock_close+0x16/0x20 [ 28.162925] __fput+0x333/0x7f0 [ 28.163164] ____fput+0x15/0x20 [ 28.163404] task_work_run+0x199/0x270 [ 28.163707] do_exit+0xa52/0x1b40 [ 28.163944] do_group_exit+0x149/0x400 [ 28.164209] get_signal+0x7e8/0x17e0 [ 28.164485] do_signal+0x94/0x1ee0 [ 28.164742] exit_to_usermode_loop+0x224/0x300 [ 28.165094] syscall_return_slowpath+0x42f/0x500 [ 28.165452] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.165795] [ 28.165959] The buggy address belongs to the object at ffff88006d30e0c0 [ 28.165959] which belongs to the cache kmalloc-4096 of size 4096 [ 28.166849] The buggy address is located 2216 bytes inside of [ 28.166849] 4096-byte region [ffff88006d30e0c0, ffff88006d30f0c0) [ 28.167661] The buggy address belongs to the page: [ 28.167997] page:ffffea0001b4c380 count:1 mapcount:0 mapping:ffff88006d30e0c0 index:0x0 compound_mapcount: 0 [ 28.168762] flags: 0x500000000008100(slab|head) [ 28.169083] raw: 0500000000008100 ffff88006d30e0c0 0000000000000000 0000000100000001 [ 28.169642] raw: ffffea0001b411a0 ffffea0001b4a820 ffff88003e800dc0 0000000000000000 [ 28.170223] page dumped because: kasan: bad access detected [ 28.170625] [ 28.170740] Memory state around the buggy address: [ 28.171079] ffff88006d30e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.171643] ffff88006d30e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.172180] >ffff88006d30e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.173133] ^ [ 28.173592] ffff88006d30e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.174102] ffff88006d30ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.174601] ================================================================== [ 28.175107] Disabling lock debugging due to kernel taint [ 28.175619] Kernel panic - not syncing: panic_on_warn set ... [ 28.175619] [ 28.176239] CPU: 3 PID: 3006 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170908+ #18 [ 28.176983] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 28.177606] Call Trace: [ 28.177816] dump_stack+0x194/0x257 [ 28.178072] ? arch_local_irq_restore+0x53/0x53 [ 28.178492] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.178896] ? __dev_remove_pack+0x2f0/0x3b0 [ 28.179228] panic+0x1e4/0x417 [ 28.179487] ? __warn+0x1d9/0x1d9 [ 28.179752] ? __dev_remove_pack+0x305/0x3b0 [ 28.180115] kasan_end_report+0x50/0x50 [ 28.180426] kasan_report+0x137/0x340 [ 28.180700] __asan_report_load8_noabort+0x14/0x20 [ 28.181057] __dev_remove_pack+0x305/0x3b0 [ 28.181412] ? dev_get_by_name_rcu+0x270/0x270 [ 28.181743] ? refcount_sub_and_test+0x115/0x1b0 [ 28.182107] __unregister_prot_hook+0x211/0x280 [ 28.182479] packet_release+0x8bb/0xd70 [ 28.182768] ? packet_set_ring+0x1b70/0x1b70 [ 28.183123] ? dentry_free+0xcd/0x130 [ 28.183433] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.183781] ? kmem_cache_free+0x249/0x280 [ 28.184160] ? dentry_free+0xd2/0x130 [ 28.184436] ? locks_remove_file+0x3fa/0x5a0 [ 28.184764] ? fcntl_setlk+0x10d0/0x10d0 [ 28.185093] ? __fsnotify_parent+0xb4/0x3a0 [ 28.185423] ? fsnotify+0x1af0/0x1af0 [ 28.185691] sock_release+0x8d/0x1e0 [ 28.185949] ? sock_release+0x8d/0x1e0 [ 28.186252] ? sock_release+0x1e0/0x1e0 [ 28.186545] sock_close+0x16/0x20 [ 28.186805] __fput+0x333/0x7f0 [ 28.187107] ? fput+0x140/0x140 [ 28.187388] ? check_same_owner+0x320/0x320 [ 28.187686] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.187992] ____fput+0x15/0x20 [ 28.188260] task_work_run+0x199/0x270 [ 28.188611] ? task_work_cancel+0x210/0x210 [ 28.188968] ? _raw_spin_unlock+0x22/0x30 [ 28.189348] ? switch_task_namespaces+0x87/0xc0 [ 28.189721] do_exit+0xa52/0x1b40 [ 28.189979] ? plist_check_list+0xa0/0xa0 [ 28.190280] ? plist_del+0x47b/0x990 [ 28.190547] ? mm_update_next_owner+0x930/0x930 [ 28.190864] ? plist_add+0x760/0x760 [ 28.191145] ? check_same_owner+0x320/0x320 [ 28.191485] ? find_held_lock+0x39/0x1d0 [ 28.191770] ? check_noncircular+0x20/0x20 [ 28.192147] ? lock_downgrade+0x990/0x990 [ 28.192455] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 28.192873] ? find_held_lock+0x39/0x1d0 [ 28.193196] ? lock_downgrade+0x990/0x990 [ 28.193521] ? recalc_sigpending_tsk+0x117/0x150 [ 28.194114] ? recalc_sigpending+0x103/0x160 [ 28.194480] ? recalc_sigpending_tsk+0x150/0x150 [ 28.194842] ? get_signal+0x397/0x17e0 [ 28.195160] do_group_exit+0x149/0x400 [ 28.195473] ? __lock_is_held+0xbc/0x140 [ 28.195742] ? SyS_exit+0x30/0x30 [ 28.195972] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.196364] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.196739] get_signal+0x7e8/0x17e0 [ 28.197020] ? ptrace_notify+0x130/0x130 [ 28.197326] ? __fget+0xbb/0x580 [ 28.197584] ? __lockdep_init_map+0xe4/0x650 [ 28.198041] ? lock_release+0xd70/0xd70 [ 28.198333] ? exit_robust_list+0x240/0x240 [ 28.198725] do_signal+0x94/0x1ee0 [ 28.198996] ? iterate_fd+0x3f0/0x3f0 [ 28.199280] ? setup_sigcontext+0x7d0/0x7d0 [ 28.199602] ? __lock_is_held+0xbc/0x140 [ 28.199910] ? __fget_light+0x29d/0x390 [ 28.200260] ? selinux_tun_dev_create+0xc0/0xc0 [ 28.200664] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 28.201040] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.201452] ? alloc_file+0x284/0x3a0 [ 28.201723] ? exit_to_usermode_loop+0x98/0x300 [ 28.202044] exit_to_usermode_loop+0x224/0x300 [ 28.202371] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 28.202766] syscall_return_slowpath+0x42f/0x500 [ 28.203142] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 28.203484] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 28.203820] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.204173] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.204524] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.204846] RIP: 0033:0x447299 [ 28.205128] RSP: 002b:00007f8ac4be7cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 28.205731] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 28.206278] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 28.206831] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 28.207505] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 28.208037] R13: 0000000000000000 R14: 00007f8ac4be89c0 R15: 00007f8ac4be8700 [ 28.208717] Dumping ftrace buffer: [ 28.208959] (ftrace buffer empty) [ 28.209220] Kernel Offset: disabled [ 28.209502] Rebooting in 86400 seconds..