INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-kasan-gce-4,10.128.0.58' (ECDSA) to the list of known hosts. 2017/09/02 19:03:33 parsed 1 programs 2017/09/02 19:03:33 executed programs: 0 syzkaller login: [ 46.048187] dev_remove_pack: ffff8801d03c9000 not found [ 46.066214] ================================================================== [ 46.067296] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 46.068184] Read of size 8 at addr ffff8801d034d228 by task syz-executor7/3168 [ 46.069168] [ 46.070766] CPU: 0 PID: 3168 Comm: syz-executor7 Not tainted 4.13.0-rc7+ #64 [ 46.077926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.087263] Call Trace: [ 46.089834] dump_stack+0x194/0x257 [ 46.093440] ? arch_local_irq_restore+0x53/0x53 [ 46.098082] ? show_regs_print_info+0x65/0x65 [ 46.102557] ? __dev_remove_pack+0x305/0x3b0 [ 46.106943] print_address_description+0x73/0x250 [ 46.111759] ? __dev_remove_pack+0x305/0x3b0 [ 46.116141] kasan_report+0x24e/0x340 [ 46.119941] __asan_report_load8_noabort+0x14/0x20 [ 46.124848] __dev_remove_pack+0x305/0x3b0 [ 46.129054] ? dev_get_by_name_rcu+0x270/0x270 [ 46.133608] ? refcount_sub_and_test+0x115/0x1b0 [ 46.138341] __unregister_prot_hook+0x211/0x280 [ 46.142987] packet_release+0x8bb/0xd70 [ 46.146937] ? packet_set_ring+0x1b70/0x1b70 [ 46.151328] ? dentry_free+0xcd/0x130 [ 46.155100] ? rcu_read_lock_sched_held+0x108/0x120 [ 46.160087] ? kmem_cache_free+0x249/0x280 [ 46.164299] ? dentry_free+0xd2/0x130 [ 46.168074] ? locks_remove_file+0x414/0x560 [ 46.172462] ? fcntl_setlk+0x10c0/0x10c0 [ 46.176493] ? __fsnotify_parent+0xb4/0x3a0 [ 46.180790] ? fsnotify+0x1af0/0x1af0 [ 46.184564] sock_release+0x8d/0x1e0 [ 46.188245] ? sock_release+0x8d/0x1e0 [ 46.192101] ? sock_release+0x1e0/0x1e0 [ 46.196044] sock_close+0x16/0x20 [ 46.199467] __fput+0x327/0x7e0 [ 46.202718] ? fput+0x140/0x140 [ 46.205966] ? check_same_owner+0x320/0x320 [ 46.210258] ? do_raw_spin_trylock+0x190/0x190 [ 46.214810] ? check_same_owner+0x320/0x320 [ 46.219108] ____fput+0x15/0x20 [ 46.222361] task_work_run+0x18a/0x260 [ 46.226220] ? task_work_cancel+0x210/0x210 [ 46.230514] ? _raw_spin_unlock+0x22/0x30 [ 46.234633] ? switch_task_namespaces+0x87/0xc0 [ 46.239279] do_exit+0xa3a/0x1b10 [ 46.242704] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 46.247870] ? plist_check_list+0xa0/0xa0 [ 46.251988] ? plist_add+0x5cb/0x760 [ 46.255679] ? mm_update_next_owner+0x930/0x930 [ 46.260317] ? plist_add+0x760/0x760 [ 46.264015] ? check_noncircular+0x20/0x20 [ 46.268223] ? check_same_owner+0x320/0x320 [ 46.272513] ? lock_acquire+0x1d5/0x580 [ 46.276459] ? futex_wait_setup+0x14a/0x3d0 [ 46.280751] ? __might_sleep+0x95/0x190 [ 46.284712] ? check_noncircular+0x20/0x20 [ 46.288914] ? futex_wait+0x43e/0xa00 [ 46.292704] ? do_raw_spin_trylock+0x190/0x190 [ 46.297271] ? fault_in_user_writeable+0x90/0x90 [ 46.302003] ? find_held_lock+0x35/0x1d0 [ 46.306048] ? get_signal+0x855/0x17e0 [ 46.309905] ? lock_downgrade+0x990/0x990 [ 46.314027] do_group_exit+0x149/0x400 [ 46.317884] ? __lock_is_held+0xb6/0x140 [ 46.321913] ? SyS_exit+0x30/0x30 [ 46.325332] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.329796] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.334783] get_signal+0x7e8/0x17e0 [ 46.338490] ? ptrace_notify+0x130/0x130 [ 46.342523] ? lock_downgrade+0x990/0x990 [ 46.346638] ? lock_release+0xa40/0xa40 [ 46.350587] ? exit_robust_list+0x240/0x240 [ 46.354890] do_signal+0x94/0x1ee0 [ 46.358403] ? iterate_fd+0x3f0/0x3f0 [ 46.362177] ? setup_sigcontext+0x7d0/0x7d0 [ 46.366491] ? selinux_tun_dev_create+0xc0/0xc0 [ 46.371135] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 46.376817] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 46.382069] ? exit_to_usermode_loop+0x98/0x300 [ 46.386745] exit_to_usermode_loop+0x224/0x300 [ 46.391313] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 46.396833] syscall_return_slowpath+0x3a7/0x450 [ 46.401556] ? prepare_exit_to_usermode+0x220/0x220 [ 46.406540] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 46.411440] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.416425] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.421151] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 46.425888] RIP: 0033:0x451e59 [ 46.429046] RSP: 002b:00007f104d674cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 46.436734] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 46.443993] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 46.451234] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 46.458474] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 46.465729] R13: 0000000000a6f7ef R14: 00007f104d6759c0 R15: 0000000000000006 [ 46.472982] [ 46.474579] Allocated by task 3163: [ 46.478180] save_stack_trace+0x16/0x20 [ 46.482133] save_stack+0x43/0xd0 [ 46.485563] kasan_kmalloc+0xad/0xe0 [ 46.489265] kmem_cache_alloc_trace+0x12f/0x740 [ 46.493929] fanout_add+0xa50/0x1190 [ 46.497607] packet_setsockopt+0xfdc/0x1e80 [ 46.501897] SyS_setsockopt+0x189/0x360 [ 46.505841] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.510560] [ 46.512152] Freed by task 3168: [ 46.515395] save_stack_trace+0x16/0x20 [ 46.519336] save_stack+0x43/0xd0 [ 46.522755] kasan_slab_free+0x71/0xc0 [ 46.526606] kfree+0xca/0x250 [ 46.529679] packet_release+0xa8f/0xd70 [ 46.533623] sock_release+0x8d/0x1e0 [ 46.537313] sock_close+0x16/0x20 [ 46.540733] __fput+0x327/0x7e0 [ 46.543979] ____fput+0x15/0x20 [ 46.547224] task_work_run+0x18a/0x260 [ 46.551079] do_exit+0xa3a/0x1b10 [ 46.554499] do_group_exit+0x149/0x400 [ 46.558364] get_signal+0x7e8/0x17e0 [ 46.562050] do_signal+0x94/0x1ee0 [ 46.565561] exit_to_usermode_loop+0x224/0x300 [ 46.570109] syscall_return_slowpath+0x3a7/0x450 [ 46.574833] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 46.579550] [ 46.581146] The buggy address belongs to the object at ffff8801d034c980 [ 46.581146] which belongs to the cache kmalloc-4096 of size 4096 [ 46.593957] The buggy address is located 2216 bytes inside of [ 46.593957] 4096-byte region [ffff8801d034c980, ffff8801d034d980) [ 46.605978] The buggy address belongs to the page: [ 46.610878] page:ffffea000740d300 count:1 mapcount:0 mapping:ffff8801d034c980 index:0x0 compound_mapcount: 0 [ 46.620816] flags: 0x200000000008100(slab|head) [ 46.625456] raw: 0200000000008100 ffff8801d034c980 0000000000000000 0000000100000001 [ 46.633311] raw: ffffea000740fe20 ffffea000740d3a0 ffff8801dac00dc0 0000000000000000 [ 46.641158] page dumped because: kasan: bad access detected [ 46.646833] [ 46.648427] Memory state around the buggy address: [ 46.653321] ffff8801d034d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.660662] ffff8801d034d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.667998] >ffff8801d034d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.675340] ^ [ 46.679978] ffff8801d034d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.687305] ffff8801d034d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.694632] ================================================================== [ 46.701955] Disabling lock debugging due to kernel taint [ 46.707488] Kernel panic - not syncing: panic_on_warn set ... [ 46.707488] [ 46.714822] CPU: 0 PID: 3168 Comm: syz-executor7 Tainted: G B 4.13.0-rc7+ #64 [ 46.723189] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.732508] Call Trace: [ 46.735067] dump_stack+0x194/0x257 [ 46.738665] ? arch_local_irq_restore+0x53/0x53 [ 46.743303] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.748026] ? __dev_remove_pack+0x2c0/0x3b0 [ 46.752402] panic+0x1e4/0x417 [ 46.755559] ? __warn+0x1d9/0x1d9 [ 46.758982] ? __dev_remove_pack+0x305/0x3b0 [ 46.763360] kasan_end_report+0x50/0x50 [ 46.767302] kasan_report+0x137/0x340 [ 46.771071] __asan_report_load8_noabort+0x14/0x20 [ 46.775965] __dev_remove_pack+0x305/0x3b0 [ 46.780166] ? dev_get_by_name_rcu+0x270/0x270 [ 46.784714] ? refcount_sub_and_test+0x115/0x1b0 [ 46.789441] __unregister_prot_hook+0x211/0x280 [ 46.794079] packet_release+0x8bb/0xd70 [ 46.798022] ? packet_set_ring+0x1b70/0x1b70 [ 46.802429] ? dentry_free+0xcd/0x130 [ 46.806193] ? rcu_read_lock_sched_held+0x108/0x120 [ 46.811178] ? kmem_cache_free+0x249/0x280 [ 46.815379] ? dentry_free+0xd2/0x130 [ 46.819149] ? locks_remove_file+0x414/0x560 [ 46.823525] ? fcntl_setlk+0x10c0/0x10c0 [ 46.827555] ? __fsnotify_parent+0xb4/0x3a0 [ 46.831852] ? fsnotify+0x1af0/0x1af0 [ 46.835624] sock_release+0x8d/0x1e0 [ 46.839306] ? sock_release+0x8d/0x1e0 [ 46.843158] ? sock_release+0x1e0/0x1e0 [ 46.847097] sock_close+0x16/0x20 [ 46.850518] __fput+0x327/0x7e0 [ 46.853765] ? fput+0x140/0x140 [ 46.857013] ? check_same_owner+0x320/0x320 [ 46.861302] ? do_raw_spin_trylock+0x190/0x190 [ 46.865849] ? check_same_owner+0x320/0x320 [ 46.870137] ____fput+0x15/0x20 [ 46.873385] task_work_run+0x18a/0x260 [ 46.877243] ? task_work_cancel+0x210/0x210 [ 46.881536] ? _raw_spin_unlock+0x22/0x30 [ 46.885651] ? switch_task_namespaces+0x87/0xc0 [ 46.890289] do_exit+0xa3a/0x1b10 [ 46.893708] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 46.898872] ? plist_check_list+0xa0/0xa0 [ 46.902985] ? plist_add+0x5cb/0x760 [ 46.906674] ? mm_update_next_owner+0x930/0x930 [ 46.911308] ? plist_add+0x760/0x760 [ 46.915011] ? check_noncircular+0x20/0x20 [ 46.919226] ? check_same_owner+0x320/0x320 [ 46.923511] ? lock_acquire+0x1d5/0x580 [ 46.927459] ? futex_wait_setup+0x14a/0x3d0 [ 46.931748] ? __might_sleep+0x95/0x190 [ 46.935693] ? check_noncircular+0x20/0x20 [ 46.939892] ? futex_wait+0x43e/0xa00 [ 46.943661] ? do_raw_spin_trylock+0x190/0x190 [ 46.948209] ? fault_in_user_writeable+0x90/0x90 [ 46.952934] ? find_held_lock+0x35/0x1d0 [ 46.956966] ? get_signal+0x855/0x17e0 [ 46.960820] ? lock_downgrade+0x990/0x990 [ 46.964948] do_group_exit+0x149/0x400 [ 46.968803] ? __lock_is_held+0xb6/0x140 [ 46.972844] ? SyS_exit+0x30/0x30 [ 46.976268] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.980728] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.985711] get_signal+0x7e8/0x17e0 [ 46.989403] ? ptrace_notify+0x130/0x130 [ 46.993429] ? lock_downgrade+0x990/0x990 [ 46.997544] ? lock_release+0xa40/0xa40 [ 47.001487] ? exit_robust_list+0x240/0x240 [ 47.005783] do_signal+0x94/0x1ee0 [ 47.009294] ? iterate_fd+0x3f0/0x3f0 [ 47.013066] ? setup_sigcontext+0x7d0/0x7d0 [ 47.017373] ? selinux_tun_dev_create+0xc0/0xc0 [ 47.022012] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 47.027693] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 47.032952] ? exit_to_usermode_loop+0x98/0x300 [ 47.037613] exit_to_usermode_loop+0x224/0x300 [ 47.042164] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 47.047673] syscall_return_slowpath+0x3a7/0x450