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-6,10.128.0.47' (ECDSA) to the list of known hosts. 2017/09/05 12:02:40 parsed 1 programs 2017/09/05 12:02:40 executed programs: 0 syzkaller login: [ 41.478717] dev_remove_pack: ffff8801ccfdbd00 not found [ 41.498437] ================================================================== [ 41.505831] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 41.512555] Read of size 8 at addr ffff8801cc6de8e8 by task syz-executor0/3088 [ 41.519880] [ 41.521481] CPU: 0 PID: 3088 Comm: syz-executor0 Not tainted 4.13.0+ #68 [ 41.528291] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.537620] Call Trace: [ 41.540196] dump_stack+0x194/0x257 [ 41.543801] ? arch_local_irq_restore+0x53/0x53 [ 41.548444] ? show_regs_print_info+0x65/0x65 [ 41.552921] ? __dev_remove_pack+0x305/0x3b0 [ 41.557306] print_address_description+0x73/0x250 [ 41.562120] ? __dev_remove_pack+0x305/0x3b0 [ 41.566512] kasan_report+0x24e/0x340 [ 41.570287] __asan_report_load8_noabort+0x14/0x20 [ 41.575189] __dev_remove_pack+0x305/0x3b0 [ 41.579396] ? dev_get_by_name_rcu+0x270/0x270 [ 41.583951] ? refcount_sub_and_test+0x115/0x1b0 [ 41.588689] __unregister_prot_hook+0x211/0x280 [ 41.593336] packet_release+0x8bb/0xd70 [ 41.597289] ? packet_set_ring+0x1b70/0x1b70 [ 41.601680] ? dentry_free+0xcd/0x130 [ 41.605453] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.610441] ? kmem_cache_free+0x249/0x280 [ 41.614652] ? dentry_free+0xd2/0x130 [ 41.618431] ? locks_remove_file+0x414/0x560 [ 41.622813] ? fcntl_setlk+0x10d0/0x10d0 [ 41.626849] ? __fsnotify_parent+0xb4/0x3a0 [ 41.631145] ? fsnotify+0x1af0/0x1af0 [ 41.634930] sock_release+0x8d/0x1e0 [ 41.638615] ? sock_release+0x8d/0x1e0 [ 41.642475] ? sock_release+0x1e0/0x1e0 [ 41.646418] sock_close+0x16/0x20 [ 41.649859] __fput+0x333/0x7f0 [ 41.653122] ? fput+0x140/0x140 [ 41.656377] ? check_same_owner+0x320/0x320 [ 41.660675] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.665150] ____fput+0x15/0x20 [ 41.668406] task_work_run+0x199/0x270 [ 41.672273] ? task_work_cancel+0x210/0x210 [ 41.676575] ? _raw_spin_unlock+0x22/0x30 [ 41.680703] ? switch_task_namespaces+0x87/0xc0 [ 41.685352] do_exit+0xa52/0x1b40 [ 41.688777] ? plist_check_list+0xa0/0xa0 [ 41.692908] ? plist_del+0x47b/0x990 [ 41.696597] ? mm_update_next_owner+0x930/0x930 [ 41.701242] ? plist_add+0x760/0x760 [ 41.704945] ? check_same_owner+0x320/0x320 [ 41.709246] ? find_held_lock+0x39/0x1d0 [ 41.713286] ? check_noncircular+0x20/0x20 [ 41.717491] ? lock_downgrade+0x990/0x990 [ 41.721611] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 41.726964] ? find_held_lock+0x39/0x1d0 [ 41.731008] ? lock_downgrade+0x990/0x990 [ 41.735128] ? recalc_sigpending_tsk+0x117/0x150 [ 41.739858] ? recalc_sigpending+0x103/0x160 [ 41.744239] ? recalc_sigpending_tsk+0x150/0x150 [ 41.748961] ? get_signal+0x397/0x17e0 [ 41.752833] do_group_exit+0x149/0x400 [ 41.756696] ? __lock_is_held+0xbc/0x140 [ 41.760728] ? SyS_exit+0x30/0x30 [ 41.764155] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.768626] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.773618] get_signal+0x7e8/0x17e0 [ 41.777331] ? ptrace_notify+0x130/0x130 [ 41.781361] ? __fget+0xbb/0x580 [ 41.784699] ? lock_downgrade+0x990/0x990 [ 41.788820] ? lock_release+0xd70/0xd70 [ 41.792771] ? exit_robust_list+0x240/0x240 [ 41.797077] do_signal+0x94/0x1ee0 [ 41.800594] ? iterate_fd+0x3f0/0x3f0 [ 41.804368] ? setup_sigcontext+0x7d0/0x7d0 [ 41.808672] ? do_page_fault+0xee/0x720 [ 41.812619] ? __do_page_fault+0xb60/0xb60 [ 41.816827] ? __fget_light+0x29d/0x390 [ 41.820775] ? selinux_tun_dev_create+0xc0/0xc0 [ 41.825418] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 41.831100] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 41.836350] ? exit_to_usermode_loop+0x98/0x300 [ 41.840995] exit_to_usermode_loop+0x224/0x300 [ 41.845554] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 41.851071] syscall_return_slowpath+0x42f/0x500 [ 41.855803] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 41.860793] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 41.865700] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.870689] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.875424] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.880159] RIP: 0033:0x451e59 [ 41.883332] RSP: 002b:00007f73635a1cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 41.891016] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 41.898260] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 41.905501] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 41.912742] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 41.919983] R13: 00007ffee0e7e37f R14: 00007f73635a29c0 R15: 0000000000000000 [ 41.927245] [ 41.928846] Allocated by task 3088: [ 41.932448] save_stack_trace+0x16/0x20 [ 41.936394] save_stack+0x43/0xd0 [ 41.939827] kasan_kmalloc+0xad/0xe0 [ 41.943510] kmem_cache_alloc_trace+0x136/0x750 [ 41.948159] fanout_add+0xa50/0x1190 [ 41.951853] packet_setsockopt+0xfdc/0x1e80 [ 41.956146] SyS_setsockopt+0x189/0x360 [ 41.960100] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.964824] [ 41.966420] Freed by task 3088: [ 41.969670] save_stack_trace+0x16/0x20 [ 41.973612] save_stack+0x43/0xd0 [ 41.977033] kasan_slab_free+0x71/0xc0 [ 41.980890] kfree+0xca/0x250 [ 41.983965] packet_release+0xa8f/0xd70 [ 41.987911] sock_release+0x8d/0x1e0 [ 41.991593] sock_close+0x16/0x20 [ 41.995017] __fput+0x333/0x7f0 [ 41.998266] ____fput+0x15/0x20 [ 42.001516] task_work_run+0x199/0x270 [ 42.005373] do_exit+0xa52/0x1b40 [ 42.008796] do_group_exit+0x149/0x400 [ 42.012656] get_signal+0x7e8/0x17e0 [ 42.016340] do_signal+0x94/0x1ee0 [ 42.019860] exit_to_usermode_loop+0x224/0x300 [ 42.024412] syscall_return_slowpath+0x42f/0x500 [ 42.029137] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.033862] [ 42.035464] The buggy address belongs to the object at ffff8801cc6de040 [ 42.035464] which belongs to the cache kmalloc-4096 of size 4096 [ 42.048264] The buggy address is located 2216 bytes inside of [ 42.048264] 4096-byte region [ffff8801cc6de040, ffff8801cc6df040) [ 42.060280] The buggy address belongs to the page: [ 42.065179] page:ffffea000731b780 count:1 mapcount:0 mapping:ffff8801cc6de040 index:0x0 compound_mapcount: 0 [ 42.075124] flags: 0x200000000008100(slab|head) [ 42.079764] raw: 0200000000008100 ffff8801cc6de040 0000000000000000 0000000100000001 [ 42.087615] raw: ffffea000731eca0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 42.095462] page dumped because: kasan: bad access detected [ 42.101139] [ 42.102737] Memory state around the buggy address: [ 42.107634] ffff8801cc6de780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.114965] ffff8801cc6de800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.122292] >ffff8801cc6de880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.129619] ^ [ 42.136343] ffff8801cc6de900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.143670] ffff8801cc6de980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.150996] ================================================================== [ 42.158322] Disabling lock debugging due to kernel taint [ 42.163835] Kernel panic - not syncing: panic_on_warn set ... [ 42.163835] [ 42.171168] CPU: 0 PID: 3088 Comm: syz-executor0 Tainted: G B 4.13.0+ #68 [ 42.179189] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.188513] Call Trace: [ 42.191077] dump_stack+0x194/0x257 [ 42.194674] ? arch_local_irq_restore+0x53/0x53 [ 42.199319] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.204044] ? __dev_remove_pack+0x240/0x3b0 [ 42.208428] panic+0x1e4/0x417 [ 42.211584] ? __warn+0x1d9/0x1d9 [ 42.215007] ? __dev_remove_pack+0x305/0x3b0 [ 42.219384] kasan_end_report+0x50/0x50 [ 42.223323] kasan_report+0x137/0x340 [ 42.227103] __asan_report_load8_noabort+0x14/0x20 [ 42.232011] __dev_remove_pack+0x305/0x3b0 [ 42.236223] ? dev_get_by_name_rcu+0x270/0x270 [ 42.240785] ? refcount_sub_and_test+0x115/0x1b0 [ 42.245524] __unregister_prot_hook+0x211/0x280 [ 42.250167] packet_release+0x8bb/0xd70 [ 42.254113] ? packet_set_ring+0x1b70/0x1b70 [ 42.258490] ? dentry_free+0xcd/0x130 [ 42.262259] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.267242] ? kmem_cache_free+0x249/0x280 [ 42.271444] ? dentry_free+0xd2/0x130 [ 42.275745] ? locks_remove_file+0x414/0x560 [ 42.280121] ? fcntl_setlk+0x10d0/0x10d0 [ 42.284149] ? __fsnotify_parent+0xb4/0x3a0 [ 42.288446] ? fsnotify+0x1af0/0x1af0 [ 42.292219] sock_release+0x8d/0x1e0 [ 42.295898] ? sock_release+0x8d/0x1e0 [ 42.299751] ? sock_release+0x1e0/0x1e0 [ 42.303691] sock_close+0x16/0x20 [ 42.307110] __fput+0x333/0x7f0 [ 42.310359] ? fput+0x140/0x140 [ 42.313609] ? check_same_owner+0x320/0x320 [ 42.317910] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.322382] ____fput+0x15/0x20 [ 42.325628] task_work_run+0x199/0x270 [ 42.329493] ? task_work_cancel+0x210/0x210 [ 42.333779] ? _raw_spin_unlock+0x22/0x30 [ 42.337895] ? switch_task_namespaces+0x87/0xc0 [ 42.342539] do_exit+0xa52/0x1b40 [ 42.345962] ? plist_check_list+0xa0/0xa0 [ 42.350080] ? plist_del+0x47b/0x990 [ 42.353759] ? mm_update_next_owner+0x930/0x930 [ 42.358394] ? plist_add+0x760/0x760 [ 42.362080] ? check_same_owner+0x320/0x320 [ 42.366372] ? find_held_lock+0x39/0x1d0 [ 42.370413] ? check_noncircular+0x20/0x20 [ 42.374612] ? lock_downgrade+0x990/0x990 [ 42.378733] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.384086] ? find_held_lock+0x39/0x1d0 [ 42.388118] ? lock_downgrade+0x990/0x990 [ 42.392236] ? recalc_sigpending_tsk+0x117/0x150 [ 42.396958] ? recalc_sigpending+0x103/0x160 [ 42.401330] ? recalc_sigpending_tsk+0x150/0x150 [ 42.406049] ? get_signal+0x397/0x17e0 [ 42.409905] do_group_exit+0x149/0x400 [ 42.413755] ? __lock_is_held+0xbc/0x140 [ 42.417779] ? SyS_exit+0x30/0x30 [ 42.421197] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.425659] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.430652] get_signal+0x7e8/0x17e0 [ 42.434344] ? ptrace_notify+0x130/0x130 [ 42.438388] ? __fget+0xbb/0x580 [ 42.441720] ? lock_downgrade+0x990/0x990 [ 42.445835] ? lock_release+0xd70/0xd70 [ 42.449777] ? exit_robust_list+0x240/0x240 [ 42.454073] do_signal+0x94/0x1ee0 [ 42.457579] ? iterate_fd+0x3f0/0x3f0 [ 42.461347] ? setup_sigcontext+0x7d0/0x7d0 [ 42.465642] ? do_page_fault+0xee/0x720 [ 42.469582] ? __do_page_fault+0xb60/0xb60 [ 42.473790] ? __fget_light+0x29d/0x390 [ 42.477735] ? selinux_tun_dev_create+0xc0/0xc0