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-9,10.128.15.196' (ECDSA) to the list of known hosts. 2017/09/07 09:15:18 parsed 1 programs 2017/09/07 09:15:18 executed programs: 0 syzkaller login: [ 48.907262] dev_remove_pack: ffff8801cc5da800 not found [ 48.924302] ================================================================== [ 48.931673] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 48.938395] Read of size 8 at addr ffff8801cc0b5428 by task syz-executor0/3115 [ 48.945726] [ 48.947326] CPU: 0 PID: 3115 Comm: syz-executor0 Not tainted 4.13.0+ #71 [ 48.954132] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.963456] Call Trace: [ 48.966015] dump_stack+0x194/0x257 [ 48.969811] ? arch_local_irq_restore+0x53/0x53 [ 48.974451] ? show_regs_print_info+0x65/0x65 [ 48.978924] ? __dev_remove_pack+0x305/0x3b0 [ 48.983305] print_address_description+0x73/0x250 [ 48.988118] ? __dev_remove_pack+0x305/0x3b0 [ 48.992495] kasan_report+0x24e/0x340 [ 48.996270] __asan_report_load8_noabort+0x14/0x20 [ 49.001170] __dev_remove_pack+0x305/0x3b0 [ 49.005377] ? dev_get_by_name_rcu+0x270/0x270 [ 49.009929] ? refcount_sub_and_test+0x115/0x1b0 [ 49.014666] __unregister_prot_hook+0x211/0x280 [ 49.019323] packet_release+0x8bb/0xd70 [ 49.023273] ? packet_set_ring+0x1b70/0x1b70 [ 49.027664] ? dentry_free+0xcd/0x130 [ 49.031434] ? rcu_read_lock_sched_held+0x108/0x120 [ 49.036429] ? kmem_cache_free+0x249/0x280 [ 49.040655] ? dentry_free+0xd2/0x130 [ 49.044463] ? locks_remove_file+0x3fa/0x5a0 [ 49.048843] ? fcntl_setlk+0x10d0/0x10d0 [ 49.052877] ? __fsnotify_parent+0xb4/0x3a0 [ 49.057170] ? fsnotify+0x1af0/0x1af0 [ 49.060944] sock_release+0x8d/0x1e0 [ 49.064639] ? sock_release+0x8d/0x1e0 [ 49.068498] ? sock_release+0x1e0/0x1e0 [ 49.072439] sock_close+0x16/0x20 [ 49.075860] __fput+0x333/0x7f0 [ 49.079114] ? fput+0x140/0x140 [ 49.082366] ? check_same_owner+0x320/0x320 [ 49.086656] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.091128] ____fput+0x15/0x20 [ 49.094378] task_work_run+0x199/0x270 [ 49.098239] ? task_work_cancel+0x210/0x210 [ 49.102532] ? _raw_spin_unlock+0x22/0x30 [ 49.106651] ? switch_task_namespaces+0x87/0xc0 [ 49.111292] do_exit+0xa52/0x1b40 [ 49.114714] ? plist_check_list+0xa0/0xa0 [ 49.118840] ? plist_del+0x47b/0x990 [ 49.122522] ? mm_update_next_owner+0x930/0x930 [ 49.127161] ? plist_add+0x760/0x760 [ 49.130858] ? check_same_owner+0x320/0x320 [ 49.135156] ? find_held_lock+0x39/0x1d0 [ 49.139208] ? check_noncircular+0x20/0x20 [ 49.143415] ? lock_downgrade+0x990/0x990 [ 49.147532] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 49.152885] ? find_held_lock+0x39/0x1d0 [ 49.156936] ? lock_downgrade+0x990/0x990 [ 49.161065] ? recalc_sigpending_tsk+0x117/0x150 [ 49.165814] ? recalc_sigpending+0x103/0x160 [ 49.170221] ? recalc_sigpending_tsk+0x150/0x150 [ 49.174942] ? get_signal+0x397/0x17e0 [ 49.178812] do_group_exit+0x149/0x400 [ 49.182675] ? __lock_is_held+0xbc/0x140 [ 49.186712] ? SyS_exit+0x30/0x30 [ 49.190138] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.194605] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.199593] get_signal+0x7e8/0x17e0 [ 49.203307] ? ptrace_notify+0x130/0x130 [ 49.207335] ? __fget+0xbb/0x580 [ 49.210672] ? lock_downgrade+0x990/0x990 [ 49.214794] ? lock_release+0xd70/0xd70 [ 49.218741] ? exit_robust_list+0x240/0x240 [ 49.223069] do_signal+0x94/0x1ee0 [ 49.226610] ? iterate_fd+0x3f0/0x3f0 [ 49.230381] ? setup_sigcontext+0x7d0/0x7d0 [ 49.234680] ? do_page_fault+0xee/0x720 [ 49.238632] ? __do_page_fault+0xb60/0xb60 [ 49.242839] ? __fget_light+0x29d/0x390 [ 49.246797] ? selinux_tun_dev_create+0xc0/0xc0 [ 49.251439] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 49.257119] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 49.262365] ? exit_to_usermode_loop+0x98/0x300 [ 49.267008] exit_to_usermode_loop+0x224/0x300 [ 49.271572] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 49.277092] syscall_return_slowpath+0x42f/0x500 [ 49.281819] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 49.286808] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 49.291713] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.296696] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 49.301436] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 49.306160] RIP: 0033:0x451e59 [ 49.309317] RSP: 002b:00007fd0f77a7cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 49.316996] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 49.324235] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 49.331485] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 49.338721] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 49.345959] R13: 00007ffc0583656f R14: 00007fd0f77a89c0 R15: 0000000000000000 [ 49.353216] [ 49.354813] Allocated by task 3115: [ 49.358410] save_stack_trace+0x16/0x20 [ 49.362349] save_stack+0x43/0xd0 [ 49.365768] kasan_kmalloc+0xad/0xe0 [ 49.369446] kmem_cache_alloc_trace+0x136/0x750 [ 49.374083] fanout_add+0xa50/0x1190 [ 49.377764] packet_setsockopt+0xfdc/0x1e80 [ 49.382063] SyS_setsockopt+0x189/0x360 [ 49.386009] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 49.390728] [ 49.392325] Freed by task 3115: [ 49.395573] save_stack_trace+0x16/0x20 [ 49.399515] save_stack+0x43/0xd0 [ 49.402936] kasan_slab_free+0x71/0xc0 [ 49.406788] kfree+0xca/0x250 [ 49.409867] packet_release+0xa8f/0xd70 [ 49.413823] sock_release+0x8d/0x1e0 [ 49.417502] sock_close+0x16/0x20 [ 49.420923] __fput+0x333/0x7f0 [ 49.424177] ____fput+0x15/0x20 [ 49.427425] task_work_run+0x199/0x270 [ 49.431277] do_exit+0xa52/0x1b40 [ 49.434699] do_group_exit+0x149/0x400 [ 49.438552] get_signal+0x7e8/0x17e0 [ 49.442244] do_signal+0x94/0x1ee0 [ 49.445754] exit_to_usermode_loop+0x224/0x300 [ 49.450302] syscall_return_slowpath+0x42f/0x500 [ 49.455025] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 49.459747] [ 49.461345] The buggy address belongs to the object at ffff8801cc0b4b80 [ 49.461345] which belongs to the cache kmalloc-4096 of size 4096 [ 49.474142] The buggy address is located 2216 bytes inside of [ 49.474142] 4096-byte region [ffff8801cc0b4b80, ffff8801cc0b5b80) [ 49.486168] The buggy address belongs to the page: [ 49.491063] page:ffffea0007302d00 count:1 mapcount:0 mapping:ffff8801cc0b4b80 index:0x0 compound_mapcount: 0 [ 49.501013] flags: 0x200000000008100(slab|head) [ 49.505652] raw: 0200000000008100 ffff8801cc0b4b80 0000000000000000 0000000100000001 [ 49.513507] raw: ffffea000732e4a0 ffffea00073072a0 ffff8801dac00dc0 0000000000000000 [ 49.521349] page dumped because: kasan: bad access detected [ 49.527027] [ 49.528622] Memory state around the buggy address: [ 49.533517] ffff8801cc0b5300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.540841] ffff8801cc0b5380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.548166] >ffff8801cc0b5400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.555495] ^ [ 49.560130] ffff8801cc0b5480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.567463] ffff8801cc0b5500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 49.574791] ================================================================== [ 49.582125] Disabling lock debugging due to kernel taint [ 49.587603] Kernel panic - not syncing: panic_on_warn set ... [ 49.587603] [ 49.594935] CPU: 0 PID: 3115 Comm: syz-executor0 Tainted: G B 4.13.0+ #71 [ 49.602960] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 49.612277] Call Trace: [ 49.614828] dump_stack+0x194/0x257 [ 49.618418] ? arch_local_irq_restore+0x53/0x53 [ 49.623052] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 49.627774] ? __dev_remove_pack+0x240/0x3b0 [ 49.632146] panic+0x1e4/0x417 [ 49.635300] ? __warn+0x1d9/0x1d9 [ 49.638722] ? __dev_remove_pack+0x305/0x3b0 [ 49.643094] kasan_end_report+0x50/0x50 [ 49.647030] kasan_report+0x137/0x340 [ 49.650796] __asan_report_load8_noabort+0x14/0x20 [ 49.655687] __dev_remove_pack+0x305/0x3b0 [ 49.659883] ? dev_get_by_name_rcu+0x270/0x270 [ 49.664430] ? refcount_sub_and_test+0x115/0x1b0 [ 49.669155] __unregister_prot_hook+0x211/0x280 [ 49.673788] packet_release+0x8bb/0xd70 [ 49.677730] ? packet_set_ring+0x1b70/0x1b70 [ 49.682119] ? dentry_free+0xcd/0x130 [ 49.685881] ? rcu_read_lock_sched_held+0x108/0x120 [ 49.690862] ? kmem_cache_free+0x249/0x280 [ 49.695060] ? dentry_free+0xd2/0x130 [ 49.698826] ? locks_remove_file+0x3fa/0x5a0 [ 49.703199] ? fcntl_setlk+0x10d0/0x10d0 [ 49.707227] ? __fsnotify_parent+0xb4/0x3a0 [ 49.711512] ? fsnotify+0x1af0/0x1af0 [ 49.715291] sock_release+0x8d/0x1e0 [ 49.718971] ? sock_release+0x8d/0x1e0 [ 49.722828] ? sock_release+0x1e0/0x1e0 [ 49.726766] sock_close+0x16/0x20 [ 49.730188] __fput+0x333/0x7f0 [ 49.733431] ? fput+0x140/0x140 [ 49.736674] ? check_same_owner+0x320/0x320 [ 49.740960] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.745422] ____fput+0x15/0x20 [ 49.748667] task_work_run+0x199/0x270 [ 49.752519] ? task_work_cancel+0x210/0x210 [ 49.756814] ? _raw_spin_unlock+0x22/0x30 [ 49.760926] ? switch_task_namespaces+0x87/0xc0 [ 49.765563] do_exit+0xa52/0x1b40 [ 49.768981] ? plist_check_list+0xa0/0xa0 [ 49.773096] ? plist_del+0x47b/0x990 [ 49.776771] ? mm_update_next_owner+0x930/0x930 [ 49.781403] ? plist_add+0x760/0x760 [ 49.785085] ? check_same_owner+0x320/0x320 [ 49.789370] ? find_held_lock+0x39/0x1d0 [ 49.793398] ? check_noncircular+0x20/0x20 [ 49.797596] ? lock_downgrade+0x990/0x990 [ 49.801708] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 49.807044] ? find_held_lock+0x39/0x1d0 [ 49.811073] ? lock_downgrade+0x990/0x990 [ 49.815181] ? recalc_sigpending_tsk+0x117/0x150 [ 49.819899] ? recalc_sigpending+0x103/0x160 [ 49.824269] ? recalc_sigpending_tsk+0x150/0x150 [ 49.828984] ? get_signal+0x397/0x17e0 [ 49.832836] do_group_exit+0x149/0x400 [ 49.836685] ? __lock_is_held+0xbc/0x140 [ 49.840706] ? SyS_exit+0x30/0x30 [ 49.844119] ? _raw_spin_unlock_irq+0x27/0x70 [ 49.848577] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 49.853568] get_signal+0x7e8/0x17e0 [ 49.857257] ? ptrace_notify+0x130/0x130 [ 49.861282] ? __fget+0xbb/0x580 [ 49.864611] ? lock_downgrade+0x990/0x990 [ 49.868723] ? lock_release+0xd70/0xd70 [ 49.872675] ? exit_robust_list+0x240/0x240 [ 49.876965] do_signal+0x94/0x1ee0 [ 49.880469] ? iterate_fd+0x3f0/0x3f0 [ 49.884239] ? setup_sigcontext+0x7d0/0x7d0 [ 49.888529] ? do_page_fault+0xee/0x720 [ 49.892469] ? __do_page_fault+0xb60/0xb60 [ 49.896688] ? __fget_light+0x29d/0x390 [ 49.900629] ? selinux_tun_dev_create+0xc0/0xc0 [ 49.905261] ? selinux_netlbl_socket_setsockopt+0x10c/0x460