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-8,10.128.15.192' (ECDSA) to the list of known hosts. 2017/09/10 03:18:42 parsed 1 programs 2017/09/10 03:18:42 executed programs: 0 syzkaller login: [ 33.532980] dev_remove_pack: ffff8801ccc78e00 not found [ 33.548373] ================================================================== [ 33.555776] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 33.562499] Read of size 8 at addr ffff8801ccca71e8 by task syz-executor0/3091 [ 33.569825] [ 33.571426] CPU: 1 PID: 3091 Comm: syz-executor0 Not tainted 4.13.0+ #76 [ 33.578234] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.587557] Call Trace: [ 33.590118] dump_stack+0x194/0x257 [ 33.593720] ? arch_local_irq_restore+0x53/0x53 [ 33.598363] ? show_regs_print_info+0x65/0x65 [ 33.602836] ? __dev_remove_pack+0x305/0x3b0 [ 33.607226] print_address_description+0x73/0x250 [ 33.612040] ? __dev_remove_pack+0x305/0x3b0 [ 33.616421] kasan_report+0x24e/0x340 [ 33.620196] __asan_report_load8_noabort+0x14/0x20 [ 33.625095] __dev_remove_pack+0x305/0x3b0 [ 33.629302] ? dev_get_by_name_rcu+0x270/0x270 [ 33.633857] ? refcount_sub_and_test+0x115/0x1b0 [ 33.638594] __unregister_prot_hook+0x211/0x280 [ 33.643239] packet_release+0x8bb/0xd70 [ 33.647193] ? packet_set_ring+0x1b70/0x1b70 [ 33.651575] ? dentry_free+0xcd/0x130 [ 33.655351] ? rcu_read_lock_sched_held+0x108/0x120 [ 33.660340] ? kmem_cache_free+0x249/0x280 [ 33.664547] ? dentry_free+0xd2/0x130 [ 33.668325] ? locks_remove_file+0x3fa/0x5a0 [ 33.672707] ? fcntl_setlk+0x10d0/0x10d0 [ 33.676742] ? __fsnotify_parent+0xb4/0x3a0 [ 33.681036] ? fsnotify+0x1af0/0x1af0 [ 33.684815] sock_release+0x8d/0x1e0 [ 33.688499] ? sock_release+0x8d/0x1e0 [ 33.692358] ? sock_release+0x1e0/0x1e0 [ 33.696305] sock_close+0x16/0x20 [ 33.699732] __fput+0x333/0x7f0 [ 33.702994] ? fput+0x140/0x140 [ 33.706251] ? check_same_owner+0x320/0x320 [ 33.710547] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.715025] ____fput+0x15/0x20 [ 33.718279] task_work_run+0x199/0x270 [ 33.722141] ? task_work_cancel+0x210/0x210 [ 33.726435] ? _raw_spin_unlock+0x22/0x30 [ 33.730555] ? switch_task_namespaces+0x87/0xc0 [ 33.735199] do_exit+0xa52/0x1b40 [ 33.738622] ? plist_check_list+0xa0/0xa0 [ 33.742751] ? plist_del+0x47b/0x990 [ 33.746436] ? mm_update_next_owner+0x930/0x930 [ 33.751076] ? plist_add+0x760/0x760 [ 33.754772] ? check_same_owner+0x320/0x320 [ 33.759071] ? find_held_lock+0x39/0x1d0 [ 33.763111] ? check_noncircular+0x20/0x20 [ 33.767316] ? lock_downgrade+0x990/0x990 [ 33.771440] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.776793] ? find_held_lock+0x39/0x1d0 [ 33.780837] ? lock_downgrade+0x990/0x990 [ 33.784957] ? recalc_sigpending_tsk+0x117/0x150 [ 33.789687] ? recalc_sigpending+0x103/0x160 [ 33.794066] ? recalc_sigpending_tsk+0x150/0x150 [ 33.798790] ? get_signal+0x397/0x17e0 [ 33.802658] do_group_exit+0x149/0x400 [ 33.806516] ? __lock_is_held+0xbc/0x140 [ 33.810547] ? SyS_exit+0x30/0x30 [ 33.813970] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.818439] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.823434] get_signal+0x7e8/0x17e0 [ 33.827148] ? ptrace_notify+0x130/0x130 [ 33.831182] ? trace_hardirqs_on+0xd/0x10 [ 33.835300] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.839765] ? __schedule+0x13cd/0x2070 [ 33.843709] ? lock_release+0xd70/0xd70 [ 33.847664] ? exit_robust_list+0x240/0x240 [ 33.851972] do_signal+0x94/0x1ee0 [ 33.855494] ? iterate_fd+0x3f0/0x3f0 [ 33.859270] ? setup_sigcontext+0x7d0/0x7d0 [ 33.863571] ? schedule+0x108/0x440 [ 33.867172] ? __schedule+0x2070/0x2070 [ 33.871119] ? __fget_light+0x29d/0x390 [ 33.875069] ? selinux_tun_dev_create+0xc0/0xc0 [ 33.879714] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 33.885398] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 33.890650] ? exit_to_usermode_loop+0x98/0x300 [ 33.895299] exit_to_usermode_loop+0x224/0x300 [ 33.899869] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 33.905392] syscall_return_slowpath+0x42f/0x500 [ 33.910122] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 33.915112] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 33.920015] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.925014] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.929755] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 33.934481] RIP: 0033:0x451e59 [ 33.937641] RSP: 002b:00007fb973434cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 33.945326] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 33.952568] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 33.959811] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 33.967054] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 33.974296] R13: 00007ffee00a61cf R14: 00007fb9734359c0 R15: 0000000000000000 [ 33.981559] [ 33.983157] Allocated by task 3091: [ 33.986755] save_stack_trace+0x16/0x20 [ 33.990699] save_stack+0x43/0xd0 [ 33.994122] kasan_kmalloc+0xad/0xe0 [ 33.997804] kmem_cache_alloc_trace+0x136/0x750 [ 34.002446] fanout_add+0xa50/0x1190 [ 34.006128] packet_setsockopt+0xfdc/0x1e80 [ 34.010418] SyS_setsockopt+0x189/0x360 [ 34.014362] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.019086] [ 34.020684] Freed by task 3091: [ 34.023932] save_stack_trace+0x16/0x20 [ 34.027880] save_stack+0x43/0xd0 [ 34.031303] kasan_slab_free+0x71/0xc0 [ 34.035164] kfree+0xca/0x250 [ 34.038241] packet_release+0xa8f/0xd70 [ 34.042183] sock_release+0x8d/0x1e0 [ 34.045865] sock_close+0x16/0x20 [ 34.049289] __fput+0x333/0x7f0 [ 34.052540] ____fput+0x15/0x20 [ 34.055790] task_work_run+0x199/0x270 [ 34.059649] do_exit+0xa52/0x1b40 [ 34.063070] do_group_exit+0x149/0x400 [ 34.066927] get_signal+0x7e8/0x17e0 [ 34.070610] do_signal+0x94/0x1ee0 [ 34.074120] exit_to_usermode_loop+0x224/0x300 [ 34.078671] syscall_return_slowpath+0x42f/0x500 [ 34.083399] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 34.088122] [ 34.089722] The buggy address belongs to the object at ffff8801ccca6940 [ 34.089722] which belongs to the cache kmalloc-4096 of size 4096 [ 34.102521] The buggy address is located 2216 bytes inside of [ 34.102521] 4096-byte region [ffff8801ccca6940, ffff8801ccca7940) [ 34.114539] The buggy address belongs to the page: [ 34.119439] page:ffffea0007332980 count:1 mapcount:0 mapping:ffff8801ccca6940 index:0x0 compound_mapcount: 0 [ 34.129386] flags: 0x200000000008100(slab|head) [ 34.134026] raw: 0200000000008100 ffff8801ccca6940 0000000000000000 0000000100000001 [ 34.141889] raw: ffffea0007332ca0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 34.149737] page dumped because: kasan: bad access detected [ 34.155426] [ 34.157023] Memory state around the buggy address: [ 34.161921] ffff8801ccca7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.169248] ffff8801ccca7100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.177107] >ffff8801ccca7180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.184436] ^ [ 34.191170] ffff8801ccca7200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.198498] ffff8801ccca7280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.205826] ================================================================== [ 34.213158] Disabling lock debugging due to kernel taint [ 34.218650] Kernel panic - not syncing: panic_on_warn set ... [ 34.218650] [ 34.225983] CPU: 1 PID: 3091 Comm: syz-executor0 Tainted: G B 4.13.0+ #76 [ 34.233999] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.243321] Call Trace: [ 34.245877] dump_stack+0x194/0x257 [ 34.249471] ? arch_local_irq_restore+0x53/0x53 [ 34.254106] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 34.258829] ? __dev_remove_pack+0x2f0/0x3b0 [ 34.263205] panic+0x1e4/0x417 [ 34.266364] ? __warn+0x1d9/0x1d9 [ 34.269789] ? __dev_remove_pack+0x305/0x3b0 [ 34.274162] kasan_end_report+0x50/0x50 [ 34.278100] kasan_report+0x137/0x340 [ 34.281865] __asan_report_load8_noabort+0x14/0x20 [ 34.286758] __dev_remove_pack+0x305/0x3b0 [ 34.290957] ? dev_get_by_name_rcu+0x270/0x270 [ 34.295506] ? refcount_sub_and_test+0x115/0x1b0 [ 34.300231] __unregister_prot_hook+0x211/0x280 [ 34.304868] packet_release+0x8bb/0xd70 [ 34.308823] ? packet_set_ring+0x1b70/0x1b70 [ 34.313198] ? dentry_free+0xcd/0x130 [ 34.316965] ? rcu_read_lock_sched_held+0x108/0x120 [ 34.321947] ? kmem_cache_free+0x249/0x280 [ 34.326146] ? dentry_free+0xd2/0x130 [ 34.329915] ? locks_remove_file+0x3fa/0x5a0 [ 34.334291] ? fcntl_setlk+0x10d0/0x10d0 [ 34.338320] ? __fsnotify_parent+0xb4/0x3a0 [ 34.342609] ? fsnotify+0x1af0/0x1af0 [ 34.346379] sock_release+0x8d/0x1e0 [ 34.350069] ? sock_release+0x8d/0x1e0 [ 34.353923] ? sock_release+0x1e0/0x1e0 [ 34.357871] sock_close+0x16/0x20 [ 34.361295] __fput+0x333/0x7f0 [ 34.364542] ? fput+0x140/0x140 [ 34.367789] ? check_same_owner+0x320/0x320 [ 34.372088] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.376550] ____fput+0x15/0x20 [ 34.379795] task_work_run+0x199/0x270 [ 34.383651] ? task_work_cancel+0x210/0x210 [ 34.387938] ? _raw_spin_unlock+0x22/0x30 [ 34.392052] ? switch_task_namespaces+0x87/0xc0 [ 34.396688] do_exit+0xa52/0x1b40 [ 34.400107] ? plist_check_list+0xa0/0xa0 [ 34.404224] ? plist_del+0x47b/0x990 [ 34.407904] ? mm_update_next_owner+0x930/0x930 [ 34.412539] ? plist_add+0x760/0x760 [ 34.416222] ? check_same_owner+0x320/0x320 [ 34.420515] ? find_held_lock+0x39/0x1d0 [ 34.424547] ? check_noncircular+0x20/0x20 [ 34.428748] ? lock_downgrade+0x990/0x990 [ 34.432864] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 34.438206] ? find_held_lock+0x39/0x1d0 [ 34.442249] ? lock_downgrade+0x990/0x990 [ 34.446365] ? recalc_sigpending_tsk+0x117/0x150 [ 34.451087] ? recalc_sigpending+0x103/0x160 [ 34.455471] ? recalc_sigpending_tsk+0x150/0x150 [ 34.460204] ? get_signal+0x397/0x17e0 [ 34.464062] do_group_exit+0x149/0x400 [ 34.467915] ? __lock_is_held+0xbc/0x140 [ 34.471939] ? SyS_exit+0x30/0x30 [ 34.475358] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.479818] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.484799] get_signal+0x7e8/0x17e0 [ 34.488492] ? ptrace_notify+0x130/0x130 [ 34.492520] ? trace_hardirqs_on+0xd/0x10 [ 34.496633] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.501094] ? __schedule+0x13cd/0x2070 [ 34.505033] ? lock_release+0xd70/0xd70 [ 34.508976] ? exit_robust_list+0x240/0x240 [ 34.513273] do_signal+0x94/0x1ee0 [ 34.516782] ? iterate_fd+0x3f0/0x3f0 [ 34.520549] ? setup_sigcontext+0x7d0/0x7d0 [ 34.524839] ? schedule+0x108/0x440 [ 34.528435] ? __schedule+0x2070/0x2070 [ 34.532377] ? __fget_light+0x29d/0x390