2017/09/08 09:24:03 parsed 1 programs 2017/09/08 09:24:03 executed programs: 0 syzkaller login: [ 28.830291] dev_remove_pack: ffff88003d72d540 not found [ 28.849368] ================================================================== [ 28.850157] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 28.851015] Read of size 8 at addr ffff88003da9aba8 by task syz-executor0/3005 [ 28.851727] [ 28.851915] CPU: 3 PID: 3005 Comm: syz-executor0 Not tainted 4.13.0-next-20170908+ #18 [ 28.852753] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 28.853575] Call Trace: [ 28.853841] dump_stack+0x194/0x257 [ 28.854190] ? arch_local_irq_restore+0x53/0x53 [ 28.854644] ? show_regs_print_info+0x65/0x65 [ 28.855102] ? __dev_remove_pack+0x305/0x3b0 [ 28.855553] print_address_description+0x73/0x250 [ 28.856071] ? __dev_remove_pack+0x305/0x3b0 [ 28.856505] kasan_report+0x24e/0x340 [ 28.856899] __asan_report_load8_noabort+0x14/0x20 [ 28.857381] __dev_remove_pack+0x305/0x3b0 [ 28.857821] ? dev_get_by_name_rcu+0x270/0x270 [ 28.858242] ? refcount_sub_and_test+0x115/0x1b0 [ 28.858950] __unregister_prot_hook+0x211/0x280 [ 28.860066] packet_release+0x8bb/0xd70 [ 28.860967] ? packet_set_ring+0x1b70/0x1b70 [ 28.861835] ? dentry_free+0xcd/0x130 [ 28.862590] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.863679] ? kmem_cache_free+0x249/0x280 [ 28.864628] ? dentry_free+0xd2/0x130 [ 28.865465] ? locks_remove_file+0x3fa/0x5a0 [ 28.866439] ? fcntl_setlk+0x10d0/0x10d0 [ 28.867335] ? __fsnotify_parent+0xb4/0x3a0 [ 28.868298] ? fsnotify+0x1af0/0x1af0 [ 28.869073] sock_release+0x8d/0x1e0 [ 28.870008] ? sock_release+0x8d/0x1e0 [ 28.870752] ? sock_release+0x1e0/0x1e0 [ 28.871198] sock_close+0x16/0x20 [ 28.871608] __fput+0x333/0x7f0 [ 28.871947] ? fput+0x140/0x140 [ 28.872292] ? check_same_owner+0x320/0x320 [ 28.872734] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.873207] ____fput+0x15/0x20 [ 28.873560] task_work_run+0x199/0x270 [ 28.873982] ? task_work_cancel+0x210/0x210 [ 28.874437] ? _raw_spin_unlock+0x22/0x30 [ 28.875457] ? switch_task_namespaces+0x87/0xc0 [ 28.876117] do_exit+0xa52/0x1b40 [ 28.876550] ? plist_check_list+0xa0/0xa0 [ 28.878046] ? plist_del+0x47b/0x990 [ 28.880169] ? mm_update_next_owner+0x930/0x930 [ 28.881038] ? plist_add+0x760/0x760 [ 28.881455] ? check_same_owner+0x320/0x320 [ 28.882233] ? find_held_lock+0x39/0x1d0 [ 28.883619] ? check_noncircular+0x20/0x20 [ 28.884009] ? lock_downgrade+0x990/0x990 [ 28.884565] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 28.885831] ? find_held_lock+0x39/0x1d0 [ 28.886289] ? lock_downgrade+0x990/0x990 [ 28.886728] ? recalc_sigpending_tsk+0x117/0x150 [ 28.887072] ? recalc_sigpending+0x103/0x160 [ 28.887521] ? recalc_sigpending_tsk+0x150/0x150 [ 28.888022] ? get_signal+0x397/0x17e0 [ 28.888362] do_group_exit+0x149/0x400 [ 28.888965] ? __lock_is_held+0xbc/0x140 [ 28.889407] ? SyS_exit+0x30/0x30 [ 28.890812] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.891324] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.891810] get_signal+0x7e8/0x17e0 [ 28.892252] ? ptrace_notify+0x130/0x130 [ 28.892703] ? __schedule+0x8f0/0x2070 [ 28.893128] ? lock_release+0xd70/0xd70 [ 28.893516] ? exit_robust_list+0x240/0x240 [ 28.893926] do_signal+0x94/0x1ee0 [ 28.894207] ? iterate_fd+0x3f0/0x3f0 [ 28.894470] ? up_read+0x1a/0x40 [ 28.894780] ? setup_sigcontext+0x7d0/0x7d0 [ 28.895351] ? schedule+0x108/0x440 [ 28.895835] ? __do_page_fault+0xb60/0xb60 [ 28.896562] ? __schedule+0x2070/0x2070 [ 28.897308] ? __fget_light+0x29d/0x390 [ 28.898075] ? selinux_tun_dev_create+0xc0/0xc0 [ 28.899001] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 28.900079] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.901064] ? exit_to_usermode_loop+0x98/0x300 [ 28.901897] exit_to_usermode_loop+0x224/0x300 [ 28.902645] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 28.903667] syscall_return_slowpath+0x42f/0x500 [ 28.904635] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 28.905593] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 28.906583] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.907490] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.908449] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.909317] RIP: 0033:0x447299 [ 28.909979] RSP: 002b:00007feccf390cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 28.911272] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 28.912628] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 28.913362] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 28.914054] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 28.914784] R13: 0000000000000000 R14: 00007feccf3919c0 R15: 00007feccf391700 [ 28.915527] [ 28.915652] Allocated by task 3004: [ 28.915980] save_stack_trace+0x16/0x20 [ 28.916370] save_stack+0x43/0xd0 [ 28.916683] kasan_kmalloc+0xad/0xe0 [ 28.916997] kmem_cache_alloc_trace+0x136/0x750 [ 28.917468] fanout_add+0xa50/0x1190 [ 28.917850] packet_setsockopt+0xfdc/0x1e80 [ 28.918271] SyS_setsockopt+0x189/0x360 [ 28.918668] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 28.919200] [ 28.919388] Freed by task 3005: [ 28.919750] save_stack_trace+0x16/0x20 [ 28.920178] save_stack+0x43/0xd0 [ 28.920512] kasan_slab_free+0x71/0xc0 [ 28.920898] kfree+0xca/0x250 [ 28.921208] packet_release+0xa8f/0xd70 [ 28.921607] sock_release+0x8d/0x1e0 [ 28.922003] sock_close+0x16/0x20 [ 28.922345] __fput+0x333/0x7f0 [ 28.922686] ____fput+0x15/0x20 [ 28.923028] task_work_run+0x199/0x270 [ 28.923446] do_exit+0xa52/0x1b40 [ 28.923716] do_group_exit+0x149/0x400 [ 28.924138] get_signal+0x7e8/0x17e0 [ 28.924506] do_signal+0x94/0x1ee0 [ 28.924844] exit_to_usermode_loop+0x224/0x300 [ 28.925321] syscall_return_slowpath+0x42f/0x500 [ 28.925808] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.926299] [ 28.926471] The buggy address belongs to the object at ffff88003da9a300 [ 28.926471] which belongs to the cache kmalloc-4096 of size 4096 [ 28.927939] The buggy address is located 2216 bytes inside of [ 28.927939] 4096-byte region [ffff88003da9a300, ffff88003da9b300) [ 28.929141] The buggy address belongs to the page: [ 28.929688] page:ffffea0000f6a680 count:1 mapcount:0 mapping:ffff88003da9a300 index:0x0 compound_mapcount: 0 [ 28.930804] flags: 0x100000000008100(slab|head) [ 28.931466] raw: 0100000000008100 ffff88003da9a300 0000000000000000 0000000100000001 [ 28.932300] raw: ffffea0000f6a620 ffff88003e801a50 ffff88003e800dc0 0000000000000000 [ 28.933864] page dumped because: kasan: bad access detected [ 28.934380] [ 28.934535] Memory state around the buggy address: [ 28.934989] ffff88003da9aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.935781] ffff88003da9ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.936533] >ffff88003da9ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.937274] ^ [ 28.939022] ffff88003da9ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.940538] ffff88003da9ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.941262] ================================================================== [ 28.942486] Disabling lock debugging due to kernel taint [ 28.943151] Kernel panic - not syncing: panic_on_warn set ... [ 28.943151] [ 28.943876] CPU: 3 PID: 3005 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170908+ #18 [ 28.944714] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 28.945449] Call Trace: [ 28.945692] dump_stack+0x194/0x257 [ 28.946021] ? arch_local_irq_restore+0x53/0x53 [ 28.946443] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.946877] ? __dev_remove_pack+0x2f0/0x3b0 [ 28.947277] panic+0x1e4/0x417 [ 28.947570] ? __warn+0x1d9/0x1d9 [ 28.947886] ? __dev_remove_pack+0x305/0x3b0 [ 28.948294] kasan_end_report+0x50/0x50 [ 28.948609] kasan_report+0x137/0x340 [ 28.948847] __asan_report_load8_noabort+0x14/0x20 [ 28.949163] __dev_remove_pack+0x305/0x3b0 [ 28.949533] ? dev_get_by_name_rcu+0x270/0x270 [ 28.949877] ? refcount_sub_and_test+0x115/0x1b0 [ 28.950258] __unregister_prot_hook+0x211/0x280 [ 28.950589] packet_release+0x8bb/0xd70 [ 28.950966] ? packet_set_ring+0x1b70/0x1b70 [ 28.951440] ? dentry_free+0xcd/0x130 [ 28.951838] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.952472] ? kmem_cache_free+0x249/0x280 [ 28.952909] ? dentry_free+0xd2/0x130 [ 28.953263] ? locks_remove_file+0x3fa/0x5a0 [ 28.953693] ? fcntl_setlk+0x10d0/0x10d0 [ 28.954055] ? __fsnotify_parent+0xb4/0x3a0 [ 28.954447] ? fsnotify+0x1af0/0x1af0 [ 28.955232] sock_release+0x8d/0x1e0 [ 28.955505] ? sock_release+0x8d/0x1e0 [ 28.955858] ? sock_release+0x1e0/0x1e0 [ 28.956242] sock_close+0x16/0x20 [ 28.956600] __fput+0x333/0x7f0 [ 28.956952] ? fput+0x140/0x140 [ 28.957306] ? check_same_owner+0x320/0x320 [ 28.957705] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.958056] ____fput+0x15/0x20 [ 28.958363] task_work_run+0x199/0x270 [ 28.958751] ? task_work_cancel+0x210/0x210 [ 28.959079] ? _raw_spin_unlock+0x22/0x30 [ 28.959388] ? switch_task_namespaces+0x87/0xc0 [ 28.959836] do_exit+0xa52/0x1b40 [ 28.960152] ? plist_check_list+0xa0/0xa0 [ 28.960576] ? plist_del+0x47b/0x990 [ 28.960954] ? mm_update_next_owner+0x930/0x930 [ 28.961419] ? plist_add+0x760/0x760 [ 28.961810] ? check_same_owner+0x320/0x320 [ 28.962258] ? find_held_lock+0x39/0x1d0 [ 28.962676] ? check_noncircular+0x20/0x20 [ 28.963111] ? lock_downgrade+0x990/0x990 [ 28.963528] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 28.964098] ? find_held_lock+0x39/0x1d0 [ 28.964469] ? lock_downgrade+0x990/0x990 [ 28.964864] ? recalc_sigpending_tsk+0x117/0x150 [ 28.965359] ? recalc_sigpending+0x103/0x160 [ 28.965810] ? recalc_sigpending_tsk+0x150/0x150 [ 28.966303] ? get_signal+0x397/0x17e0 [ 28.966711] do_group_exit+0x149/0x400 [ 28.967233] ? __lock_is_held+0xbc/0x140 [ 28.967730] ? SyS_exit+0x30/0x30 [ 28.968094] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.968547] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.969057] get_signal+0x7e8/0x17e0 [ 28.969549] ? ptrace_notify+0x130/0x130 [ 28.969963] ? __schedule+0x8f0/0x2070 [ 28.970276] ? lock_release+0xd70/0xd70 [ 28.970562] ? exit_robust_list+0x240/0x240 [ 28.970897] do_signal+0x94/0x1ee0 [ 28.971137] ? iterate_fd+0x3f0/0x3f0 [ 28.971454] ? up_read+0x1a/0x40 [ 28.971738] ? setup_sigcontext+0x7d0/0x7d0 [ 28.972048] ? schedule+0x108/0x440 [ 28.972301] ? __do_page_fault+0xb60/0xb60 [ 28.972596] ? __schedule+0x2070/0x2070 [ 28.972873] ? __fget_light+0x29d/0x390 [ 28.973152] ? selinux_tun_dev_create+0xc0/0xc0 [ 28.973448] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 28.973801] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.974155] ? exit_to_usermode_loop+0x98/0x300 [ 28.974474] exit_to_usermode_loop+0x224/0x300 [ 28.974794] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 28.975117] syscall_return_slowpath+0x42f/0x500 [ 28.975632] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 28.975923] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 28.976265] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.976592] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.976886] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.977206] RIP: 0033:0x447299 [ 28.977404] RSP: 002b:00007feccf390cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 28.977889] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 28.978337] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 28.978831] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 28.979351] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 28.979970] R13: 0000000000000000 R14: 00007feccf3919c0 R15: 00007feccf391700 [ 28.980723] Dumping ftrace buffer: [ 28.981028] (ftrace buffer empty) [ 28.981367] Kernel Offset: disabled [ 28.981706] Rebooting in 86400 seconds..