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-3,10.128.15.192' (ECDSA) to the list of known hosts. 2017/09/05 05:01:08 parsed 1 programs 2017/09/05 05:01:08 executed programs: 0 syzkaller login: [ 41.200700] dev_remove_pack: ffff8801ccacea00 not found [ 41.217204] ================================================================== [ 41.224588] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 41.231313] Read of size 8 at addr ffff8801cc4450a8 by task syz-executor0/3069 [ 41.238648] [ 41.240248] CPU: 0 PID: 3069 Comm: syz-executor0 Not tainted 4.13.0+ #67 [ 41.247055] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.256385] Call Trace: [ 41.258945] dump_stack+0x194/0x257 [ 41.262549] ? arch_local_irq_restore+0x53/0x53 [ 41.267187] ? show_regs_print_info+0x65/0x65 [ 41.271662] ? __dev_remove_pack+0x305/0x3b0 [ 41.276050] print_address_description+0x73/0x250 [ 41.280863] ? __dev_remove_pack+0x305/0x3b0 [ 41.285243] kasan_report+0x24e/0x340 [ 41.289026] __asan_report_load8_noabort+0x14/0x20 [ 41.293930] __dev_remove_pack+0x305/0x3b0 [ 41.298138] ? dev_get_by_name_rcu+0x270/0x270 [ 41.302692] ? refcount_sub_and_test+0x115/0x1b0 [ 41.307430] __unregister_prot_hook+0x211/0x280 [ 41.312077] packet_release+0x8bb/0xd70 [ 41.316028] ? packet_set_ring+0x1b70/0x1b70 [ 41.320408] ? dentry_free+0xcd/0x130 [ 41.324180] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.329170] ? kmem_cache_free+0x249/0x280 [ 41.333381] ? dentry_free+0xd2/0x130 [ 41.337159] ? locks_remove_file+0x414/0x560 [ 41.341538] ? fcntl_setlk+0x10d0/0x10d0 [ 41.345574] ? __fsnotify_parent+0xb4/0x3a0 [ 41.349867] ? fsnotify+0x1af0/0x1af0 [ 41.353646] sock_release+0x8d/0x1e0 [ 41.357329] ? sock_release+0x8d/0x1e0 [ 41.361193] ? sock_release+0x1e0/0x1e0 [ 41.365146] sock_close+0x16/0x20 [ 41.368573] __fput+0x333/0x7f0 [ 41.371828] ? fput+0x140/0x140 [ 41.375082] ? check_same_owner+0x320/0x320 [ 41.379372] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.383846] ____fput+0x15/0x20 [ 41.387105] task_work_run+0x199/0x270 [ 41.390966] ? task_work_cancel+0x210/0x210 [ 41.395260] ? _raw_spin_unlock+0x22/0x30 [ 41.399377] ? switch_task_namespaces+0x87/0xc0 [ 41.404025] do_exit+0xa52/0x1b40 [ 41.407447] ? plist_check_list+0xa0/0xa0 [ 41.411576] ? plist_del+0x47b/0x990 [ 41.415265] ? mm_update_next_owner+0x930/0x930 [ 41.419904] ? plist_add+0x760/0x760 [ 41.423641] ? check_same_owner+0x320/0x320 [ 41.427939] ? find_held_lock+0x39/0x1d0 [ 41.431979] ? check_noncircular+0x20/0x20 [ 41.436184] ? lock_downgrade+0x990/0x990 [ 41.440305] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 41.445678] ? find_held_lock+0x39/0x1d0 [ 41.449736] ? lock_downgrade+0x990/0x990 [ 41.453856] ? recalc_sigpending_tsk+0x117/0x150 [ 41.458591] ? recalc_sigpending+0x103/0x160 [ 41.462970] ? recalc_sigpending_tsk+0x150/0x150 [ 41.467694] ? get_signal+0x397/0x17e0 [ 41.471565] do_group_exit+0x149/0x400 [ 41.475423] ? __lock_is_held+0xbc/0x140 [ 41.479454] ? SyS_exit+0x30/0x30 [ 41.482877] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.487348] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.492339] get_signal+0x7e8/0x17e0 [ 41.496072] ? ptrace_notify+0x130/0x130 [ 41.500102] ? __fget+0xbb/0x580 [ 41.503437] ? __lockdep_init_map+0xe4/0x650 [ 41.507817] ? lock_release+0xd70/0xd70 [ 41.511778] ? exit_robust_list+0x240/0x240 [ 41.516083] do_signal+0x94/0x1ee0 [ 41.519598] ? iterate_fd+0x3f0/0x3f0 [ 41.523375] ? setup_sigcontext+0x7d0/0x7d0 [ 41.527668] ? __lock_is_held+0xbc/0x140 [ 41.531713] ? __fget_light+0x29d/0x390 [ 41.535661] ? selinux_tun_dev_create+0xc0/0xc0 [ 41.540300] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 41.545980] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 41.551225] ? alloc_file+0x284/0x3a0 [ 41.554996] ? exit_to_usermode_loop+0x98/0x300 [ 41.559647] exit_to_usermode_loop+0x224/0x300 [ 41.564205] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 41.569725] syscall_return_slowpath+0x42f/0x500 [ 41.574454] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 41.579443] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 41.584344] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.589335] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.594077] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.598801] RIP: 0033:0x451e59 [ 41.601967] RSP: 002b:00007f9c72c93cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 41.609647] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 41.616885] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 41.624122] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 41.631369] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 41.638610] R13: 00007ffd2a32f42f R14: 00007f9c72c949c0 R15: 0000000000000000 [ 41.645865] [ 41.647462] Allocated by task 3069: [ 41.651084] save_stack_trace+0x16/0x20 [ 41.655029] save_stack+0x43/0xd0 [ 41.658450] kasan_kmalloc+0xad/0xe0 [ 41.662131] kmem_cache_alloc_trace+0x136/0x750 [ 41.666768] fanout_add+0xa50/0x1190 [ 41.670452] packet_setsockopt+0xfdc/0x1e80 [ 41.674742] SyS_setsockopt+0x189/0x360 [ 41.678684] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.683404] [ 41.685003] Freed by task 3069: [ 41.688251] save_stack_trace+0x16/0x20 [ 41.692191] save_stack+0x43/0xd0 [ 41.695632] kasan_slab_free+0x71/0xc0 [ 41.699495] kfree+0xca/0x250 [ 41.702570] packet_release+0xa8f/0xd70 [ 41.706516] sock_release+0x8d/0x1e0 [ 41.710197] sock_close+0x16/0x20 [ 41.713620] __fput+0x333/0x7f0 [ 41.716868] ____fput+0x15/0x20 [ 41.720118] task_work_run+0x199/0x270 [ 41.723973] do_exit+0xa52/0x1b40 [ 41.727392] do_group_exit+0x149/0x400 [ 41.731246] get_signal+0x7e8/0x17e0 [ 41.734928] do_signal+0x94/0x1ee0 [ 41.738437] exit_to_usermode_loop+0x224/0x300 [ 41.742986] syscall_return_slowpath+0x42f/0x500 [ 41.747711] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.752432] [ 41.754028] The buggy address belongs to the object at ffff8801cc444800 [ 41.754028] which belongs to the cache kmalloc-4096 of size 4096 [ 41.766827] The buggy address is located 2216 bytes inside of [ 41.766827] 4096-byte region [ffff8801cc444800, ffff8801cc445800) [ 41.778839] The buggy address belongs to the page: [ 41.783736] page:ffffea0007311100 count:1 mapcount:0 mapping:ffff8801cc444800 index:0x0 compound_mapcount: 0 [ 41.793679] flags: 0x200000000008100(slab|head) [ 41.798325] raw: 0200000000008100 ffff8801cc444800 0000000000000000 0000000100000001 [ 41.806393] raw: ffffea00073214a0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 41.814239] page dumped because: kasan: bad access detected [ 41.819912] [ 41.821511] Memory state around the buggy address: [ 41.826406] ffff8801cc444f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.833732] ffff8801cc445000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.841058] >ffff8801cc445080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.848383] ^ [ 41.853023] ffff8801cc445100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.860360] ffff8801cc445180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.867685] ================================================================== [ 41.875015] Disabling lock debugging due to kernel taint [ 41.880497] Kernel panic - not syncing: panic_on_warn set ... [ 41.880497] [ 41.887830] CPU: 0 PID: 3069 Comm: syz-executor0 Tainted: G B 4.13.0+ #67 [ 41.895846] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.905162] Call Trace: [ 41.907714] dump_stack+0x194/0x257 [ 41.911312] ? arch_local_irq_restore+0x53/0x53 [ 41.915945] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.920686] ? __dev_remove_pack+0x240/0x3b0 [ 41.925061] panic+0x1e4/0x417 [ 41.928218] ? __warn+0x1d9/0x1d9 [ 41.931640] ? __dev_remove_pack+0x305/0x3b0 [ 41.936017] kasan_end_report+0x50/0x50 [ 41.939964] kasan_report+0x137/0x340 [ 41.943732] __asan_report_load8_noabort+0x14/0x20 [ 41.948628] __dev_remove_pack+0x305/0x3b0 [ 41.952827] ? dev_get_by_name_rcu+0x270/0x270 [ 41.957380] ? refcount_sub_and_test+0x115/0x1b0 [ 41.962106] __unregister_prot_hook+0x211/0x280 [ 41.966740] packet_release+0x8bb/0xd70 [ 41.970679] ? packet_set_ring+0x1b70/0x1b70 [ 41.975052] ? dentry_free+0xcd/0x130 [ 41.978817] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.983797] ? kmem_cache_free+0x249/0x280 [ 41.987999] ? dentry_free+0xd2/0x130 [ 41.991767] ? locks_remove_file+0x414/0x560 [ 41.996159] ? fcntl_setlk+0x10d0/0x10d0 [ 42.000189] ? __fsnotify_parent+0xb4/0x3a0 [ 42.004477] ? fsnotify+0x1af0/0x1af0 [ 42.008249] sock_release+0x8d/0x1e0 [ 42.011928] ? sock_release+0x8d/0x1e0 [ 42.015781] ? sock_release+0x1e0/0x1e0 [ 42.019721] sock_close+0x16/0x20 [ 42.023141] __fput+0x333/0x7f0 [ 42.026386] ? fput+0x140/0x140 [ 42.029630] ? check_same_owner+0x320/0x320 [ 42.033913] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.038376] ____fput+0x15/0x20 [ 42.041619] task_work_run+0x199/0x270 [ 42.045472] ? task_work_cancel+0x210/0x210 [ 42.049762] ? _raw_spin_unlock+0x22/0x30 [ 42.053873] ? switch_task_namespaces+0x87/0xc0 [ 42.058510] do_exit+0xa52/0x1b40 [ 42.061924] ? plist_check_list+0xa0/0xa0 [ 42.066043] ? plist_del+0x47b/0x990 [ 42.069720] ? mm_update_next_owner+0x930/0x930 [ 42.074613] ? plist_add+0x760/0x760 [ 42.078297] ? check_same_owner+0x320/0x320 [ 42.082584] ? find_held_lock+0x39/0x1d0 [ 42.086613] ? check_noncircular+0x20/0x20 [ 42.090812] ? lock_downgrade+0x990/0x990 [ 42.094924] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.100263] ? find_held_lock+0x39/0x1d0 [ 42.104294] ? lock_downgrade+0x990/0x990 [ 42.108414] ? recalc_sigpending_tsk+0x117/0x150 [ 42.113134] ? recalc_sigpending+0x103/0x160 [ 42.117505] ? recalc_sigpending_tsk+0x150/0x150 [ 42.122222] ? get_signal+0x397/0x17e0 [ 42.126081] do_group_exit+0x149/0x400 [ 42.129932] ? __lock_is_held+0xbc/0x140 [ 42.133966] ? SyS_exit+0x30/0x30 [ 42.137387] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.141846] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.146834] get_signal+0x7e8/0x17e0 [ 42.150530] ? ptrace_notify+0x130/0x130 [ 42.154556] ? __fget+0xbb/0x580 [ 42.157887] ? __lockdep_init_map+0xe4/0x650 [ 42.162259] ? lock_release+0xd70/0xd70 [ 42.166200] ? exit_robust_list+0x240/0x240 [ 42.170497] do_signal+0x94/0x1ee0 [ 42.174005] ? iterate_fd+0x3f0/0x3f0 [ 42.177783] ? setup_sigcontext+0x7d0/0x7d0 [ 42.182073] ? __lock_is_held+0xbc/0x140 [ 42.186104] ? __fget_light+0x29d/0x390 [ 42.190053] ? selinux_tun_dev_create+0xc0/0xc0 [ 42.194687] ? selinux_netlbl_socket_setsockopt+0x10c/0x460