2017/09/08 01:18:28 parsed 1 programs 2017/09/08 01:18:28 executed programs: 0 syzkaller login: [ 25.621546] dev_remove_pack: ffff88006bb2c840 not found [ 25.645356] ================================================================== [ 25.646185] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 25.646810] Read of size 8 at addr ffff88006828ad28 by task syz-executor0/3075 [ 25.647499] [ 25.647658] CPU: 3 PID: 3075 Comm: syz-executor0 Not tainted 4.13.0-next-20170907+ #17 [ 25.648394] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 25.649161] Call Trace: [ 25.649413] dump_stack+0x194/0x257 [ 25.650023] ? arch_local_irq_restore+0x53/0x53 [ 25.650470] ? show_regs_print_info+0x65/0x65 [ 25.650910] ? __dev_remove_pack+0x305/0x3b0 [ 25.651329] print_address_description+0x73/0x250 [ 25.651782] ? __dev_remove_pack+0x305/0x3b0 [ 25.652194] kasan_report+0x24e/0x340 [ 25.652550] __asan_report_load8_noabort+0x14/0x20 [ 25.653008] __dev_remove_pack+0x305/0x3b0 [ 25.653402] ? dev_get_by_name_rcu+0x270/0x270 [ 25.653826] ? refcount_sub_and_test+0x115/0x1b0 [ 25.654276] __unregister_prot_hook+0x211/0x280 [ 25.654713] packet_release+0x8bb/0xd70 [ 25.655093] ? packet_set_ring+0x1b70/0x1b70 [ 25.655503] ? dentry_free+0xcd/0x130 [ 25.655857] ? rcu_read_lock_sched_held+0x108/0x120 [ 25.656295] ? kmem_cache_free+0x249/0x280 [ 25.656690] ? dentry_free+0xd2/0x130 [ 25.657054] ? locks_remove_file+0x3fa/0x5a0 [ 25.657464] ? fcntl_setlk+0x10d0/0x10d0 [ 25.657841] ? __fsnotify_parent+0xb4/0x3a0 [ 25.658245] ? fsnotify+0x1af0/0x1af0 [ 25.658602] sock_release+0x8d/0x1e0 [ 25.658953] ? sock_release+0x8d/0x1e0 [ 25.659312] ? sock_release+0x1e0/0x1e0 [ 25.659676] sock_close+0x16/0x20 [ 25.659998] __fput+0x333/0x7f0 [ 25.660305] ? fput+0x140/0x140 [ 25.660610] ? check_same_owner+0x320/0x320 [ 25.661006] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.661471] ____fput+0x15/0x20 [ 25.661808] task_work_run+0x199/0x270 [ 25.662179] ? task_work_cancel+0x210/0x210 [ 25.662816] ? _raw_spin_unlock+0x22/0x30 [ 25.663494] ? switch_task_namespaces+0x87/0xc0 [ 25.664269] do_exit+0xa52/0x1b40 [ 25.664900] ? plist_check_list+0xa0/0xa0 [ 25.665560] ? plist_del+0x47b/0x990 [ 25.665912] ? mm_update_next_owner+0x930/0x930 [ 25.666398] ? plist_add+0x760/0x760 [ 25.666931] ? check_same_owner+0x320/0x320 [ 25.667697] ? find_held_lock+0x39/0x1d0 [ 25.668458] ? check_noncircular+0x20/0x20 [ 25.669158] ? lock_downgrade+0x990/0x990 [ 25.669813] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 25.670757] ? find_held_lock+0x39/0x1d0 [ 25.671473] ? lock_downgrade+0x990/0x990 [ 25.672191] ? recalc_sigpending_tsk+0x117/0x150 [ 25.673026] ? recalc_sigpending+0x103/0x160 [ 25.673819] ? recalc_sigpending_tsk+0x150/0x150 [ 25.674762] ? get_signal+0x397/0x17e0 [ 25.675523] do_group_exit+0x149/0x400 [ 25.676270] ? __lock_is_held+0xbc/0x140 [ 25.677027] ? SyS_exit+0x30/0x30 [ 25.677659] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.678479] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.679405] get_signal+0x7e8/0x17e0 [ 25.679896] ? ptrace_notify+0x130/0x130 [ 25.680309] ? __fget+0xbb/0x580 [ 25.680634] ? lock_release+0xd70/0xd70 [ 25.681017] ? exit_robust_list+0x240/0x240 [ 25.681507] do_signal+0x94/0x1ee0 [ 25.681844] ? iterate_fd+0x3f0/0x3f0 [ 25.682349] ? up_read+0x1a/0x40 [ 25.682842] ? setup_sigcontext+0x7d0/0x7d0 [ 25.684665] ? __do_page_fault+0xb60/0xb60 [ 25.685063] ? __fget_light+0x29d/0x390 [ 25.685434] ? selinux_tun_dev_create+0xc0/0xc0 [ 25.685873] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 25.686405] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.686906] ? exit_to_usermode_loop+0x98/0x300 [ 25.687333] exit_to_usermode_loop+0x224/0x300 [ 25.687748] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 25.688255] syscall_return_slowpath+0x42f/0x500 [ 25.688685] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 25.689139] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 25.689585] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.690039] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.690477] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 25.690914] RIP: 0033:0x447299 [ 25.691528] RSP: 002b:00007f4e85313cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 25.692256] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 25.692846] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 25.693479] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 25.694042] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 25.694764] R13: 0000000000000000 R14: 00007f4e853149c0 R15: 00007f4e85314700 [ 25.695515] [ 25.695671] Allocated by task 3075: [ 25.696013] save_stack_trace+0x16/0x20 [ 25.696381] save_stack+0x43/0xd0 [ 25.696700] kasan_kmalloc+0xad/0xe0 [ 25.697043] kmem_cache_alloc_trace+0x136/0x750 [ 25.697472] fanout_add+0xa50/0x1190 [ 25.697818] packet_setsockopt+0xfdc/0x1e80 [ 25.698220] SyS_setsockopt+0x189/0x360 [ 25.698592] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 25.699039] [ 25.699191] Freed by task 3075: [ 25.699488] save_stack_trace+0x16/0x20 [ 25.699846] save_stack+0x43/0xd0 [ 25.700159] kasan_slab_free+0x71/0xc0 [ 25.700509] kfree+0xca/0x250 [ 25.700792] packet_release+0xa8f/0xd70 [ 25.701179] sock_release+0x8d/0x1e0 [ 25.701516] sock_close+0x16/0x20 [ 25.701829] __fput+0x333/0x7f0 [ 25.702128] ____fput+0x15/0x20 [ 25.702426] task_work_run+0x199/0x270 [ 25.702781] do_exit+0xa52/0x1b40 [ 25.703109] do_group_exit+0x149/0x400 [ 25.703463] get_signal+0x7e8/0x17e0 [ 25.703800] do_signal+0x94/0x1ee0 [ 25.704122] exit_to_usermode_loop+0x224/0x300 [ 25.704768] syscall_return_slowpath+0x42f/0x500 [ 25.705198] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 25.705622] [ 25.705774] The buggy address belongs to the object at ffff88006828a480 [ 25.705774] which belongs to the cache kmalloc-4096 of size 4096 [ 25.706786] The buggy address is located 2216 bytes inside of [ 25.706786] 4096-byte region [ffff88006828a480, ffff88006828b480) [ 25.707816] The buggy address belongs to the page: [ 25.708261] page:ffffea0001a0a280 count:1 mapcount:0 mapping:ffff88006828a480 index:0x0 compound_mapcount: 0 [ 25.708945] flags: 0x500000000008100(slab|head) [ 25.709269] raw: 0500000000008100 ffff88006828a480 0000000000000000 0000000100000001 [ 25.709808] raw: ffffea0001ad7c20 ffff88006d800a50 ffff88003e800dc0 0000000000000000 [ 25.710447] page dumped because: kasan: bad access detected [ 25.710968] [ 25.711116] Memory state around the buggy address: [ 25.711458] ffff88006828ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.711959] ffff88006828ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.712461] >ffff88006828ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.712960] ^ [ 25.713393] ffff88006828ad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.713894] ffff88006828ae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.714529] ================================================================== [ 25.715233] Disabling lock debugging due to kernel taint [ 25.715852] Kernel panic - not syncing: panic_on_warn set ... [ 25.715852] [ 25.716581] CPU: 3 PID: 3075 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170907+ #17 [ 25.717453] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 25.718253] Call Trace: [ 25.718506] dump_stack+0x194/0x257 [ 25.718864] ? arch_local_irq_restore+0x53/0x53 [ 25.719290] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.719725] ? __dev_remove_pack+0x2f0/0x3b0 [ 25.720132] panic+0x1e4/0x417 [ 25.720451] ? __warn+0x1d9/0x1d9 [ 25.720723] ? __dev_remove_pack+0x305/0x3b0 [ 25.721024] kasan_end_report+0x50/0x50 [ 25.721403] kasan_report+0x137/0x340 [ 25.721682] __asan_report_load8_noabort+0x14/0x20 [ 25.722043] __dev_remove_pack+0x305/0x3b0 [ 25.722336] ? dev_get_by_name_rcu+0x270/0x270 [ 25.722676] ? refcount_sub_and_test+0x115/0x1b0 [ 25.723011] __unregister_prot_hook+0x211/0x280 [ 25.723443] packet_release+0x8bb/0xd70 [ 25.723822] ? packet_set_ring+0x1b70/0x1b70 [ 25.724265] ? dentry_free+0xcd/0x130 [ 25.724615] ? rcu_read_lock_sched_held+0x108/0x120 [ 25.725069] ? kmem_cache_free+0x249/0x280 [ 25.725722] ? dentry_free+0xd2/0x130 [ 25.726079] ? locks_remove_file+0x3fa/0x5a0 [ 25.726472] ? fcntl_setlk+0x10d0/0x10d0 [ 25.726868] ? __fsnotify_parent+0xb4/0x3a0 [ 25.727270] ? fsnotify+0x1af0/0x1af0 [ 25.727622] sock_release+0x8d/0x1e0 [ 25.727973] ? sock_release+0x8d/0x1e0 [ 25.728337] ? sock_release+0x1e0/0x1e0 [ 25.728705] sock_close+0x16/0x20 [ 25.729032] __fput+0x333/0x7f0 [ 25.729340] ? fput+0x140/0x140 [ 25.729648] ? check_same_owner+0x320/0x320 [ 25.730050] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.730469] ____fput+0x15/0x20 [ 25.730775] task_work_run+0x199/0x270 [ 25.731148] ? task_work_cancel+0x210/0x210 [ 25.731453] ? _raw_spin_unlock+0x22/0x30 [ 25.731743] ? switch_task_namespaces+0x87/0xc0 [ 25.732179] do_exit+0xa52/0x1b40 [ 25.732498] ? plist_check_list+0xa0/0xa0 [ 25.732886] ? plist_del+0x47b/0x990 [ 25.733244] ? mm_update_next_owner+0x930/0x930 [ 25.733722] ? plist_add+0x760/0x760 [ 25.734126] ? check_same_owner+0x320/0x320 [ 25.734536] ? find_held_lock+0x39/0x1d0 [ 25.734896] ? check_noncircular+0x20/0x20 [ 25.735285] ? lock_downgrade+0x990/0x990 [ 25.735577] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 25.736005] ? find_held_lock+0x39/0x1d0 [ 25.736290] ? lock_downgrade+0x990/0x990 [ 25.736632] ? recalc_sigpending_tsk+0x117/0x150 [ 25.736997] ? recalc_sigpending+0x103/0x160 [ 25.737409] ? recalc_sigpending_tsk+0x150/0x150 [ 25.737748] ? get_signal+0x397/0x17e0 [ 25.738021] do_group_exit+0x149/0x400 [ 25.738383] ? __lock_is_held+0xbc/0x140 [ 25.738757] ? SyS_exit+0x30/0x30 [ 25.739083] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.739499] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.739974] get_signal+0x7e8/0x17e0 [ 25.740378] ? ptrace_notify+0x130/0x130 [ 25.740677] ? __fget+0xbb/0x580 [ 25.741001] ? lock_release+0xd70/0xd70 [ 25.741378] ? exit_robust_list+0x240/0x240 [ 25.741774] do_signal+0x94/0x1ee0 [ 25.742101] ? iterate_fd+0x3f0/0x3f0 [ 25.742461] ? up_read+0x1a/0x40 [ 25.742782] ? setup_sigcontext+0x7d0/0x7d0 [ 25.743187] ? __do_page_fault+0xb60/0xb60 [ 25.743576] ? __fget_light+0x29d/0x390 [ 25.743940] ? selinux_tun_dev_create+0xc0/0xc0 [ 25.744365] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 25.744885] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.745367] ? exit_to_usermode_loop+0x98/0x300 [ 25.745795] exit_to_usermode_loop+0x224/0x300 [ 25.746216] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 25.746727] syscall_return_slowpath+0x42f/0x500 [ 25.747751] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 25.748215] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 25.748665] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.749125] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.749562] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 25.749992] RIP: 0033:0x447299 [ 25.750283] RSP: 002b:00007f4e85313cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 25.751003] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 25.751576] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 25.752227] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 25.752887] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 25.753542] R13: 0000000000000000 R14: 00007f4e853149c0 R15: 00007f4e85314700 [ 25.754279] Dumping ftrace buffer: [ 25.754600] (ftrace buffer empty) [ 25.755180] Kernel Offset: disabled [ 25.755499] Rebooting in 86400 seconds..