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-0,10.128.15.221' (ECDSA) to the list of known hosts. 2017/09/10 06:48:30 parsed 1 programs 2017/09/10 06:48:30 executed programs: 0 syzkaller login: [ 32.279878] dev_remove_pack: ffff8801d0d3f580 not found [ 32.300371] ================================================================== [ 32.307784] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 32.314513] Read of size 8 at addr ffff8801ce0b8c68 by task syz-executor2/3035 [ 32.321852] [ 32.323458] CPU: 0 PID: 3035 Comm: syz-executor2 Not tainted 4.13.0+ #76 [ 32.330267] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.339679] Call Trace: [ 32.342241] dump_stack+0x194/0x257 [ 32.345843] ? arch_local_irq_restore+0x53/0x53 [ 32.350495] ? show_regs_print_info+0x65/0x65 [ 32.354970] ? __dev_remove_pack+0x305/0x3b0 [ 32.359357] print_address_description+0x73/0x250 [ 32.364171] ? __dev_remove_pack+0x305/0x3b0 [ 32.368555] kasan_report+0x24e/0x340 [ 32.372333] __asan_report_load8_noabort+0x14/0x20 [ 32.377237] __dev_remove_pack+0x305/0x3b0 [ 32.381449] ? dev_get_by_name_rcu+0x270/0x270 [ 32.386016] ? refcount_sub_and_test+0x115/0x1b0 [ 32.390756] __unregister_prot_hook+0x211/0x280 [ 32.395408] packet_release+0x8bb/0xd70 [ 32.399363] ? packet_set_ring+0x1b70/0x1b70 [ 32.403748] ? dentry_free+0xcd/0x130 [ 32.407521] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.412511] ? kmem_cache_free+0x249/0x280 [ 32.416720] ? dentry_free+0xd2/0x130 [ 32.420501] ? locks_remove_file+0x3fa/0x5a0 [ 32.424901] ? fcntl_setlk+0x10d0/0x10d0 [ 32.428941] ? __fsnotify_parent+0xb4/0x3a0 [ 32.433239] ? fsnotify+0x1af0/0x1af0 [ 32.437019] sock_release+0x8d/0x1e0 [ 32.440708] ? sock_release+0x8d/0x1e0 [ 32.444579] ? sock_release+0x1e0/0x1e0 [ 32.448534] sock_close+0x16/0x20 [ 32.451964] __fput+0x333/0x7f0 [ 32.455223] ? fput+0x140/0x140 [ 32.458479] ? check_same_owner+0x320/0x320 [ 32.462773] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.467248] ____fput+0x15/0x20 [ 32.470500] task_work_run+0x199/0x270 [ 32.474363] ? task_work_cancel+0x210/0x210 [ 32.478660] ? _raw_spin_unlock+0x22/0x30 [ 32.482780] ? switch_task_namespaces+0x87/0xc0 [ 32.487427] do_exit+0xa52/0x1b40 [ 32.490854] ? plist_check_list+0xa0/0xa0 [ 32.494988] ? plist_del+0x47b/0x990 [ 32.498678] ? mm_update_next_owner+0x930/0x930 [ 32.503324] ? plist_add+0x760/0x760 [ 32.507025] ? check_same_owner+0x320/0x320 [ 32.511329] ? find_held_lock+0x39/0x1d0 [ 32.515375] ? check_noncircular+0x20/0x20 [ 32.519583] ? lock_downgrade+0x990/0x990 [ 32.523714] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.529072] ? find_held_lock+0x39/0x1d0 [ 32.533117] ? lock_downgrade+0x990/0x990 [ 32.537239] ? recalc_sigpending_tsk+0x117/0x150 [ 32.541972] ? recalc_sigpending+0x103/0x160 [ 32.546353] ? recalc_sigpending_tsk+0x150/0x150 [ 32.551088] ? get_signal+0x397/0x17e0 [ 32.554960] do_group_exit+0x149/0x400 [ 32.558821] ? __lock_is_held+0xbc/0x140 [ 32.562852] ? SyS_exit+0x30/0x30 [ 32.566278] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.570746] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.575896] get_signal+0x7e8/0x17e0 [ 32.579609] ? ptrace_notify+0x130/0x130 [ 32.583649] ? __schedule+0x8f0/0x2070 [ 32.587507] ? lock_release+0xd70/0xd70 [ 32.591460] ? exit_robust_list+0x240/0x240 [ 32.595765] do_signal+0x94/0x1ee0 [ 32.599285] ? iterate_fd+0x3f0/0x3f0 [ 32.603064] ? setup_sigcontext+0x7d0/0x7d0 [ 32.607367] ? schedule+0x108/0x440 [ 32.610966] ? mntput_no_expire+0x15e/0xa90 [ 32.615257] ? check_same_owner+0x320/0x320 [ 32.619551] ? __schedule+0x2070/0x2070 [ 32.623499] ? __fget_light+0x29d/0x390 [ 32.627448] ? selinux_tun_dev_create+0xc0/0xc0 [ 32.632097] ? putname+0xee/0x130 [ 32.635523] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 32.641207] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 32.646458] ? exit_to_usermode_loop+0x98/0x300 [ 32.651106] exit_to_usermode_loop+0x224/0x300 [ 32.655664] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 32.661185] syscall_return_slowpath+0x42f/0x500 [ 32.665914] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 32.670904] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 32.675809] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.680801] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.685549] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.690275] RIP: 0033:0x451e59 [ 32.693446] RSP: 002b:00007f9e6e66ccf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 32.701133] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 32.708379] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 32.715629] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 32.722885] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 32.730130] R13: 00007ffdd4bfce1f R14: 00007f9e6e66d9c0 R15: 0000000000000000 [ 32.737390] [ 32.738991] Allocated by task 3035: [ 32.742593] save_stack_trace+0x16/0x20 [ 32.746542] save_stack+0x43/0xd0 [ 32.749971] kasan_kmalloc+0xad/0xe0 [ 32.753657] kmem_cache_alloc_trace+0x136/0x750 [ 32.758299] fanout_add+0xa50/0x1190 [ 32.761986] packet_setsockopt+0xfdc/0x1e80 [ 32.766281] SyS_setsockopt+0x189/0x360 [ 32.770237] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.774961] [ 32.776587] Freed by task 3035: [ 32.779840] save_stack_trace+0x16/0x20 [ 32.783787] save_stack+0x43/0xd0 [ 32.787215] kasan_slab_free+0x71/0xc0 [ 32.791073] kfree+0xca/0x250 [ 32.794149] packet_release+0xa8f/0xd70 [ 32.798094] sock_release+0x8d/0x1e0 [ 32.801779] sock_close+0x16/0x20 [ 32.805204] __fput+0x333/0x7f0 [ 32.808455] ____fput+0x15/0x20 [ 32.811706] task_work_run+0x199/0x270 [ 32.815563] do_exit+0xa52/0x1b40 [ 32.818991] do_group_exit+0x149/0x400 [ 32.822850] get_signal+0x7e8/0x17e0 [ 32.826535] do_signal+0x94/0x1ee0 [ 32.830048] exit_to_usermode_loop+0x224/0x300 [ 32.834604] syscall_return_slowpath+0x42f/0x500 [ 32.839333] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.844056] [ 32.845657] The buggy address belongs to the object at ffff8801ce0b83c0 [ 32.845657] which belongs to the cache kmalloc-4096 of size 4096 [ 32.858461] The buggy address is located 2216 bytes inside of [ 32.858461] 4096-byte region [ffff8801ce0b83c0, ffff8801ce0b93c0) [ 32.870480] The buggy address belongs to the page: [ 32.875385] page:ffffea0007382e00 count:1 mapcount:0 mapping:ffff8801ce0b83c0 index:0x0 compound_mapcount: 0 [ 32.885332] flags: 0x200000000008100(slab|head) [ 32.889977] raw: 0200000000008100 ffff8801ce0b83c0 0000000000000000 0000000100000001 [ 32.898093] raw: ffffea00073835a0 ffffea0007389fa0 ffff8801dac00dc0 0000000000000000 [ 32.905945] page dumped because: kasan: bad access detected [ 32.911628] [ 32.913240] Memory state around the buggy address: [ 32.919211] ffff8801ce0b8b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.926546] ffff8801ce0b8b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.933886] >ffff8801ce0b8c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.941235] ^ [ 32.948076] ffff8801ce0b8c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.955410] ffff8801ce0b8d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.962741] ================================================================== [ 32.970074] Disabling lock debugging due to kernel taint [ 32.975586] Kernel panic - not syncing: panic_on_warn set ... [ 32.975586] [ 32.982918] CPU: 0 PID: 3035 Comm: syz-executor2 Tainted: G B 4.13.0+ #76 [ 32.990938] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.000265] Call Trace: [ 33.003012] dump_stack+0x194/0x257 [ 33.006615] ? arch_local_irq_restore+0x53/0x53 [ 33.011267] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.015995] ? __dev_remove_pack+0x2f0/0x3b0 [ 33.020378] panic+0x1e4/0x417 [ 33.023537] ? __warn+0x1d9/0x1d9 [ 33.026972] ? __dev_remove_pack+0x305/0x3b0 [ 33.031349] kasan_end_report+0x50/0x50 [ 33.035287] kasan_report+0x137/0x340 [ 33.039055] __asan_report_load8_noabort+0x14/0x20 [ 33.043962] __dev_remove_pack+0x305/0x3b0 [ 33.048163] ? dev_get_by_name_rcu+0x270/0x270 [ 33.052714] ? refcount_sub_and_test+0x115/0x1b0 [ 33.057441] __unregister_prot_hook+0x211/0x280 [ 33.062093] packet_release+0x8bb/0xd70 [ 33.066038] ? packet_set_ring+0x1b70/0x1b70 [ 33.070413] ? dentry_free+0xcd/0x130 [ 33.074182] ? rcu_read_lock_sched_held+0x108/0x120 [ 33.079165] ? kmem_cache_free+0x249/0x280 [ 33.083368] ? dentry_free+0xd2/0x130 [ 33.087139] ? locks_remove_file+0x3fa/0x5a0 [ 33.091517] ? fcntl_setlk+0x10d0/0x10d0 [ 33.095546] ? __fsnotify_parent+0xb4/0x3a0 [ 33.099834] ? fsnotify+0x1af0/0x1af0 [ 33.103605] sock_release+0x8d/0x1e0 [ 33.107285] ? sock_release+0x8d/0x1e0 [ 33.111314] ? sock_release+0x1e0/0x1e0 [ 33.115253] sock_close+0x16/0x20 [ 33.118673] __fput+0x333/0x7f0 [ 33.121922] ? fput+0x140/0x140 [ 33.125178] ? check_same_owner+0x320/0x320 [ 33.129466] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.133930] ____fput+0x15/0x20 [ 33.137176] task_work_run+0x199/0x270 [ 33.141032] ? task_work_cancel+0x210/0x210 [ 33.145322] ? _raw_spin_unlock+0x22/0x30 [ 33.149437] ? switch_task_namespaces+0x87/0xc0 [ 33.154073] do_exit+0xa52/0x1b40 [ 33.157494] ? plist_check_list+0xa0/0xa0 [ 33.161615] ? plist_del+0x47b/0x990 [ 33.165294] ? mm_update_next_owner+0x930/0x930 [ 33.169931] ? plist_add+0x760/0x760 [ 33.173623] ? check_same_owner+0x320/0x320 [ 33.178003] ? find_held_lock+0x39/0x1d0 [ 33.182049] ? check_noncircular+0x20/0x20 [ 33.186261] ? lock_downgrade+0x990/0x990 [ 33.190377] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.195716] ? find_held_lock+0x39/0x1d0 [ 33.199749] ? lock_downgrade+0x990/0x990 [ 33.203864] ? recalc_sigpending_tsk+0x117/0x150 [ 33.208591] ? recalc_sigpending+0x103/0x160 [ 33.212968] ? recalc_sigpending_tsk+0x150/0x150 [ 33.217689] ? get_signal+0x397/0x17e0 [ 33.221547] do_group_exit+0x149/0x400 [ 33.225401] ? __lock_is_held+0xbc/0x140 [ 33.229437] ? SyS_exit+0x30/0x30 [ 33.232857] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.237320] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.242305] get_signal+0x7e8/0x17e0 [ 33.245997] ? ptrace_notify+0x130/0x130 [ 33.250031] ? __schedule+0x8f0/0x2070 [ 33.253884] ? lock_release+0xd70/0xd70 [ 33.257828] ? exit_robust_list+0x240/0x240 [ 33.262125] do_signal+0x94/0x1ee0 [ 33.265634] ? iterate_fd+0x3f0/0x3f0 [ 33.269404] ? setup_sigcontext+0x7d0/0x7d0 [ 33.273697] ? schedule+0x108/0x440 [ 33.277290] ? mntput_no_expire+0x15e/0xa90