Warning: Permanently added '10.128.0.42' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.664322] audit: type=1400 audit(1517303413.148:7): avc: denied { map } for pid=4161 comm="syzkaller118029" path="/root/syzkaller118029413" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 25.669814] ================================================================== [ 25.669826] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.669832] Read of size 8 at addr ffff8801b1987670 by task syzkaller118029/4161 [ 25.669833] [ 25.669840] CPU: 1 PID: 4161 Comm: syzkaller118029 Not tainted 4.15.0+ #286 [ 25.669843] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.669845] Call Trace: [ 25.669854] dump_stack+0x194/0x257 [ 25.669862] ? arch_local_irq_restore+0x53/0x53 [ 25.669870] ? show_regs_print_info+0x18/0x18 [ 25.669876] ? print_irqtrace_events+0x270/0x270 [ 25.669883] ? __lock_acquire+0x664/0x3e00 [ 25.669889] ? __lock_acquire+0x3d4d/0x3e00 [ 25.669898] print_address_description+0x73/0x250 [ 25.669904] ? __lock_acquire+0x3d4d/0x3e00 [ 25.669911] kasan_report+0x25b/0x340 [ 25.669919] __asan_report_load8_noabort+0x14/0x20 [ 25.669925] __lock_acquire+0x3d4d/0x3e00 [ 25.669930] ? __lock_acquire+0x664/0x3e00 [ 25.669936] ? lock_downgrade+0x980/0x980 [ 25.669942] ? lock_downgrade+0x980/0x980 [ 25.669950] ? remove_wait_queue+0x81/0x350 [ 25.669959] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.669966] ? __lock_acquire+0x664/0x3e00 [ 25.669971] ? check_noncircular+0x20/0x20 [ 25.669984] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.669991] ? lock_acquire+0x1d5/0x580 [ 25.669997] ? lock_acquire+0x1d5/0x580 [ 25.670008] ? ep_free+0xf4/0x320 [ 25.670017] ? lock_release+0xa40/0xa40 [ 25.670023] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.670030] ? print_irqtrace_events+0x270/0x270 [ 25.670037] ? rcu_note_context_switch+0x710/0x710 [ 25.670045] ? __might_sleep+0x95/0x190 [ 25.670051] ? ep_free+0xf4/0x320 [ 25.670057] ? __mutex_lock+0x16f/0x1a80 [ 25.670062] ? ep_free+0xf4/0x320 [ 25.670070] ? print_irqtrace_events+0x270/0x270 [ 25.670075] ? ep_free+0xf4/0x320 [ 25.670083] lock_acquire+0x1d5/0x580 [ 25.670089] ? lock_acquire+0x1d5/0x580 [ 25.670095] ? remove_wait_queue+0x81/0x350 [ 25.670101] ? __lock_acquire+0x664/0x3e00 [ 25.670109] ? lock_release+0xa40/0xa40 [ 25.670118] ? lock_acquire+0x1d5/0x580 [ 25.670124] ? lock_acquire+0x1d5/0x580 [ 25.670130] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.670138] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.670144] ? remove_wait_queue+0x81/0x350 [ 25.670150] remove_wait_queue+0x81/0x350 [ 25.670159] ? add_wait_queue+0x290/0x290 [ 25.670165] ? rcutorture_record_progress+0x10/0x10 [ 25.670175] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.670183] ? __kernel_text_address+0xd/0x40 [ 25.670191] ? clear_tfile_check_list+0x370/0x370 [ 25.670199] ? check_noncircular+0x20/0x20 [ 25.670207] ? locks_remove_file+0x3fa/0x5a0 [ 25.670217] ep_free+0x13f/0x320 [ 25.670223] ? ep_remove+0x800/0x800 [ 25.670229] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.670237] ? ep_free+0x320/0x320 [ 25.670244] ep_eventpoll_release+0x44/0x60 [ 25.670250] __fput+0x327/0x7e0 [ 25.670259] ? fput+0x140/0x140 [ 25.670266] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.670275] ____fput+0x15/0x20 [ 25.670282] task_work_run+0x199/0x270 [ 25.670290] ? task_work_cancel+0x210/0x210 [ 25.670296] ? _raw_spin_unlock+0x22/0x30 [ 25.670302] ? switch_task_namespaces+0x87/0xc0 [ 25.670311] do_exit+0x9bb/0x1ad0 [ 25.670319] ? binder_ioctl+0x4f1/0x1417 [ 25.670326] ? mm_update_next_owner+0x930/0x930 [ 25.670333] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.670344] ? avc_ss_reset+0x110/0x110 [ 25.670349] ? mutex_unlock+0xd/0x10 [ 25.670355] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.670375] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.670380] ? up_read+0x1a/0x40 [ 25.670386] ? rcu_note_context_switch+0x710/0x710 [ 25.670392] ? __fd_install+0x288/0x740 [ 25.670401] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.670407] ? do_vfs_ioctl+0x486/0x1520 [ 25.670412] ? _cond_resched+0x14/0x30 [ 25.670420] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.670426] ? selinux_capable+0x40/0x40 [ 25.670433] ? __alloc_fd+0x750/0x750 [ 25.670441] do_group_exit+0x149/0x400 [ 25.670448] ? SyS_exit+0x30/0x30 [ 25.670455] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.670463] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.670471] SyS_exit_group+0x1d/0x20 [ 25.670478] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.670482] RIP: 0033:0x4429f8 [ 25.670485] RSP: 002b:00007ffc6fb9f788 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.670492] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.670495] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.670498] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.670502] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.670505] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.670513] [ 25.670516] Allocated by task 4161: [ 25.670522] save_stack+0x43/0xd0 [ 25.670527] kasan_kmalloc+0xad/0xe0 [ 25.670532] kmem_cache_alloc_trace+0x136/0x750 [ 25.670537] binder_get_thread+0x1cf/0x870 [ 25.670541] binder_poll+0x8c/0x390 [ 25.670547] ep_item_poll.isra.10+0xec/0x320 [ 25.670552] ep_insert+0x6a3/0x1b10 [ 25.670557] SyS_epoll_ctl+0x12e4/0x1ab0 [ 25.670562] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.670563] [ 25.670566] Freed by task 4161: [ 25.670570] save_stack+0x43/0xd0 [ 25.670575] kasan_slab_free+0x71/0xc0 [ 25.670579] kfree+0xd6/0x260 [ 25.670584] binder_thread_dec_tmpref+0x27f/0x310 [ 25.670589] binder_thread_release+0x27d/0x540 [ 25.670593] binder_ioctl+0xc02/0x1417 [ 25.670598] do_vfs_ioctl+0x1b1/0x1520 [ 25.670602] SyS_ioctl+0x8f/0xc0 [ 25.670607] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.670608] [ 25.670613] The buggy address belongs to the object at ffff8801b19875c0 [ 25.670613] which belongs to the cache kmalloc-512 of size 512 [ 25.670618] The buggy address is located 176 bytes inside of [ 25.670618] 512-byte region [ffff8801b19875c0, ffff8801b19877c0) [ 25.670620] The buggy address belongs to the page: [ 25.670625] page:ffffea0006c661c0 count:1 mapcount:0 mapping:ffff8801b19870c0 index:0x0 [ 25.670630] flags: 0x2fffc0000000100(slab) [ 25.670638] raw: 02fffc0000000100 ffff8801b19870c0 0000000000000000 0000000100000006 [ 25.670645] raw: ffffea0006cc5720 ffffea00072ed920 ffff8801db000940 0000000000000000 [ 25.670647] page dumped because: kasan: bad access detected [ 25.670648] [ 25.670650] Memory state around the buggy address: [ 25.670655] ffff8801b1987500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.670659] ffff8801b1987580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 25.670664] >ffff8801b1987600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.670666] ^ [ 25.670671] ffff8801b1987680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.670675] ffff8801b1987700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.670677] ================================================================== [ 25.670679] Disabling lock debugging due to kernel taint [ 25.670682] Kernel panic - not syncing: panic_on_warn set ... [ 25.670682] [ 25.670688] CPU: 1 PID: 4161 Comm: syzkaller118029 Tainted: G B 4.15.0+ #286 [ 25.670691] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.670692] Call Trace: [ 25.670699] dump_stack+0x194/0x257 [ 25.670706] ? arch_local_irq_restore+0x53/0x53 [ 25.670711] ? kasan_end_report+0x32/0x50 [ 25.670718] ? lock_downgrade+0x980/0x980 [ 25.670724] ? vsnprintf+0x1ed/0x1900 [ 25.670731] ? __lock_acquire+0x3cd0/0x3e00 [ 25.670736] panic+0x1e4/0x41c [ 25.670743] ? refcount_error_report+0x214/0x214 [ 25.670750] ? add_taint+0x40/0x50 [ 25.670755] ? add_taint+0x1c/0x50 [ 25.670762] ? __lock_acquire+0x3d4d/0x3e00 [ 25.670768] kasan_end_report+0x50/0x50 [ 25.670774] kasan_report+0x144/0x340 [ 25.670786] __asan_report_load8_noabort+0x14/0x20 [ 25.670792] __lock_acquire+0x3d4d/0x3e00 [ 25.670797] ? __lock_acquire+0x664/0x3e00 [ 25.670803] ? lock_downgrade+0x980/0x980 [ 25.670808] ? lock_downgrade+0x980/0x980 [ 25.670816] ? remove_wait_queue+0x81/0x350 [ 25.670824] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.670831] ? __lock_acquire+0x664/0x3e00 [ 25.670836] ? check_noncircular+0x20/0x20 [ 25.670848] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.670855] ? lock_acquire+0x1d5/0x580 [ 25.670861] ? lock_acquire+0x1d5/0x580 [ 25.670866] ? ep_free+0xf4/0x320 [ 25.670874] ? lock_release+0xa40/0xa40 [ 25.670880] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.670887] ? print_irqtrace_events+0x270/0x270 [ 25.670893] ? rcu_note_context_switch+0x710/0x710 [ 25.670900] ? __might_sleep+0x95/0x190 [ 25.670906] ? ep_free+0xf4/0x320 [ 25.670912] ? __mutex_lock+0x16f/0x1a80 [ 25.670916] ? ep_free+0xf4/0x320 [ 25.670924] ? print_irqtrace_events+0x270/0x270 [ 25.670929] ? ep_free+0xf4/0x320 [ 25.670937] lock_acquire+0x1d5/0x580 [ 25.670942] ? lock_acquire+0x1d5/0x580 [ 25.670948] ? remove_wait_queue+0x81/0x350 [ 25.670954] ? __lock_acquire+0x664/0x3e00 [ 25.670961] ? lock_release+0xa40/0xa40 [ 25.670971] ? lock_acquire+0x1d5/0x580 [ 25.670976] ? lock_acquire+0x1d5/0x580 [ 25.670982] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.670990] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.670996] ? remove_wait_queue+0x81/0x350 [ 25.671002] remove_wait_queue+0x81/0x350 [ 25.671010] ? add_wait_queue+0x290/0x290 [ 25.671016] ? rcutorture_record_progress+0x10/0x10 [ 25.671026] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.671032] ? __kernel_text_address+0xd/0x40 [ 25.671040] ? clear_tfile_check_list+0x370/0x370 [ 25.671048] ? check_noncircular+0x20/0x20 [ 25.671056] ? locks_remove_file+0x3fa/0x5a0 [ 25.671065] ep_free+0x13f/0x320 [ 25.671071] ? ep_remove+0x800/0x800 [ 25.671077] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.671085] ? ep_free+0x320/0x320 [ 25.671091] ep_eventpoll_release+0x44/0x60 [ 25.671097] __fput+0x327/0x7e0 [ 25.671106] ? fput+0x140/0x140 [ 25.671112] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.671121] ____fput+0x15/0x20 [ 25.671128] task_work_run+0x199/0x270 [ 25.671135] ? task_work_cancel+0x210/0x210 [ 25.671142] ? _raw_spin_unlock+0x22/0x30 [ 25.671148] ? switch_task_namespaces+0x87/0xc0 [ 25.671155] do_exit+0x9bb/0x1ad0 [ 25.671162] ? binder_ioctl+0x4f1/0x1417 [ 25.671168] ? mm_update_next_owner+0x930/0x930 [ 25.671176] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.671184] ? avc_ss_reset+0x110/0x110 [ 25.671189] ? mutex_unlock+0xd/0x10 [ 25.671195] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.671213] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.671218] ? up_read+0x1a/0x40 [ 25.671225] ? rcu_note_context_switch+0x710/0x710 [ 25.671230] ? __fd_install+0x288/0x740 [ 25.671238] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.671244] ? do_vfs_ioctl+0x486/0x1520 [ 25.671249] ? _cond_resched+0x14/0x30 [ 25.671256] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.671262] ? selinux_capable+0x40/0x40 [ 25.671269] ? __alloc_fd+0x750/0x750 [ 25.671277] do_group_exit+0x149/0x400 [ 25.671284] ? SyS_exit+0x30/0x30 [ 25.671290] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.671297] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.671304] SyS_exit_group+0x1d/0x20 [ 25.671311] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.671314] RIP: 0033:0x4429f8 [ 25.671317] RSP: 002b:00007ffc6fb9f788 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.671323] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.671326] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.671330] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.671333] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.671336] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.690629] Dumping ftrace buffer: [ 25.690633] (ftrace buffer empty) [ 25.690635] Kernel Offset: disabled [ 26.819011] Rebooting in 86400 seconds..