Debian GNU/Linux 7 syzkaller ttyS0 2017/09/12 00:03:51 parsed 1 programs 2017/09/12 00:03:51 executed programs: 0 syzkaller login: [ 28.813056] dev_remove_pack: ffff88006b53f280 not found [ 28.839216] ================================================================== [ 28.839787] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 28.840267] Read of size 8 at addr ffff88006a9471e8 by task syz-executor0/3052 [ 28.840769] [ 28.840900] CPU: 3 PID: 3052 Comm: syz-executor0 Not tainted 4.13.0-next-20170911+ #1 [ 28.841448] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 28.842045] Call Trace: [ 28.842233] dump_stack+0x194/0x257 [ 28.842492] ? arch_local_irq_restore+0x53/0x53 [ 28.842826] ? show_regs_print_info+0x65/0x65 [ 28.843159] ? __dev_remove_pack+0x305/0x3b0 [ 28.843553] print_address_description+0x73/0x250 [ 28.843975] ? __dev_remove_pack+0x305/0x3b0 [ 28.844283] kasan_report+0x24e/0x340 [ 28.844556] __asan_report_load8_noabort+0x14/0x20 [ 28.844909] __dev_remove_pack+0x305/0x3b0 [ 28.845209] ? dev_get_by_name_rcu+0x270/0x270 [ 28.845534] ? refcount_sub_and_test+0x115/0x1b0 [ 28.845872] __unregister_prot_hook+0x211/0x280 [ 28.846214] packet_release+0x8bb/0xd70 [ 28.846499] ? packet_set_ring+0x1b70/0x1b70 [ 28.846805] ? dentry_free+0xcd/0x130 [ 28.847083] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.847433] ? kmem_cache_free+0x249/0x280 [ 28.847730] ? dentry_free+0xd2/0x130 [ 28.848009] ? locks_remove_file+0x3fa/0x5a0 [ 28.848320] ? fcntl_setlk+0x10d0/0x10d0 [ 28.848609] ? __fsnotify_parent+0xb4/0x3a0 [ 28.848916] ? fsnotify+0x1af0/0x1af0 [ 28.849193] sock_release+0x8d/0x1e0 [ 28.849453] ? sock_release+0x8d/0x1e0 [ 28.849737] ? sock_release+0x1e0/0x1e0 [ 28.850026] sock_close+0x16/0x20 [ 28.850270] __fput+0x333/0x7f0 [ 28.850506] ? fput+0x140/0x140 [ 28.850745] ? check_same_owner+0x320/0x320 [ 28.851060] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.851380] ____fput+0x15/0x20 [ 28.851614] task_work_run+0x199/0x270 [ 28.851889] ? task_work_cancel+0x210/0x210 [ 28.852221] ? _raw_spin_unlock+0x22/0x30 [ 28.852843] ? switch_task_namespaces+0x87/0xc0 [ 28.853161] do_exit+0xa52/0x1b40 [ 28.853404] ? plist_check_list+0xa0/0xa0 [ 28.853715] ? plist_del+0x47b/0x990 [ 28.853977] ? mm_update_next_owner+0x930/0x930 [ 28.854342] ? plist_add+0x760/0x760 [ 28.854693] ? check_same_owner+0x320/0x320 [ 28.855093] ? find_held_lock+0x39/0x1d0 [ 28.855470] ? check_noncircular+0x20/0x20 [ 28.855856] ? lock_downgrade+0x990/0x990 [ 28.856235] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 28.856737] ? find_held_lock+0x39/0x1d0 [ 28.857119] ? lock_downgrade+0x990/0x990 [ 28.857499] ? recalc_sigpending_tsk+0x117/0x150 [ 28.857939] ? recalc_sigpending+0x103/0x160 [ 28.858342] ? recalc_sigpending_tsk+0x150/0x150 [ 28.858772] ? get_signal+0x397/0x17e0 [ 28.859135] do_group_exit+0x149/0x400 [ 28.859492] ? __lock_is_held+0xbc/0x140 [ 28.859864] ? SyS_exit+0x30/0x30 [ 28.860181] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.860593] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.861054] get_signal+0x7e8/0x17e0 [ 28.861417] ? ptrace_notify+0x130/0x130 [ 28.861790] ? __fget+0xbb/0x580 [ 28.862100] ? __lockdep_init_map+0xe4/0x650 [ 28.862507] ? lock_release+0xd70/0xd70 [ 28.862875] ? exit_robust_list+0x240/0x240 [ 28.863278] do_signal+0x94/0x1ee0 [ 28.863607] ? iterate_fd+0x3f0/0x3f0 [ 28.863957] ? setup_sigcontext+0x7d0/0x7d0 [ 28.864351] ? __lock_is_held+0xbc/0x140 [ 28.864732] ? __fget_light+0x29d/0x390 [ 28.865121] ? selinux_tun_dev_create+0xc0/0xc0 [ 28.865552] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 28.866077] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.866456] ? alloc_file+0x284/0x3a0 [ 28.866806] ? exit_to_usermode_loop+0x98/0x300 [ 28.867235] exit_to_usermode_loop+0x224/0x300 [ 28.867654] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 28.868163] syscall_return_slowpath+0x42f/0x500 [ 28.868549] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 28.868921] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 28.869275] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.869646] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.870000] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.870347] RIP: 0033:0x447299 [ 28.870579] RSP: 002b:00007f704d7accf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 28.871130] RAX: fffffffffffffe00 RBX: 0000000000708188 RCX: 0000000000447299 [ 28.871651] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708188 [ 28.872169] RBP: 0000000000708160 R08: 0000000000000000 R09: 0000000000000000 [ 28.872690] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 28.873242] R13: 0000000000000000 R14: 00007f704d7ad9c0 R15: 00007f704d7ad700 [ 28.874820] [ 28.875094] Allocated by task 3052: [ 28.875700] save_stack_trace+0x16/0x20 [ 28.876333] save_stack+0x43/0xd0 [ 28.876900] kasan_kmalloc+0xad/0xe0 [ 28.877514] kmem_cache_alloc_trace+0x136/0x750 [ 28.878278] fanout_add+0xa50/0x1190 [ 28.878886] packet_setsockopt+0xfdc/0x1e80 [ 28.879467] SyS_setsockopt+0x189/0x360 [ 28.879883] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 28.880347] [ 28.880512] Freed by task 3052: [ 28.880838] save_stack_trace+0x16/0x20 [ 28.881228] save_stack+0x43/0xd0 [ 28.881569] kasan_slab_free+0x71/0xc0 [ 28.881951] kfree+0xca/0x250 [ 28.882257] packet_release+0xa8f/0xd70 [ 28.882642] sock_release+0x8d/0x1e0 [ 28.883003] sock_close+0x16/0x20 [ 28.883339] __fput+0x333/0x7f0 [ 28.883665] ____fput+0x15/0x20 [ 28.883992] task_work_run+0x199/0x270 [ 28.884374] do_exit+0xa52/0x1b40 [ 28.884714] do_group_exit+0x149/0x400 [ 28.885095] get_signal+0x7e8/0x17e0 [ 28.885459] do_signal+0x94/0x1ee0 [ 28.885799] exit_to_usermode_loop+0x224/0x300 [ 28.886251] syscall_return_slowpath+0x42f/0x500 [ 28.886708] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.887165] [ 28.887356] The buggy address belongs to the object at ffff88006a946940 [ 28.887356] which belongs to the cache kmalloc-4096 of size 4096 [ 28.888584] The buggy address is located 2216 bytes inside of [ 28.888584] 4096-byte region [ffff88006a946940, ffff88006a947940) [ 28.889742] The buggy address belongs to the page: [ 28.890223] page:ffffea0001aa5180 count:1 mapcount:0 mapping:ffff88006a946940 index:0x0 compound_mapcount: 0 [ 28.891172] flags: 0x500000000008100(slab|head) [ 28.891624] raw: 0500000000008100 ffff88006a946940 0000000000000000 0000000100000001 [ 28.892377] raw: ffffea0001ac19a0 ffff88006d800a50 ffff88003e800dc0 0000000000000000 [ 28.893142] page dumped because: kasan: bad access detected [ 28.893703] [ 28.893873] Memory state around the buggy address: [ 28.894366] ffff88006a947080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.895470] ffff88006a947100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.896176] >ffff88006a947180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.896898] ^ [ 28.897574] ffff88006a947200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.898127] ffff88006a947280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.898626] ================================================================== [ 28.899135] Disabling lock debugging due to kernel taint [ 28.899529] Kernel panic - not syncing: panic_on_warn set ... [ 28.899529] [ 28.900044] CPU: 3 PID: 3052 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170911+ #1 [ 28.900675] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 28.901242] Call Trace: [ 28.901424] dump_stack+0x194/0x257 [ 28.901677] ? arch_local_irq_restore+0x53/0x53 [ 28.902010] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.902338] ? __dev_remove_pack+0x2f0/0x3b0 [ 28.902636] panic+0x1e4/0x417 [ 28.902868] ? __warn+0x1d9/0x1d9 [ 28.903112] ? __dev_remove_pack+0x305/0x3b0 [ 28.903415] kasan_end_report+0x50/0x50 [ 28.903687] kasan_report+0x137/0x340 [ 28.904002] __asan_report_load8_noabort+0x14/0x20 [ 28.904333] __dev_remove_pack+0x305/0x3b0 [ 28.904619] ? dev_get_by_name_rcu+0x270/0x270 [ 28.904955] ? refcount_sub_and_test+0x115/0x1b0 [ 28.905281] __unregister_prot_hook+0x211/0x280 [ 28.905601] packet_release+0x8bb/0xd70 [ 28.905891] ? packet_set_ring+0x1b70/0x1b70 [ 28.906204] ? dentry_free+0xcd/0x130 [ 28.906465] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.906805] ? kmem_cache_free+0x249/0x280 [ 28.907118] ? dentry_free+0xd2/0x130 [ 28.907415] ? locks_remove_file+0x3fa/0x5a0 [ 28.907815] ? fcntl_setlk+0x10d0/0x10d0 [ 28.908167] ? __fsnotify_parent+0xb4/0x3a0 [ 28.908556] ? fsnotify+0x1af0/0x1af0 [ 28.908899] sock_release+0x8d/0x1e0 [ 28.909235] ? sock_release+0x8d/0x1e0 [ 28.909592] ? sock_release+0x1e0/0x1e0 [ 28.909949] sock_close+0x16/0x20 [ 28.910261] __fput+0x333/0x7f0 [ 28.910561] ? fput+0x140/0x140 [ 28.910859] ? check_same_owner+0x320/0x320 [ 28.911249] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.911655] ____fput+0x15/0x20 [ 28.911950] task_work_run+0x199/0x270 [ 28.912301] ? task_work_cancel+0x210/0x210 [ 28.912689] ? _raw_spin_unlock+0x22/0x30 [ 28.913062] ? switch_task_namespaces+0x87/0xc0 [ 28.913482] do_exit+0xa52/0x1b40 [ 28.913798] ? plist_check_list+0xa0/0xa0 [ 28.914140] ? plist_del+0x47b/0x990 [ 28.914395] ? mm_update_next_owner+0x930/0x930 [ 28.914716] ? plist_add+0x760/0x760 [ 28.914974] ? check_same_owner+0x320/0x320 [ 28.915275] ? find_held_lock+0x39/0x1d0 [ 28.915557] ? check_noncircular+0x20/0x20 [ 28.915849] ? lock_downgrade+0x990/0x990 [ 28.916130] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 28.916746] ? find_held_lock+0x39/0x1d0 [ 28.917030] ? lock_downgrade+0x990/0x990 [ 28.917317] ? recalc_sigpending_tsk+0x117/0x150 [ 28.917661] ? recalc_sigpending+0x103/0x160 [ 28.917968] ? recalc_sigpending_tsk+0x150/0x150 [ 28.918292] ? get_signal+0x397/0x17e0 [ 28.918565] do_group_exit+0x149/0x400 [ 28.918833] ? __lock_is_held+0xbc/0x140 [ 28.919107] ? SyS_exit+0x30/0x30 [ 28.919344] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.919656] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.919999] get_signal+0x7e8/0x17e0 [ 28.920261] ? ptrace_notify+0x130/0x130 [ 28.920537] ? __fget+0xbb/0x580 [ 28.920769] ? __lockdep_init_map+0xe4/0x650 [ 28.921103] ? lock_release+0xd70/0xd70 [ 28.921465] ? exit_robust_list+0x240/0x240 [ 28.921858] do_signal+0x94/0x1ee0 [ 28.922180] ? iterate_fd+0x3f0/0x3f0 [ 28.922522] ? setup_sigcontext+0x7d0/0x7d0 [ 28.922910] ? __lock_is_held+0xbc/0x140 [ 28.923279] ? __fget_light+0x29d/0x390 [ 28.923643] ? selinux_tun_dev_create+0xc0/0xc0 [ 28.924061] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 28.924574] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 28.925045] ? alloc_file+0x284/0x3a0 [ 28.925388] ? exit_to_usermode_loop+0x98/0x300 [ 28.925816] exit_to_usermode_loop+0x224/0x300 [ 28.926230] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 28.926731] syscall_return_slowpath+0x42f/0x500 [ 28.927160] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 28.927610] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 28.928055] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.928505] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.928935] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 28.929361] RIP: 0033:0x447299 [ 28.929651] RSP: 002b:00007f704d7accf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 28.930341] RAX: fffffffffffffe00 RBX: 0000000000708188 RCX: 0000000000447299 [ 28.930988] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708188 [ 28.931637] RBP: 0000000000708160 R08: 0000000000000000 R09: 0000000000000000 [ 28.932286] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 28.932936] R13: 0000000000000000 R14: 00007f704d7ad9c0 R15: 00007f704d7ad700 [ 28.933643] Dumping ftrace buffer: [ 28.933962] (ftrace buffer empty) [ 28.934296] Kernel Offset: disabled [ 28.934624] Rebooting in 86400 seconds..