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-5,10.128.0.25' (ECDSA) to the list of known hosts. 2017/09/04 01:11:03 parsed 1 programs 2017/09/04 01:11:03 executed programs: 0 syzkaller login: [ 47.672798] dev_remove_pack: ffff8801d5afb100 not found [ 47.685207] ================================================================== [ 47.686259] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 47.687148] Read of size 8 at addr ffff8801d0647628 by task syz-executor0/3021 [ 47.688164] [ 47.688394] CPU: 0 PID: 3021 Comm: syz-executor0 Not tainted 4.13.0-rc7+ #65 [ 47.689346] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.690563] Call Trace: [ 47.690919] dump_stack+0x194/0x257 [ 47.691414] ? arch_local_irq_restore+0x53/0x53 [ 47.692103] ? show_regs_print_info+0x65/0x65 [ 47.692722] ? __dev_remove_pack+0x305/0x3b0 [ 47.695679] print_address_description+0x73/0x250 [ 47.700486] ? __dev_remove_pack+0x305/0x3b0 [ 47.704860] kasan_report+0x24e/0x340 [ 47.708630] __asan_report_load8_noabort+0x14/0x20 [ 47.713523] __dev_remove_pack+0x305/0x3b0 [ 47.717723] ? dev_get_by_name_rcu+0x270/0x270 [ 47.722270] ? refcount_sub_and_test+0x115/0x1b0 [ 47.727001] __unregister_prot_hook+0x211/0x280 [ 47.731639] packet_release+0x8bb/0xd70 [ 47.735584] ? packet_set_ring+0x1b70/0x1b70 [ 47.739960] ? dentry_free+0xcd/0x130 [ 47.743734] ? rcu_read_lock_sched_held+0x108/0x120 [ 47.748716] ? kmem_cache_free+0x249/0x280 [ 47.752916] ? dentry_free+0xd2/0x130 [ 47.756684] ? locks_remove_file+0x414/0x560 [ 47.761062] ? fcntl_setlk+0x10c0/0x10c0 [ 47.765097] ? __fsnotify_parent+0xb4/0x3a0 [ 47.769388] ? fsnotify+0x1af0/0x1af0 [ 47.773157] sock_release+0x8d/0x1e0 [ 47.776833] ? sock_release+0x8d/0x1e0 [ 47.780683] ? sock_release+0x1e0/0x1e0 [ 47.784620] sock_close+0x16/0x20 [ 47.788038] __fput+0x327/0x7e0 [ 47.791291] ? fput+0x140/0x140 [ 47.794537] ? check_same_owner+0x320/0x320 [ 47.798823] ? do_raw_spin_trylock+0x190/0x190 [ 47.803374] ? check_same_owner+0x320/0x320 [ 47.807664] ____fput+0x15/0x20 [ 47.810908] task_work_run+0x18a/0x260 [ 47.814762] ? task_work_cancel+0x210/0x210 [ 47.819051] ? _raw_spin_unlock+0x22/0x30 [ 47.823162] ? switch_task_namespaces+0x87/0xc0 [ 47.827798] do_exit+0xa3a/0x1b10 [ 47.831216] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 47.836385] ? plist_check_list+0xa0/0xa0 [ 47.840500] ? plist_add+0x5cb/0x760 [ 47.844185] ? mm_update_next_owner+0x930/0x930 [ 47.848822] ? plist_add+0x760/0x760 [ 47.852506] ? check_noncircular+0x20/0x20 [ 47.856709] ? check_same_owner+0x320/0x320 [ 47.860999] ? lock_acquire+0x1d5/0x580 [ 47.864943] ? futex_wait_setup+0x14a/0x3d0 [ 47.869236] ? __might_sleep+0x95/0x190 [ 47.873186] ? check_noncircular+0x20/0x20 [ 47.877386] ? futex_wait+0x43e/0xa00 [ 47.881161] ? do_raw_spin_trylock+0x190/0x190 [ 47.885706] ? fault_in_user_writeable+0x90/0x90 [ 47.890434] ? find_held_lock+0x35/0x1d0 [ 47.894469] ? get_signal+0x855/0x17e0 [ 47.898324] ? lock_downgrade+0x990/0x990 [ 47.902469] do_group_exit+0x149/0x400 [ 47.906326] ? __lock_is_held+0xb6/0x140 [ 47.910353] ? SyS_exit+0x30/0x30 [ 47.913774] ? _raw_spin_unlock_irq+0x27/0x70 [ 47.918235] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.923223] get_signal+0x7e8/0x17e0 [ 47.926927] ? ptrace_notify+0x130/0x130 [ 47.930952] ? lock_downgrade+0x990/0x990 [ 47.935067] ? lock_release+0xa40/0xa40 [ 47.939013] ? exit_robust_list+0x240/0x240 [ 47.943331] do_signal+0x94/0x1ee0 [ 47.946842] ? iterate_fd+0x3f0/0x3f0 [ 47.950613] ? setup_sigcontext+0x7d0/0x7d0 [ 47.954904] ? __perf_event_task_sched_in+0x219/0xa10 [ 47.960076] ? selinux_tun_dev_create+0xc0/0xc0 [ 47.964725] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 47.970407] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 47.975664] ? exit_to_usermode_loop+0x98/0x300 [ 47.980325] exit_to_usermode_loop+0x224/0x300 [ 47.984876] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 47.990396] syscall_return_slowpath+0x3a7/0x450 [ 47.995118] ? prepare_exit_to_usermode+0x220/0x220 [ 48.000100] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 48.004998] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.009988] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.014718] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 48.019438] RIP: 0033:0x451e59 [ 48.022594] RSP: 002b:00007fe7b94aecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 48.030268] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 48.037501] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 48.044737] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 48.051971] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 48.059206] R13: 00007fffcd3ed12f R14: 00007fe7b94af9c0 R15: 0000000000000004 [ 48.066457] [ 48.068051] Allocated by task 3020: [ 48.071646] save_stack_trace+0x16/0x20 [ 48.075583] save_stack+0x43/0xd0 [ 48.078999] kasan_kmalloc+0xad/0xe0 [ 48.082675] kmem_cache_alloc_trace+0x12f/0x740 [ 48.087308] fanout_add+0xa50/0x1190 [ 48.090988] packet_setsockopt+0xfdc/0x1e80 [ 48.095272] SyS_setsockopt+0x189/0x360 [ 48.099210] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 48.103927] [ 48.105520] Freed by task 3021: [ 48.108763] save_stack_trace+0x16/0x20 [ 48.112703] save_stack+0x43/0xd0 [ 48.116121] kasan_slab_free+0x71/0xc0 [ 48.119973] kfree+0xca/0x250 [ 48.123043] packet_release+0xa8f/0xd70 [ 48.126982] sock_release+0x8d/0x1e0 [ 48.130659] sock_close+0x16/0x20 [ 48.134079] __fput+0x327/0x7e0 [ 48.137324] ____fput+0x15/0x20 [ 48.140568] task_work_run+0x18a/0x260 [ 48.144421] do_exit+0xa3a/0x1b10 [ 48.147839] do_group_exit+0x149/0x400 [ 48.151691] get_signal+0x7e8/0x17e0 [ 48.155369] do_signal+0x94/0x1ee0 [ 48.158874] exit_to_usermode_loop+0x224/0x300 [ 48.163421] syscall_return_slowpath+0x3a7/0x450 [ 48.168141] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 48.172871] [ 48.174464] The buggy address belongs to the object at ffff8801d0646d80 [ 48.174464] which belongs to the cache kmalloc-4096 of size 4096 [ 48.187256] The buggy address is located 2216 bytes inside of [ 48.187256] 4096-byte region [ffff8801d0646d80, ffff8801d0647d80) [ 48.199278] The buggy address belongs to the page: [ 48.204174] page:ffffea0007419180 count:1 mapcount:0 mapping:ffff8801d0646d80 index:0x0 compound_mapcount: 0 [ 48.214109] flags: 0x200000000008100(slab|head) [ 48.218744] raw: 0200000000008100 ffff8801d0646d80 0000000000000000 0000000100000001 [ 48.226587] raw: ffffea0007419120 ffffea00074193a0 ffff8801dac00dc0 0000000000000000 [ 48.234436] page dumped because: kasan: bad access detected [ 48.240110] [ 48.241699] Memory state around the buggy address: [ 48.246591] ffff8801d0647500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.253924] ffff8801d0647580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.261245] >ffff8801d0647600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.268568] ^ [ 48.273201] ffff8801d0647680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.280522] ffff8801d0647700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.287857] ================================================================== [ 48.295179] Disabling lock debugging due to kernel taint [ 48.300684] Kernel panic - not syncing: panic_on_warn set ... [ 48.300684] [ 48.308017] CPU: 0 PID: 3021 Comm: syz-executor0 Tainted: G B 4.13.0-rc7+ #65 [ 48.316381] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.325697] Call Trace: [ 48.328249] dump_stack+0x194/0x257 [ 48.331852] ? arch_local_irq_restore+0x53/0x53 [ 48.336486] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.341206] ? rcu_process_callbacks+0x66a/0x17b0 [ 48.346013] ? __dev_remove_pack+0x2c0/0x3b0 [ 48.350388] panic+0x1e4/0x417 [ 48.353542] ? __warn+0x1d9/0x1d9 [ 48.356965] ? __dev_remove_pack+0x305/0x3b0 [ 48.361338] kasan_end_report+0x50/0x50 [ 48.365275] kasan_report+0x137/0x340 [ 48.369039] __asan_report_load8_noabort+0x14/0x20 [ 48.373931] __dev_remove_pack+0x305/0x3b0 [ 48.378129] ? dev_get_by_name_rcu+0x270/0x270 [ 48.382674] ? refcount_sub_and_test+0x115/0x1b0 [ 48.387395] __unregister_prot_hook+0x211/0x280 [ 48.392029] packet_release+0x8bb/0xd70 [ 48.395969] ? packet_set_ring+0x1b70/0x1b70 [ 48.400343] ? dentry_free+0xcd/0x130 [ 48.404109] ? rcu_read_lock_sched_held+0x108/0x120 [ 48.409087] ? kmem_cache_free+0x249/0x280 [ 48.413287] ? dentry_free+0xd2/0x130 [ 48.417053] ? locks_remove_file+0x414/0x560 [ 48.421428] ? fcntl_setlk+0x10c0/0x10c0 [ 48.425452] ? __fsnotify_parent+0xb4/0x3a0 [ 48.429735] ? fsnotify+0x1af0/0x1af0 [ 48.433500] sock_release+0x8d/0x1e0 [ 48.437176] ? sock_release+0x8d/0x1e0 [ 48.441026] ? sock_release+0x1e0/0x1e0 [ 48.444962] sock_close+0x16/0x20 [ 48.448380] __fput+0x327/0x7e0 [ 48.451626] ? fput+0x140/0x140 [ 48.454871] ? check_same_owner+0x320/0x320 [ 48.459154] ? do_raw_spin_trylock+0x190/0x190 [ 48.463705] ? check_same_owner+0x320/0x320 [ 48.467991] ____fput+0x15/0x20 [ 48.471234] task_work_run+0x18a/0x260 [ 48.475094] ? task_work_cancel+0x210/0x210 [ 48.479383] ? _raw_spin_unlock+0x22/0x30 [ 48.483502] ? switch_task_namespaces+0x87/0xc0 [ 48.488136] do_exit+0xa3a/0x1b10 [ 48.491553] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 48.496704] ? plist_check_list+0xa0/0xa0 [ 48.500814] ? plist_add+0x5cb/0x760 [ 48.504491] ? mm_update_next_owner+0x930/0x930 [ 48.509126] ? plist_add+0x760/0x760 [ 48.512807] ? check_noncircular+0x20/0x20 [ 48.517098] ? check_same_owner+0x320/0x320 [ 48.521385] ? lock_acquire+0x1d5/0x580 [ 48.525325] ? futex_wait_setup+0x14a/0x3d0 [ 48.529614] ? __might_sleep+0x95/0x190 [ 48.533559] ? check_noncircular+0x20/0x20 [ 48.537758] ? futex_wait+0x43e/0xa00 [ 48.541526] ? do_raw_spin_trylock+0x190/0x190 [ 48.546070] ? fault_in_user_writeable+0x90/0x90 [ 48.550795] ? find_held_lock+0x35/0x1d0 [ 48.554821] ? get_signal+0x855/0x17e0 [ 48.558670] ? lock_downgrade+0x990/0x990 [ 48.562783] do_group_exit+0x149/0x400 [ 48.566642] ? __lock_is_held+0xb6/0x140 [ 48.570665] ? SyS_exit+0x30/0x30 [ 48.574082] ? _raw_spin_unlock_irq+0x27/0x70 [ 48.578542] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.583524] get_signal+0x7e8/0x17e0 [ 48.587211] ? ptrace_notify+0x130/0x130 [ 48.591234] ? lock_downgrade+0x990/0x990 [ 48.595346] ? lock_release+0xa40/0xa40 [ 48.599288] ? exit_robust_list+0x240/0x240 [ 48.603577] do_signal+0x94/0x1ee0 [ 48.607092] ? iterate_fd+0x3f0/0x3f0 [ 48.610857] ? setup_sigcontext+0x7d0/0x7d0 [ 48.615144] ? __perf_event_task_sched_in+0x219/0xa10 [ 48.620307] ? selinux_tun_dev_create+0xc0/0xc0 [ 48.625117] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 48.630793] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 48.636041] ? exit_to_usermode_loop+0x98/0x300 [ 48.640685] exit_to_usermode_loop+0x224/0x300 [ 48.645233] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 48.650740] syscall_return_slowpath+0x3a7/0x450 [ 48.655459] ? prepare_exit_to_usermode+0x220/0x220 [ 48.660441] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 48.665335] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.670315] ? trace_hardirqs_on_thunk+0x1a/0x1c