Debian GNU/Linux 7 syzkaller ttyS0 2017/09/02 19:05:33 parsed 1 programs 2017/09/02 19:05:33 executed programs: 0 syzkaller login: [ 35.706459] dev_remove_pack: ffff88003c1bdb40 not found [ 35.737334] ================================================================== [ 35.738198] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 35.739138] Read of size 8 at addr ffff88003b6bf668 by task syz-executor0/3222 [ 35.739924] [ 35.740112] CPU: 1 PID: 3222 Comm: syz-executor0 Not tainted 4.13.0-rc7-next-20170901+ #13 [ 35.741297] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 35.742439] Call Trace: [ 35.742823] dump_stack+0x194/0x257 [ 35.743407] ? arch_local_irq_restore+0x53/0x53 [ 35.744382] ? show_regs_print_info+0x65/0x65 [ 35.745006] ? __dev_remove_pack+0x305/0x3b0 [ 35.745678] print_address_description+0x73/0x250 [ 35.746271] ? __dev_remove_pack+0x305/0x3b0 [ 35.746951] kasan_report+0x24e/0x340 [ 35.747452] __asan_report_load8_noabort+0x14/0x20 [ 35.748397] __dev_remove_pack+0x305/0x3b0 [ 35.749032] ? dev_get_by_name_rcu+0x270/0x270 [ 35.749653] ? refcount_sub_and_test+0x115/0x1b0 [ 35.750379] __unregister_prot_hook+0x211/0x280 [ 35.751097] packet_release+0x8bb/0xd70 [ 35.751638] ? packet_set_ring+0x1b70/0x1b70 [ 35.752664] ? dentry_free+0xcd/0x130 [ 35.753908] ? rcu_read_lock_sched_held+0x108/0x120 [ 35.755832] ? kmem_cache_free+0x249/0x280 [ 35.756819] ? dentry_free+0xd2/0x130 [ 35.759401] ? locks_remove_file+0x3fa/0x5a0 [ 35.759974] ? fcntl_setlk+0x10d0/0x10d0 [ 35.760686] ? __fsnotify_parent+0xb4/0x3a0 [ 35.761260] ? fsnotify+0x1af0/0x1af0 [ 35.762714] sock_release+0x8d/0x1e0 [ 35.763393] ? sock_release+0x8d/0x1e0 [ 35.764548] ? sock_release+0x1e0/0x1e0 [ 35.766458] sock_close+0x16/0x20 [ 35.767032] __fput+0x333/0x7f0 [ 35.767829] ? fput+0x140/0x140 [ 35.769053] ? check_same_owner+0x320/0x320 [ 35.770658] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.771514] ____fput+0x15/0x20 [ 35.772478] task_work_run+0x199/0x270 [ 35.774157] ? task_work_cancel+0x210/0x210 [ 35.774919] ? _raw_spin_unlock+0x22/0x30 [ 35.776986] ? switch_task_namespaces+0x87/0xc0 [ 35.779984] do_exit+0xa52/0x1b40 [ 35.780571] ? plist_check_list+0xa0/0xa0 [ 35.781204] ? plist_del+0x47b/0x990 [ 35.781702] ? mm_update_next_owner+0x930/0x930 [ 35.782614] ? plist_add+0x760/0x760 [ 35.783692] ? check_same_owner+0x320/0x320 [ 35.785782] ? find_held_lock+0x39/0x1d0 [ 35.786334] ? check_noncircular+0x20/0x20 [ 35.788352] ? lock_downgrade+0x990/0x990 [ 35.790309] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 35.791352] ? find_held_lock+0x39/0x1d0 [ 35.791907] ? lock_downgrade+0x990/0x990 [ 35.793855] ? recalc_sigpending_tsk+0x117/0x150 [ 35.794654] ? recalc_sigpending+0x103/0x160 [ 35.796199] ? recalc_sigpending_tsk+0x150/0x150 [ 35.798062] ? get_signal+0x397/0x17e0 [ 35.798666] do_group_exit+0x149/0x400 [ 35.799473] ? __lock_is_held+0xbc/0x140 [ 35.801698] ? SyS_exit+0x30/0x30 [ 35.802135] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.803722] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.804320] get_signal+0x7e8/0x17e0 [ 35.805861] ? ptrace_notify+0x130/0x130 [ 35.806360] ? __fget+0xbb/0x580 [ 35.807231] ? __lockdep_init_map+0xe4/0x650 [ 35.809647] ? lock_release+0xd70/0xd70 [ 35.810180] ? exit_robust_list+0x240/0x240 [ 35.811934] do_signal+0x94/0x1ee0 [ 35.812421] ? iterate_fd+0x3f0/0x3f0 [ 35.812951] ? setup_sigcontext+0x7d0/0x7d0 [ 35.813355] ? __lock_is_held+0xbc/0x140 [ 35.813730] ? __fget_light+0x29d/0x390 [ 35.814045] ? selinux_tun_dev_create+0xc0/0xc0 [ 35.814443] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 35.815150] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 35.816088] ? alloc_file+0x284/0x3a0 [ 35.816791] ? exit_to_usermode_loop+0x98/0x300 [ 35.817698] exit_to_usermode_loop+0x224/0x300 [ 35.818466] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 35.819646] syscall_return_slowpath+0x42f/0x500 [ 35.820501] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 35.821438] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 35.822978] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.823645] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.826114] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.826631] RIP: 0033:0x447299 [ 35.826961] RSP: 002b:00007f1ac4e4bcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 35.827766] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 35.828519] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 35.829532] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 35.830421] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 35.830923] R13: 0000000000000000 R14: 00007f1ac4e4c9c0 R15: 00007f1ac4e4c700 [ 35.831468] [ 35.831585] Allocated by task 3222: [ 35.831879] save_stack_trace+0x16/0x20 [ 35.832141] save_stack+0x43/0xd0 [ 35.832454] kasan_kmalloc+0xad/0xe0 [ 35.832842] kmem_cache_alloc_trace+0x136/0x750 [ 35.833285] fanout_add+0xa50/0x1190 [ 35.833681] packet_setsockopt+0xfdc/0x1e80 [ 35.834112] SyS_setsockopt+0x189/0x360 [ 35.834611] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.835442] [ 35.835728] Freed by task 3222: [ 35.836315] save_stack_trace+0x16/0x20 [ 35.836751] save_stack+0x43/0xd0 [ 35.837118] kasan_slab_free+0x71/0xc0 [ 35.837541] kfree+0xca/0x250 [ 35.837847] packet_release+0xa8f/0xd70 [ 35.838247] sock_release+0x8d/0x1e0 [ 35.838794] sock_close+0x16/0x20 [ 35.839292] __fput+0x333/0x7f0 [ 35.839859] ____fput+0x15/0x20 [ 35.840417] task_work_run+0x199/0x270 [ 35.840906] do_exit+0xa52/0x1b40 [ 35.841364] do_group_exit+0x149/0x400 [ 35.841975] get_signal+0x7e8/0x17e0 [ 35.842393] do_signal+0x94/0x1ee0 [ 35.842718] exit_to_usermode_loop+0x224/0x300 [ 35.843447] syscall_return_slowpath+0x42f/0x500 [ 35.843879] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.844333] [ 35.844508] The buggy address belongs to the object at ffff88003b6bedc0 [ 35.844508] which belongs to the cache kmalloc-4096 of size 4096 [ 35.845802] The buggy address is located 2216 bytes inside of [ 35.845802] 4096-byte region [ffff88003b6bedc0, ffff88003b6bfdc0) [ 35.847040] The buggy address belongs to the page: [ 35.847656] page:ffffea0000edaf80 count:1 mapcount:0 mapping:ffff88003b6bedc0 index:0x0 compound_mapcount: 0 [ 35.848774] flags: 0x100000000008100(slab|head) [ 35.849318] raw: 0100000000008100 ffff88003b6bedc0 0000000000000000 0000000100000001 [ 35.850256] raw: ffffea0000e37420 ffff88003e801a50 ffff88003e800dc0 0000000000000000 [ 35.851073] page dumped because: kasan: bad access detected [ 35.851736] [ 35.851889] Memory state around the buggy address: [ 35.852471] ffff88003b6bf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.853377] ffff88003b6bf580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.854103] >ffff88003b6bf600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.854989] ^ [ 35.855771] ffff88003b6bf680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.856645] ffff88003b6bf700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.857506] ================================================================== [ 35.858324] Disabling lock debugging due to kernel taint [ 35.874949] Kernel panic - not syncing: panic_on_warn set ... [ 35.874949] [ 35.876086] CPU: 1 PID: 3222 Comm: syz-executor0 Tainted: G B 4.13.0-rc7-next-20170901+ #13 [ 35.877351] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 35.878355] Call Trace: [ 35.878677] dump_stack+0x194/0x257 [ 35.879058] ? arch_local_irq_restore+0x53/0x53 [ 35.879578] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.880126] ? __dev_remove_pack+0x2a0/0x3b0 [ 35.880613] panic+0x1e4/0x417 [ 35.880944] ? __warn+0x1d9/0x1d9 [ 35.881369] ? __dev_remove_pack+0x305/0x3b0 [ 35.881904] kasan_end_report+0x50/0x50 [ 35.882501] kasan_report+0x137/0x340 [ 35.882897] __asan_report_load8_noabort+0x14/0x20 [ 35.883436] __dev_remove_pack+0x305/0x3b0 [ 35.883871] ? dev_get_by_name_rcu+0x270/0x270 [ 35.884430] ? refcount_sub_and_test+0x115/0x1b0 [ 35.884935] __unregister_prot_hook+0x211/0x280 [ 35.886640] packet_release+0x8bb/0xd70 [ 35.887058] ? packet_set_ring+0x1b70/0x1b70 [ 35.887587] ? dentry_free+0xcd/0x130 [ 35.888135] ? rcu_read_lock_sched_held+0x108/0x120 [ 35.888831] ? kmem_cache_free+0x249/0x280 [ 35.889314] ? dentry_free+0xd2/0x130 [ 35.889708] ? locks_remove_file+0x3fa/0x5a0 [ 35.890171] ? fcntl_setlk+0x10d0/0x10d0 [ 35.890607] ? __fsnotify_parent+0xb4/0x3a0 [ 35.891326] ? fsnotify+0x1af0/0x1af0 [ 35.891998] sock_release+0x8d/0x1e0 [ 35.892486] ? sock_release+0x8d/0x1e0 [ 35.892907] ? sock_release+0x1e0/0x1e0 [ 35.893346] sock_close+0x16/0x20 [ 35.893715] __fput+0x333/0x7f0 [ 35.894083] ? fput+0x140/0x140 [ 35.894450] ? check_same_owner+0x320/0x320 [ 35.894894] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.895407] ____fput+0x15/0x20 [ 35.895761] task_work_run+0x199/0x270 [ 35.896197] ? task_work_cancel+0x210/0x210 [ 35.896689] ? _raw_spin_unlock+0x22/0x30 [ 35.897108] ? switch_task_namespaces+0x87/0xc0 [ 35.897705] do_exit+0xa52/0x1b40 [ 35.898072] ? plist_check_list+0xa0/0xa0 [ 35.898615] ? plist_del+0x47b/0x990 [ 35.899010] ? mm_update_next_owner+0x930/0x930 [ 35.899596] ? plist_add+0x760/0x760 [ 35.900174] ? check_same_owner+0x320/0x320 [ 35.900714] ? find_held_lock+0x39/0x1d0 [ 35.901156] ? check_noncircular+0x20/0x20 [ 35.901673] ? lock_downgrade+0x990/0x990 [ 35.902142] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 35.902892] ? find_held_lock+0x39/0x1d0 [ 35.903385] ? lock_downgrade+0x990/0x990 [ 35.903849] ? recalc_sigpending_tsk+0x117/0x150 [ 35.904358] ? recalc_sigpending+0x103/0x160 [ 35.904822] ? recalc_sigpending_tsk+0x150/0x150 [ 35.905335] ? get_signal+0x397/0x17e0 [ 35.905765] do_group_exit+0x149/0x400 [ 35.906762] ? __lock_is_held+0xbc/0x140 [ 35.907545] ? SyS_exit+0x30/0x30 [ 35.908074] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.908581] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.909098] get_signal+0x7e8/0x17e0 [ 35.909674] ? ptrace_notify+0x130/0x130 [ 35.910293] ? __fget+0xbb/0x580 [ 35.910919] ? __lockdep_init_map+0xe4/0x650 [ 35.911723] ? lock_release+0xd70/0xd70 [ 35.912447] ? exit_robust_list+0x240/0x240 [ 35.913228] do_signal+0x94/0x1ee0 [ 35.913854] ? iterate_fd+0x3f0/0x3f0 [ 35.914368] ? setup_sigcontext+0x7d0/0x7d0 [ 35.914845] ? __lock_is_held+0xbc/0x140 [ 35.915268] ? __fget_light+0x29d/0x390 [ 35.915802] ? selinux_tun_dev_create+0xc0/0xc0 [ 35.916314] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 35.916893] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 35.917421] ? alloc_file+0x284/0x3a0 [ 35.917679] ? exit_to_usermode_loop+0x98/0x300 [ 35.917996] exit_to_usermode_loop+0x224/0x300 [ 35.918474] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 35.919483] syscall_return_slowpath+0x42f/0x500 [ 35.919981] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 35.920485] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 35.920985] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.921495] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.921979] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.922539] RIP: 0033:0x447299 [ 35.923149] RSP: 002b:00007f1ac4e4bcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 35.924678] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 35.926122] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 35.927514] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 35.931311] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 35.933219] R13: 0000000000000000 R14: 00007f1ac4e4c9c0 R15: 00007f1ac4e4c700 [ 35.946505] Dumping ftrace buffer: [ 35.946891] (ftrace buffer empty) [ 35.947278] Kernel Offset: disabled [ 35.947650] Rebooting in 86400 seconds..