2017/09/08 03:49:33 parsed 1 programs 2017/09/08 03:49:33 executed programs: 0 2017/09/08 03:49:38 executed programs: 70 syzkaller login: [ 42.122086] dev_remove_pack: ffff88006794b380 not found [ 42.137430] ================================================================== [ 42.138286] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 42.139028] Read of size 8 at addr ffff88006ad96d28 by task syz-executor0/3329 [ 42.139808] [ 42.139985] CPU: 3 PID: 3329 Comm: syz-executor0 Not tainted 4.13.0-next-20170907+ #17 [ 42.140818] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 42.143160] Call Trace: [ 42.143445] dump_stack+0x194/0x257 [ 42.143836] ? arch_local_irq_restore+0x53/0x53 [ 42.144328] ? show_regs_print_info+0x65/0x65 [ 42.144828] ? __dev_remove_pack+0x305/0x3b0 [ 42.145320] print_address_description+0x73/0x250 [ 42.145855] ? __dev_remove_pack+0x305/0x3b0 [ 42.146331] kasan_report+0x24e/0x340 [ 42.146760] __asan_report_load8_noabort+0x14/0x20 [ 42.147341] __dev_remove_pack+0x305/0x3b0 [ 42.147801] ? dev_get_by_name_rcu+0x270/0x270 [ 42.148303] ? refcount_sub_and_test+0x115/0x1b0 [ 42.148835] __unregister_prot_hook+0x211/0x280 [ 42.149350] packet_release+0x8bb/0xd70 [ 42.149801] ? packet_set_ring+0x1b70/0x1b70 [ 42.150221] ? dentry_free+0xcd/0x130 [ 42.150565] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.151156] ? kmem_cache_free+0x249/0x280 [ 42.151538] ? dentry_free+0xd2/0x130 [ 42.151877] ? locks_remove_file+0x3fa/0x5a0 [ 42.152326] ? fcntl_setlk+0x10d0/0x10d0 [ 42.152780] ? __fsnotify_parent+0xb4/0x3a0 [ 42.153262] ? fsnotify+0x1af0/0x1af0 [ 42.153658] sock_release+0x8d/0x1e0 [ 42.154020] ? sock_release+0x8d/0x1e0 [ 42.154441] ? sock_release+0x1e0/0x1e0 [ 42.154878] sock_close+0x16/0x20 [ 42.170208] __fput+0x333/0x7f0 [ 42.170555] ? fput+0x140/0x140 [ 42.170945] ? check_same_owner+0x320/0x320 [ 42.171339] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.171782] ____fput+0x15/0x20 [ 42.172100] task_work_run+0x199/0x270 [ 42.172455] ? task_work_cancel+0x210/0x210 [ 42.172875] ? _raw_spin_unlock+0x22/0x30 [ 42.173263] ? switch_task_namespaces+0x87/0xc0 [ 42.173697] do_exit+0xa52/0x1b40 [ 42.174012] ? plist_check_list+0xa0/0xa0 [ 42.174416] ? plist_del+0x47b/0x990 [ 42.174764] ? mm_update_next_owner+0x930/0x930 [ 42.175220] ? plist_add+0x760/0x760 [ 42.175617] ? check_same_owner+0x320/0x320 [ 42.176007] ? find_held_lock+0x39/0x1d0 [ 42.176400] ? check_noncircular+0x20/0x20 [ 42.176814] ? lock_downgrade+0x990/0x990 [ 42.177190] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.177711] ? find_held_lock+0x39/0x1d0 [ 42.178102] ? lock_downgrade+0x990/0x990 [ 42.178490] ? recalc_sigpending_tsk+0x117/0x150 [ 42.181049] ? recalc_sigpending+0x103/0x160 [ 42.181906] ? recalc_sigpending_tsk+0x150/0x150 [ 42.182840] ? get_signal+0x397/0x17e0 [ 42.183620] do_group_exit+0x149/0x400 [ 42.187820] ? __lock_is_held+0xbc/0x140 [ 42.188275] ? SyS_exit+0x30/0x30 [ 42.188649] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.189146] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.189722] get_signal+0x7e8/0x17e0 [ 42.190183] ? ptrace_notify+0x130/0x130 [ 42.190643] ? __fget+0xbb/0x580 [ 42.191447] ? lock_release+0xd70/0xd70 [ 42.191901] ? exit_robust_list+0x240/0x240 [ 42.192268] do_signal+0x94/0x1ee0 [ 42.192672] ? iterate_fd+0x3f0/0x3f0 [ 42.193082] ? up_read+0x1a/0x40 [ 42.193452] ? setup_sigcontext+0x7d0/0x7d0 [ 42.193944] ? __do_page_fault+0xb60/0xb60 [ 42.194414] ? __fget_light+0x29d/0x390 [ 42.202523] ? selinux_tun_dev_create+0xc0/0xc0 [ 42.204481] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 42.205648] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 42.208751] ? exit_to_usermode_loop+0x98/0x300 [ 42.209218] exit_to_usermode_loop+0x224/0x300 [ 42.209722] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 42.210347] syscall_return_slowpath+0x42f/0x500 [ 42.210855] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 42.211423] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 42.212004] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.212589] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.213133] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.213572] RIP: 0033:0x447299 [ 42.213874] RSP: 002b:00007fd39e06dcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 42.214581] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 42.215398] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 42.223307] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 42.224101] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 42.224923] R13: 0000000000000000 R14: 00007fd39e06e9c0 R15: 00007fd39e06e700 [ 42.225731] [ 42.225923] Allocated by task 3329: [ 42.226333] save_stack_trace+0x16/0x20 [ 42.226777] save_stack+0x43/0xd0 [ 42.234469] kasan_kmalloc+0xad/0xe0 [ 42.234918] kmem_cache_alloc_trace+0x136/0x750 [ 42.235454] fanout_add+0xa50/0x1190 [ 42.235885] packet_setsockopt+0xfdc/0x1e80 [ 42.236395] SyS_setsockopt+0x189/0x360 [ 42.236858] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.237391] [ 42.237553] Freed by task 3329: [ 42.237936] save_stack_trace+0x16/0x20 [ 42.238380] save_stack+0x43/0xd0 [ 42.238777] kasan_slab_free+0x71/0xc0 [ 42.243280] kfree+0xca/0x250 [ 42.243618] packet_release+0xa8f/0xd70 [ 42.244055] sock_release+0x8d/0x1e0 [ 42.244464] sock_close+0x16/0x20 [ 42.244841] __fput+0x333/0x7f0 [ 42.245208] ____fput+0x15/0x20 [ 42.245573] task_work_run+0x199/0x270 [ 42.245998] do_exit+0xa52/0x1b40 [ 42.246385] do_group_exit+0x149/0x400 [ 42.246813] get_signal+0x7e8/0x17e0 [ 42.251333] do_signal+0x94/0x1ee0 [ 42.251741] exit_to_usermode_loop+0x224/0x300 [ 42.252264] syscall_return_slowpath+0x42f/0x500 [ 42.252812] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.253351] [ 42.253553] The buggy address belongs to the object at ffff88006ad96480 [ 42.253553] which belongs to the cache kmalloc-4096 of size 4096 [ 42.259061] The buggy address is located 2216 bytes inside of [ 42.259061] 4096-byte region [ffff88006ad96480, ffff88006ad97480) [ 42.260380] The buggy address belongs to the page: [ 42.260929] page:ffffea0001ab6580 count:1 mapcount:0 mapping:ffff88006ad96480 index:0x0 compound_mapcount: 0 [ 42.262034] flags: 0x500000000008100(slab|head) [ 42.262547] raw: 0500000000008100 ffff88006ad96480 0000000000000000 0000000100000001 [ 42.267459] raw: ffffea0001b0c9a0 ffff88006d800a50 ffff88003e800dc0 0000000000000000 [ 42.268319] page dumped because: kasan: bad access detected [ 42.268943] [ 42.269136] Memory state around the buggy address: [ 42.269689] ffff88006ad96c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.275014] ffff88006ad96c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.275811] >ffff88006ad96d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.276598] ^ [ 42.277116] ffff88006ad96d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.277837] ffff88006ad96e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.278643] ================================================================== [ 42.279457] Disabling lock debugging due to kernel taint [ 42.284058] Kernel panic - not syncing: panic_on_warn set ... [ 42.284058] [ 42.284936] CPU: 3 PID: 3329 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170907+ #17 [ 42.286042] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 42.288750] Call Trace: [ 42.289654] dump_stack+0x194/0x257 [ 42.291159] ? arch_local_irq_restore+0x53/0x53 [ 42.291673] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.293371] ? __dev_remove_pack+0x2f0/0x3b0 [ 42.293859] panic+0x1e4/0x417 [ 42.295237] ? __warn+0x1d9/0x1d9 [ 42.296274] ? __dev_remove_pack+0x305/0x3b0 [ 42.298717] kasan_end_report+0x50/0x50 [ 42.302204] kasan_report+0x137/0x340 [ 42.305354] __asan_report_load8_noabort+0x14/0x20 [ 42.309095] __dev_remove_pack+0x305/0x3b0 [ 42.310345] ? dev_get_by_name_rcu+0x270/0x270 [ 42.314748] ? refcount_sub_and_test+0x115/0x1b0 [ 42.317915] __unregister_prot_hook+0x211/0x280 [ 42.322630] packet_release+0x8bb/0xd70 [ 42.324374] ? packet_set_ring+0x1b70/0x1b70 [ 42.326198] ? dentry_free+0xcd/0x130 [ 42.328089] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.329951] ? kmem_cache_free+0x249/0x280 [ 42.331823] ? dentry_free+0xd2/0x130 [ 42.333833] ? locks_remove_file+0x3fa/0x5a0 [ 42.335705] ? fcntl_setlk+0x10d0/0x10d0 [ 42.337596] ? __fsnotify_parent+0xb4/0x3a0 [ 42.338710] ? fsnotify+0x1af0/0x1af0 [ 42.340295] sock_release+0x8d/0x1e0 [ 42.342159] ? sock_release+0x8d/0x1e0 [ 42.344053] ? sock_release+0x1e0/0x1e0 [ 42.345179] sock_close+0x16/0x20 [ 42.346546] __fput+0x333/0x7f0 [ 42.347841] ? fput+0x140/0x140 [ 42.349434] ? check_same_owner+0x320/0x320 [ 42.350917] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.352959] ____fput+0x15/0x20 [ 42.354775] task_work_run+0x199/0x270 [ 42.356402] ? task_work_cancel+0x210/0x210 [ 42.358113] ? _raw_spin_unlock+0x22/0x30 [ 42.359637] ? switch_task_namespaces+0x87/0xc0 [ 42.360458] do_exit+0xa52/0x1b40 [ 42.361578] ? plist_check_list+0xa0/0xa0 [ 42.362668] ? plist_del+0x47b/0x990 [ 42.363632] ? mm_update_next_owner+0x930/0x930 [ 42.365100] ? plist_add+0x760/0x760 [ 42.366221] ? check_same_owner+0x320/0x320 [ 42.367191] ? find_held_lock+0x39/0x1d0 [ 42.368091] ? check_noncircular+0x20/0x20 [ 42.369337] ? lock_downgrade+0x990/0x990 [ 42.370456] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.372390] ? find_held_lock+0x39/0x1d0 [ 42.373267] ? lock_downgrade+0x990/0x990 [ 42.374659] ? recalc_sigpending_tsk+0x117/0x150 [ 42.377025] ? recalc_sigpending+0x103/0x160 [ 42.378163] ? recalc_sigpending_tsk+0x150/0x150 [ 42.379391] ? get_signal+0x397/0x17e0 [ 42.380615] do_group_exit+0x149/0x400 [ 42.381739] ? __lock_is_held+0xbc/0x140 [ 42.383151] ? SyS_exit+0x30/0x30 [ 42.384242] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.385564] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.386983] get_signal+0x7e8/0x17e0 [ 42.387967] ? ptrace_notify+0x130/0x130 [ 42.388942] ? __fget+0xbb/0x580 [ 42.389883] ? lock_release+0xd70/0xd70 [ 42.390942] ? exit_robust_list+0x240/0x240 [ 42.392144] do_signal+0x94/0x1ee0 [ 42.392518] ? iterate_fd+0x3f0/0x3f0 [ 42.394073] ? up_read+0x1a/0x40 [ 42.394429] ? setup_sigcontext+0x7d0/0x7d0 [ 42.396055] ? __do_page_fault+0xb60/0xb60 [ 42.396511] ? __fget_light+0x29d/0x390 [ 42.398805] ? selinux_tun_dev_create+0xc0/0xc0 [ 42.400078] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 42.401662] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 42.403063] ? exit_to_usermode_loop+0x98/0x300 [ 42.404151] exit_to_usermode_loop+0x224/0x300 [ 42.405197] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 42.406996] syscall_return_slowpath+0x42f/0x500 [ 42.407597] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 42.410099] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 42.410716] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.413156] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.415064] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.416775] RIP: 0033:0x447299 [ 42.418516] RSP: 002b:00007fd39e06dcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 42.421252] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 42.424138] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 42.426458] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 42.428973] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 42.431307] R13: 0000000000000000 R14: 00007fd39e06e9c0 R15: 00007fd39e06e700 [ 42.433923] Dumping ftrace buffer: [ 42.439457] (ftrace buffer empty) [ 42.440544] Kernel Offset: disabled [ 42.441254] Rebooting in 86400 seconds..