2017/09/03 21:00:57 parsed 1 programs 2017/09/03 21:00:57 executed programs: 0 syzkaller login: [ 32.897785] dev_remove_pack: ffff880068ea2880 not found [ 32.917244] ================================================================== [ 32.917987] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 32.918638] Read of size 8 at addr ffff880067f928e8 by task syz-executor0/3087 [ 32.919219] [ 32.919367] CPU: 2 PID: 3087 Comm: syz-executor0 Not tainted 4.13.0-rc7-next-20170901+ #13 [ 32.919942] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 32.920530] Call Trace: [ 32.920731] dump_stack+0x194/0x257 [ 32.921059] ? arch_local_irq_restore+0x53/0x53 [ 32.921412] ? show_regs_print_info+0x65/0x65 [ 32.921784] ? __dev_remove_pack+0x305/0x3b0 [ 32.922119] print_address_description+0x73/0x250 [ 32.922537] ? __dev_remove_pack+0x305/0x3b0 [ 32.923343] kasan_report+0x24e/0x340 [ 32.923655] __asan_report_load8_noabort+0x14/0x20 [ 32.924040] __dev_remove_pack+0x305/0x3b0 [ 32.924378] ? dev_get_by_name_rcu+0x270/0x270 [ 32.924752] ? refcount_sub_and_test+0x115/0x1b0 [ 32.925117] __unregister_prot_hook+0x211/0x280 [ 32.925474] packet_release+0x8bb/0xd70 [ 32.925772] ? packet_set_ring+0x1b70/0x1b70 [ 32.926134] ? dentry_free+0xcd/0x130 [ 32.926427] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.926797] ? kmem_cache_free+0x249/0x280 [ 32.927148] ? dentry_free+0xd2/0x130 [ 32.927442] ? locks_remove_file+0x3fa/0x5a0 [ 32.927766] ? fcntl_setlk+0x10d0/0x10d0 [ 32.928081] ? __fsnotify_parent+0xb4/0x3a0 [ 32.928424] ? fsnotify+0x1af0/0x1af0 [ 32.928722] sock_release+0x8d/0x1e0 [ 32.929009] ? sock_release+0x8d/0x1e0 [ 32.929319] ? sock_release+0x1e0/0x1e0 [ 32.929624] sock_close+0x16/0x20 [ 32.929891] __fput+0x333/0x7f0 [ 32.930138] ? fput+0x140/0x140 [ 32.930407] ? check_same_owner+0x320/0x320 [ 32.930731] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.931072] ____fput+0x15/0x20 [ 32.931325] task_work_run+0x199/0x270 [ 32.931609] ? task_work_cancel+0x210/0x210 [ 32.931912] ? _raw_spin_unlock+0x22/0x30 [ 32.932200] ? switch_task_namespaces+0x87/0xc0 [ 32.932525] do_exit+0xa52/0x1b40 [ 32.932793] ? plist_check_list+0xa0/0xa0 [ 32.933171] ? plist_del+0x47b/0x990 [ 32.933504] ? mm_update_next_owner+0x930/0x930 [ 32.933957] ? plist_add+0x760/0x760 [ 32.934310] ? check_same_owner+0x320/0x320 [ 32.934724] ? find_held_lock+0x39/0x1d0 [ 32.935092] ? check_noncircular+0x20/0x20 [ 32.935527] ? lock_downgrade+0x990/0x990 [ 32.935976] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.936545] ? find_held_lock+0x39/0x1d0 [ 32.936940] ? lock_downgrade+0x990/0x990 [ 32.937309] ? recalc_sigpending_tsk+0x117/0x150 [ 32.937730] ? recalc_sigpending+0x103/0x160 [ 32.938134] ? recalc_sigpending_tsk+0x150/0x150 [ 32.938594] ? get_signal+0x397/0x17e0 [ 32.939001] do_group_exit+0x149/0x400 [ 32.939350] ? __lock_is_held+0xbc/0x140 [ 32.939627] ? SyS_exit+0x30/0x30 [ 32.939866] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.940173] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.940528] get_signal+0x7e8/0x17e0 [ 32.940806] ? ptrace_notify+0x130/0x130 [ 32.941180] ? __fget+0xbb/0x580 [ 32.941532] ? __lockdep_init_map+0xe4/0x650 [ 32.941980] ? lock_release+0xd70/0xd70 [ 32.942285] ? exit_robust_list+0x240/0x240 [ 32.942590] do_signal+0x94/0x1ee0 [ 32.942840] ? iterate_fd+0x3f0/0x3f0 [ 32.943106] ? setup_sigcontext+0x7d0/0x7d0 [ 32.943414] ? __lock_is_held+0xbc/0x140 [ 32.943703] ? __fget_light+0x29d/0x390 [ 32.943979] ? selinux_tun_dev_create+0xc0/0xc0 [ 32.944581] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 32.944976] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 32.945338] ? alloc_file+0x284/0x3a0 [ 32.945602] ? exit_to_usermode_loop+0x98/0x300 [ 32.945923] exit_to_usermode_loop+0x224/0x300 [ 32.946240] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 32.946626] syscall_return_slowpath+0x42f/0x500 [ 32.946953] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 32.947312] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 32.947651] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.947996] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.948331] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.948657] RIP: 0033:0x447299 [ 32.948878] RSP: 002b:00007fbd9ea11cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 32.949403] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 32.949902] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 32.950402] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 32.950893] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 32.951392] R13: 0000000000000000 R14: 00007fbd9ea129c0 R15: 00007fbd9ea12700 [ 32.951896] [ 32.952012] Allocated by task 3087: [ 32.952262] save_stack_trace+0x16/0x20 [ 32.952537] save_stack+0x43/0xd0 [ 32.952776] kasan_kmalloc+0xad/0xe0 [ 32.953032] kmem_cache_alloc_trace+0x136/0x750 [ 32.953352] fanout_add+0xa50/0x1190 [ 32.953608] packet_setsockopt+0xfdc/0x1e80 [ 32.953905] SyS_setsockopt+0x189/0x360 [ 32.954177] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.954498] [ 32.954614] Freed by task 3087: [ 32.954841] save_stack_trace+0x16/0x20 [ 32.955113] save_stack+0x43/0xd0 [ 32.955359] kasan_slab_free+0x71/0xc0 [ 32.955626] kfree+0xca/0x250 [ 32.955841] packet_release+0xa8f/0xd70 [ 32.956114] sock_release+0x8d/0x1e0 [ 32.956368] sock_close+0x16/0x20 [ 32.956605] __fput+0x333/0x7f0 [ 32.956834] ____fput+0x15/0x20 [ 32.957060] task_work_run+0x199/0x270 [ 32.957326] do_exit+0xa52/0x1b40 [ 32.957563] do_group_exit+0x149/0x400 [ 32.957831] get_signal+0x7e8/0x17e0 [ 32.958086] do_signal+0x94/0x1ee0 [ 32.958329] exit_to_usermode_loop+0x224/0x300 [ 32.958643] syscall_return_slowpath+0x42f/0x500 [ 32.958967] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.959302] [ 32.959417] The buggy address belongs to the object at ffff880067f92040 [ 32.959417] which belongs to the cache kmalloc-4096 of size 4096 [ 32.960286] The buggy address is located 2216 bytes inside of [ 32.960286] 4096-byte region [ffff880067f92040, ffff880067f93040) [ 32.961102] The buggy address belongs to the page: [ 32.961442] page:ffffea00019fe480 count:1 mapcount:0 mapping:ffff880067f92040 index:0x0 compound_mapcount: 0 [ 32.962122] flags: 0x500000000008100(slab|head) [ 32.962488] raw: 0500000000008100 ffff880067f92040 0000000000000000 0000000100000001 [ 32.963025] raw: ffffea00019fe5a0 ffff88006d800a50 ffff88003e800dc0 0000000000000000 [ 32.963569] page dumped because: kasan: bad access detected [ 32.963959] [ 32.964074] Memory state around the buggy address: [ 32.964413] ffff880067f92780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.964910] ffff880067f92800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.965673] >ffff880067f92880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.966241] ^ [ 32.966700] ffff880067f92900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.967239] ffff880067f92980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.967769] ================================================================== [ 32.968397] Disabling lock debugging due to kernel taint [ 32.968824] Kernel panic - not syncing: panic_on_warn set ... [ 32.968824] [ 32.969563] CPU: 2 PID: 3087 Comm: syz-executor0 Tainted: G B 4.13.0-rc7-next-20170901+ #13 [ 32.970212] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 32.970873] Call Trace: [ 32.971094] dump_stack+0x194/0x257 [ 32.971383] ? arch_local_irq_restore+0x53/0x53 [ 32.971787] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.972142] ? __dev_remove_pack+0x2a0/0x3b0 [ 32.972484] panic+0x1e4/0x417 [ 32.972744] ? __warn+0x1d9/0x1d9 [ 32.973024] ? __dev_remove_pack+0x305/0x3b0 [ 32.973324] kasan_end_report+0x50/0x50 [ 32.973653] kasan_report+0x137/0x340 [ 32.974002] __asan_report_load8_noabort+0x14/0x20 [ 32.974402] __dev_remove_pack+0x305/0x3b0 [ 32.974764] ? dev_get_by_name_rcu+0x270/0x270 [ 32.975173] ? refcount_sub_and_test+0x115/0x1b0 [ 32.975535] __unregister_prot_hook+0x211/0x280 [ 32.975888] packet_release+0x8bb/0xd70 [ 32.976221] ? packet_set_ring+0x1b70/0x1b70 [ 32.976565] ? dentry_free+0xcd/0x130 [ 32.976875] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.977286] ? kmem_cache_free+0x249/0x280 [ 32.977599] ? dentry_free+0xd2/0x130 [ 32.977892] ? locks_remove_file+0x3fa/0x5a0 [ 32.978251] ? fcntl_setlk+0x10d0/0x10d0 [ 32.978576] ? __fsnotify_parent+0xb4/0x3a0 [ 32.978899] ? fsnotify+0x1af0/0x1af0 [ 32.979197] sock_release+0x8d/0x1e0 [ 32.979506] ? sock_release+0x8d/0x1e0 [ 32.979792] ? sock_release+0x1e0/0x1e0 [ 32.980092] sock_close+0x16/0x20 [ 32.980367] __fput+0x333/0x7f0 [ 32.980660] ? fput+0x140/0x140 [ 32.980916] ? check_same_owner+0x320/0x320 [ 32.981206] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.981517] ____fput+0x15/0x20 [ 32.981806] task_work_run+0x199/0x270 [ 32.982094] ? task_work_cancel+0x210/0x210 [ 32.982387] ? _raw_spin_unlock+0x22/0x30 [ 32.982671] ? switch_task_namespaces+0x87/0xc0 [ 32.983010] do_exit+0xa52/0x1b40 [ 32.983247] ? plist_check_list+0xa0/0xa0 [ 32.983522] ? plist_del+0x47b/0x990 [ 32.983754] ? mm_update_next_owner+0x930/0x930 [ 32.984056] ? plist_add+0x760/0x760 [ 32.984291] ? check_same_owner+0x320/0x320 [ 32.984559] ? find_held_lock+0x39/0x1d0 [ 32.984820] ? check_noncircular+0x20/0x20 [ 32.985099] ? lock_downgrade+0x990/0x990 [ 32.985360] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.985697] ? find_held_lock+0x39/0x1d0 [ 32.985952] ? lock_downgrade+0x990/0x990 [ 32.986227] ? recalc_sigpending_tsk+0x117/0x150 [ 32.986527] ? recalc_sigpending+0x103/0x160 [ 32.987080] ? recalc_sigpending_tsk+0x150/0x150 [ 32.987514] ? get_signal+0x397/0x17e0 [ 32.987755] do_group_exit+0x149/0x400 [ 32.987998] ? __lock_is_held+0xbc/0x140 [ 32.988270] ? SyS_exit+0x30/0x30 [ 32.988493] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.988777] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.989090] get_signal+0x7e8/0x17e0 [ 32.989347] ? ptrace_notify+0x130/0x130 [ 32.989604] ? __fget+0xbb/0x580 [ 32.989814] ? __lockdep_init_map+0xe4/0x650 [ 32.990088] ? lock_release+0xd70/0xd70 [ 32.990336] ? exit_robust_list+0x240/0x240 [ 32.990626] do_signal+0x94/0x1ee0 [ 32.990850] ? iterate_fd+0x3f0/0x3f0 [ 32.991153] ? setup_sigcontext+0x7d0/0x7d0 [ 32.991590] ? __lock_is_held+0xbc/0x140 [ 32.991862] ? __fget_light+0x29d/0x390 [ 32.992113] ? selinux_tun_dev_create+0xc0/0xc0 [ 32.992404] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 32.992769] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 32.993105] ? alloc_file+0x284/0x3a0 [ 32.993341] ? exit_to_usermode_loop+0x98/0x300 [ 32.993667] exit_to_usermode_loop+0x224/0x300 [ 32.993980] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 32.994357] syscall_return_slowpath+0x42f/0x500 [ 32.994680] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 32.995036] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 32.995388] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.995727] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.996065] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.996385] RIP: 0033:0x447299 [ 32.996602] RSP: 002b:00007fbd9ea11cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 32.997170] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 32.997658] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 32.998162] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 32.998655] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 32.999163] R13: 0000000000000000 R14: 00007fbd9ea129c0 R15: 00007fbd9ea12700 [ 32.999702] Dumping ftrace buffer: [ 32.999943] (ftrace buffer empty) [ 33.000198] Kernel Offset: disabled [ 33.000451] Rebooting in 86400 seconds..