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-mmots-kasan-gce-9,10.128.0.63' (ECDSA) to the list of known hosts. 2017/09/20 07:54:04 parsed 1 programs 2017/09/20 07:54:04 executed programs: 0 syzkaller login: [ 51.293728] dev_remove_pack: ffff8801ce69dd80 not found [ 51.312326] ================================================================== [ 51.319731] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 51.326469] Read of size 8 at addr ffff8801ce2b3468 by task syz-executor0/3019 [ 51.333810] [ 51.335415] CPU: 0 PID: 3019 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 51.342482] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.351810] Call Trace: [ 51.354376] dump_stack+0x194/0x257 [ 51.357993] ? arch_local_irq_restore+0x53/0x53 [ 51.362648] ? show_regs_print_info+0x65/0x65 [ 51.367140] ? __dev_remove_pack+0x305/0x3b0 [ 51.371524] print_address_description+0x73/0x250 [ 51.376340] ? __dev_remove_pack+0x305/0x3b0 [ 51.380727] kasan_report+0x24e/0x340 [ 51.384504] __asan_report_load8_noabort+0x14/0x20 [ 51.389409] __dev_remove_pack+0x305/0x3b0 [ 51.393622] ? dev_get_by_name_rcu+0x270/0x270 [ 51.398177] ? refcount_sub_and_test+0x115/0x1b0 [ 51.402914] __unregister_prot_hook+0x211/0x280 [ 51.407560] packet_release+0x8bb/0xd70 [ 51.411513] ? packet_set_ring+0x1b70/0x1b70 [ 51.415894] ? dentry_free+0xcd/0x130 [ 51.419667] ? rcu_read_lock_sched_held+0x108/0x120 [ 51.424657] ? kmem_cache_free+0x249/0x280 [ 51.428865] ? dentry_free+0xd2/0x130 [ 51.432645] ? locks_remove_file+0x3fa/0x5a0 [ 51.437030] ? fcntl_setlk+0x10d0/0x10d0 [ 51.441065] ? __fsnotify_parent+0xb4/0x3a0 [ 51.445359] ? fsnotify+0x1af0/0x1af0 [ 51.449137] sock_release+0x8d/0x1e0 [ 51.452821] ? sock_release+0x8d/0x1e0 [ 51.456679] ? sock_release+0x1e0/0x1e0 [ 51.460622] sock_close+0x16/0x20 [ 51.464045] __fput+0x333/0x7f0 [ 51.467302] ? fput+0x140/0x140 [ 51.470554] ? check_same_owner+0x320/0x320 [ 51.474852] ? _raw_spin_unlock_irq+0x27/0x70 [ 51.479326] ____fput+0x15/0x20 [ 51.482575] task_work_run+0x199/0x270 [ 51.486438] ? task_work_cancel+0x210/0x210 [ 51.490732] ? _raw_spin_unlock+0x22/0x30 [ 51.494850] ? switch_task_namespaces+0x87/0xc0 [ 51.499502] do_exit+0xa52/0x1b40 [ 51.502927] ? plist_check_list+0xa0/0xa0 [ 51.507058] ? plist_del+0x47b/0x990 [ 51.510746] ? mm_update_next_owner+0x930/0x930 [ 51.515384] ? plist_add+0x760/0x760 [ 51.519082] ? check_same_owner+0x320/0x320 [ 51.523389] ? find_held_lock+0x39/0x1d0 [ 51.527431] ? check_noncircular+0x20/0x20 [ 51.531637] ? lock_downgrade+0x990/0x990 [ 51.535760] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 51.541113] ? find_held_lock+0x39/0x1d0 [ 51.545158] ? lock_downgrade+0x990/0x990 [ 51.549280] ? recalc_sigpending_tsk+0x117/0x150 [ 51.554011] ? recalc_sigpending+0x103/0x160 [ 51.558396] ? recalc_sigpending_tsk+0x150/0x150 [ 51.563118] ? get_signal+0x397/0x17e0 [ 51.566985] do_group_exit+0x149/0x400 [ 51.570843] ? __lock_is_held+0xbc/0x140 [ 51.574878] ? SyS_exit+0x30/0x30 [ 51.578308] ? _raw_spin_unlock_irq+0x27/0x70 [ 51.582777] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 51.587770] get_signal+0x7e8/0x17e0 [ 51.591854] ? ptrace_notify+0x130/0x130 [ 51.595887] ? __fget+0xbb/0x580 [ 51.599229] ? __lock_is_held+0xbc/0x140 [ 51.603268] ? lock_release+0xd70/0xd70 [ 51.607223] ? exit_robust_list+0x240/0x240 [ 51.611527] do_signal+0x94/0x1ee0 [ 51.615043] ? iterate_fd+0x3f0/0x3f0 [ 51.618821] ? setup_sigcontext+0x7d0/0x7d0 [ 51.623130] ? __fget_light+0x29d/0x390 [ 51.627080] ? selinux_tun_dev_create+0xc0/0xc0 [ 51.631728] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 51.637415] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 51.642664] ? __might_fault+0xe0/0x1d0 [ 51.646607] ? exit_to_usermode_loop+0x98/0x300 [ 51.651254] exit_to_usermode_loop+0x224/0x300 [ 51.655811] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 51.661328] syscall_return_slowpath+0x42f/0x500 [ 51.666055] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 51.671042] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 51.675945] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 51.680933] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 51.685669] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 51.690394] RIP: 0033:0x4520a9 [ 51.693552] RSP: 002b:00007f21c1d62cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 51.701233] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 51.708472] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 51.715711] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 51.722952] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 51.730195] R13: 00007ffce1c3dddf R14: 00007f21c1d639c0 R15: 0000000000000000 [ 51.737452] [ 51.739050] Allocated by task 3019: [ 51.742653] save_stack_trace+0x16/0x20 [ 51.746602] save_stack+0x43/0xd0 [ 51.750027] kasan_kmalloc+0xad/0xe0 [ 51.753713] kmem_cache_alloc_trace+0x136/0x750 [ 51.758355] fanout_add+0xa50/0x1190 [ 51.762037] packet_setsockopt+0xfdc/0x1e80 [ 51.766328] SyS_setsockopt+0x189/0x360 [ 51.770275] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.774999] [ 51.776596] Freed by task 3019: [ 51.779845] save_stack_trace+0x16/0x20 [ 51.783786] save_stack+0x43/0xd0 [ 51.787210] kasan_slab_free+0x71/0xc0 [ 51.791066] kfree+0xca/0x250 [ 51.794146] packet_release+0xa8f/0xd70 [ 51.798094] sock_release+0x8d/0x1e0 [ 51.801776] sock_close+0x16/0x20 [ 51.805211] __fput+0x333/0x7f0 [ 51.808459] ____fput+0x15/0x20 [ 51.811707] task_work_run+0x199/0x270 [ 51.815564] do_exit+0xa52/0x1b40 [ 51.818984] do_group_exit+0x149/0x400 [ 51.822839] get_signal+0x7e8/0x17e0 [ 51.826525] do_signal+0x94/0x1ee0 [ 51.830039] exit_to_usermode_loop+0x224/0x300 [ 51.834594] syscall_return_slowpath+0x42f/0x500 [ 51.839322] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 51.844044] [ 51.845643] The buggy address belongs to the object at ffff8801ce2b2bc0 [ 51.845643] which belongs to the cache kmalloc-4096 of size 4096 [ 51.858440] The buggy address is located 2216 bytes inside of [ 51.858440] 4096-byte region [ffff8801ce2b2bc0, ffff8801ce2b3bc0) [ 51.870454] The buggy address belongs to the page: [ 51.875355] page:ffffea000738ac80 count:1 mapcount:0 mapping:ffff8801ce2b2bc0 index:0x0 compound_mapcount: 0 [ 51.885296] flags: 0x200000000008100(slab|head) [ 51.889935] raw: 0200000000008100 ffff8801ce2b2bc0 0000000000000000 0000000100000001 [ 51.897785] raw: ffffea000738aba0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 51.905631] page dumped because: kasan: bad access detected [ 51.911304] [ 51.912902] Memory state around the buggy address: [ 51.917801] ffff8801ce2b3300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.925128] ffff8801ce2b3380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.932453] >ffff8801ce2b3400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.939788] ^ [ 51.946506] ffff8801ce2b3480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.953834] ffff8801ce2b3500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.961158] ================================================================== [ 51.968482] Disabling lock debugging due to kernel taint [ 51.974323] Kernel panic - not syncing: panic_on_warn set ... [ 51.974323] [ 51.981651] CPU: 0 PID: 3019 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 51.989930] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.999246] Call Trace: [ 52.001801] dump_stack+0x194/0x257 [ 52.005394] ? arch_local_irq_restore+0x53/0x53 [ 52.010027] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 52.014751] ? __dev_remove_pack+0x2f0/0x3b0 [ 52.019126] panic+0x1e4/0x417 [ 52.022285] ? __warn+0x1d9/0x1d9 [ 52.025709] ? __dev_remove_pack+0x305/0x3b0 [ 52.030084] kasan_end_report+0x50/0x50 [ 52.034022] kasan_report+0x137/0x340 [ 52.037789] __asan_report_load8_noabort+0x14/0x20 [ 52.042683] __dev_remove_pack+0x305/0x3b0 [ 52.046883] ? dev_get_by_name_rcu+0x270/0x270 [ 52.051430] ? refcount_sub_and_test+0x115/0x1b0 [ 52.056157] __unregister_prot_hook+0x211/0x280 [ 52.060794] packet_release+0x8bb/0xd70 [ 52.064735] ? packet_set_ring+0x1b70/0x1b70 [ 52.069108] ? dentry_free+0xcd/0x130 [ 52.072873] ? rcu_read_lock_sched_held+0x108/0x120 [ 52.077852] ? kmem_cache_free+0x249/0x280 [ 52.082053] ? dentry_free+0xd2/0x130 [ 52.085825] ? locks_remove_file+0x3fa/0x5a0 [ 52.090198] ? fcntl_setlk+0x10d0/0x10d0 [ 52.094227] ? __fsnotify_parent+0xb4/0x3a0 [ 52.098512] ? fsnotify+0x1af0/0x1af0 [ 52.102279] sock_release+0x8d/0x1e0 [ 52.105958] ? sock_release+0x8d/0x1e0 [ 52.109809] ? sock_release+0x1e0/0x1e0 [ 52.113745] sock_close+0x16/0x20 [ 52.117160] __fput+0x333/0x7f0 [ 52.120407] ? fput+0x140/0x140 [ 52.123656] ? check_same_owner+0x320/0x320 [ 52.127943] ? _raw_spin_unlock_irq+0x27/0x70 [ 52.132408] ____fput+0x15/0x20 [ 52.135656] task_work_run+0x199/0x270 [ 52.139511] ? task_work_cancel+0x210/0x210 [ 52.143800] ? _raw_spin_unlock+0x22/0x30 [ 52.147918] ? switch_task_namespaces+0x87/0xc0 [ 52.152554] do_exit+0xa52/0x1b40 [ 52.155973] ? plist_check_list+0xa0/0xa0 [ 52.160095] ? plist_del+0x47b/0x990 [ 52.163783] ? mm_update_next_owner+0x930/0x930 [ 52.168426] ? plist_add+0x760/0x760 [ 52.172122] ? check_same_owner+0x320/0x320 [ 52.176415] ? find_held_lock+0x39/0x1d0 [ 52.180458] ? check_noncircular+0x20/0x20 [ 52.184664] ? lock_downgrade+0x990/0x990 [ 52.188779] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 52.194117] ? find_held_lock+0x39/0x1d0 [ 52.198149] ? lock_downgrade+0x990/0x990 [ 52.202279] ? recalc_sigpending_tsk+0x117/0x150 [ 52.206999] ? recalc_sigpending+0x103/0x160 [ 52.211371] ? recalc_sigpending_tsk+0x150/0x150 [ 52.216088] ? get_signal+0x397/0x17e0 [ 52.219949] do_group_exit+0x149/0x400 [ 52.223801] ? __lock_is_held+0xbc/0x140 [ 52.227826] ? SyS_exit+0x30/0x30 [ 52.231243] ? _raw_spin_unlock_irq+0x27/0x70 [ 52.235703] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 52.240683] get_signal+0x7e8/0x17e0 [ 52.244375] ? ptrace_notify+0x130/0x130 [ 52.248404] ? __fget+0xbb/0x580 [ 52.251736] ? __lock_is_held+0xbc/0x140 [ 52.255764] ? lock_release+0xd70/0xd70 [ 52.259704] ? exit_robust_list+0x240/0x240 [ 52.264009] do_signal+0x94/0x1ee0 [ 52.267515] ? iterate_fd+0x3f0/0x3f0 [ 52.271281] ? setup_sigcontext+0x7d0/0x7d0 [ 52.275576] ? __fget_light+0x29d/0x390 [ 52.279515] ? selinux_tun_dev_create+0xc0/0xc0 [ 52.284147] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 52.289822] ? selinux_netlbl_sock_rcv_skb+0x730/0x730