[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 12.596474] audit: type=1400 audit(1514105153.390:6): avc: denied { map } for pid=3141 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-kasan-gce-386-0,10.128.0.35' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 30.156099] audit: type=1400 audit(1514105170.949:7): avc: denied { map } for pid=3158 comm="syzkaller656639" path="/root/syzkaller656639877" 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 [ 30.159058] ================================================================== [ 30.159070] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 30.159074] Read of size 8 at addr ffff8801c970a830 by task syzkaller656639/3158 [ 30.159075] [ 30.159080] CPU: 0 PID: 3158 Comm: syzkaller656639 Not tainted 4.15.0-rc4+ #146 [ 30.159082] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.159084] Call Trace: [ 30.159090] dump_stack+0x194/0x257 [ 30.159095] ? arch_local_irq_restore+0x53/0x53 [ 30.159100] ? show_regs_print_info+0x18/0x18 [ 30.159104] ? print_irqtrace_events+0x270/0x270 [ 30.159107] ? __lock_acquire+0x664/0x3e00 [ 30.159111] ? __lock_acquire+0x3d4d/0x3e00 [ 30.159117] print_address_description+0x73/0x250 [ 30.159121] ? __lock_acquire+0x3d4d/0x3e00 [ 30.159125] kasan_report+0x25b/0x340 [ 30.159129] __asan_report_load8_noabort+0x14/0x20 [ 30.159132] __lock_acquire+0x3d4d/0x3e00 [ 30.159135] ? __lock_acquire+0x664/0x3e00 [ 30.159139] ? lock_downgrade+0x980/0x980 [ 30.159142] ? lock_downgrade+0x980/0x980 [ 30.159146] ? print_irqtrace_events+0x270/0x270 [ 30.159151] ? remove_wait_queue+0x81/0x350 [ 30.159156] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.159160] ? __lock_acquire+0x664/0x3e00 [ 30.159163] ? check_noncircular+0x20/0x20 [ 30.159170] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.159174] ? lock_acquire+0x1d5/0x580 [ 30.159177] ? lock_acquire+0x1d5/0x580 [ 30.159182] ? ep_free+0xf4/0x320 [ 30.159186] ? lock_release+0xa40/0xa40 [ 30.159191] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.159194] ? print_irqtrace_events+0x270/0x270 [ 30.159198] ? print_irqtrace_events+0x270/0x270 [ 30.159203] ? rcu_note_context_switch+0x710/0x710 [ 30.159207] ? __might_sleep+0x95/0x190 [ 30.159210] ? ep_free+0xf4/0x320 [ 30.159214] ? __mutex_lock+0x16f/0x1a80 [ 30.159217] ? ep_free+0xf4/0x320 [ 30.159221] ? print_irqtrace_events+0x270/0x270 [ 30.159223] ? ep_free+0xf4/0x320 [ 30.159228] lock_acquire+0x1d5/0x580 [ 30.159231] ? lock_acquire+0x1d5/0x580 [ 30.159235] ? remove_wait_queue+0x81/0x350 [ 30.159239] ? lock_release+0xa40/0xa40 [ 30.159244] ? lock_acquire+0x1d5/0x580 [ 30.159248] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.159250] ? lock_acquire+0x1d5/0x580 [ 30.159254] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 30.159259] _raw_spin_lock_irqsave+0x96/0xc0 [ 30.159262] ? remove_wait_queue+0x81/0x350 [ 30.159266] remove_wait_queue+0x81/0x350 [ 30.159272] ? depot_save_stack+0x3b5/0x490 [ 30.159276] ? add_wait_queue+0x290/0x290 [ 30.159280] ? rcutorture_record_progress+0x10/0x10 [ 30.159283] ? lock_release+0xa40/0xa40 [ 30.159288] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 30.159294] ? __kernel_text_address+0xd/0x40 [ 30.159299] ? clear_tfile_check_list+0x370/0x370 [ 30.159303] ? check_noncircular+0x20/0x20 [ 30.159309] ? locks_remove_file+0x3fa/0x5a0 [ 30.159314] ep_free+0x13f/0x320 [ 30.159317] ? ep_remove+0x800/0x800 [ 30.159322] ? fsnotify_first_mark+0x2b0/0x2b0 [ 30.159326] ? ep_free+0x320/0x320 [ 30.159329] ep_eventpoll_release+0x44/0x60 [ 30.159334] __fput+0x327/0x7e0 [ 30.159338] ? fput+0x140/0x140 [ 30.159342] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.159346] ____fput+0x15/0x20 [ 30.159350] task_work_run+0x199/0x270 [ 30.159355] ? task_work_cancel+0x210/0x210 [ 30.159358] ? _raw_spin_unlock+0x22/0x30 [ 30.159362] ? switch_task_namespaces+0x87/0xc0 [ 30.159367] do_exit+0x9bb/0x1ad0 [ 30.159372] ? __handle_mm_fault+0x2330/0x3ce0 [ 30.159376] ? mm_update_next_owner+0x930/0x930 [ 30.159382] ? do_raw_spin_trylock+0x190/0x190 [ 30.159386] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.159390] ? check_noncircular+0x20/0x20 [ 30.159394] ? _raw_spin_unlock+0x22/0x30 [ 30.159397] ? __handle_mm_fault+0x80e/0x3ce0 [ 30.159401] ? check_noncircular+0x20/0x20 [ 30.159404] ? __pmd_alloc+0x4e0/0x4e0 [ 30.159407] ? lock_downgrade+0x980/0x980 [ 30.159412] ? find_held_lock+0x35/0x1d0 [ 30.159417] ? handle_mm_fault+0x248/0x8d0 [ 30.159421] ? find_held_lock+0x35/0x1d0 [ 30.159428] ? __do_page_fault+0x5f7/0xc90 [ 30.159431] ? lock_downgrade+0x980/0x980 [ 30.159436] ? handle_mm_fault+0x410/0x8d0 [ 30.159439] ? down_read_trylock+0xdb/0x170 [ 30.159443] ? __do_page_fault+0x32d/0xc90 [ 30.159446] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 30.159450] ? vmacache_find+0x5f/0x280 [ 30.159454] ? vmacache_update+0xfe/0x130 [ 30.159458] do_group_exit+0x149/0x400 [ 30.159462] ? __do_page_fault+0x3d6/0xc90 [ 30.159465] ? SyS_exit+0x30/0x30 [ 30.159471] ? do_fast_syscall_32+0x156/0xf9d [ 30.159474] ? do_group_exit+0x400/0x400 [ 30.159478] SyS_exit_group+0x1d/0x20 [ 30.159482] do_fast_syscall_32+0x3ee/0xf9d [ 30.159487] ? do_int80_syscall_32+0x9d0/0x9d0 [ 30.159490] ? kasan_check_read+0x11/0x20 [ 30.159494] ? syscall_return_slowpath+0x550/0x550 [ 30.159498] ? SyS_rt_sigaction+0x94/0x1b0 [ 30.159502] ? SyS_sigprocmask+0x4b0/0x4b0 [ 30.159505] ? SyS_read+0x184/0x220 [ 30.159508] ? retint_user+0x18/0x18 [ 30.159513] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.159518] entry_SYSENTER_compat+0x54/0x63 [ 30.159522] RIP: 0023:0xf7f6fc79 [ 30.159528] RSP: 002b:00000000ffa0417c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 30.159532] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 30.159534] RDX: 0000000000000000 RSI: 00000000080d9b18 RDI: 00000000080f02a0 [ 30.159537] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 30.159539] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 30.159540] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 30.159545] [ 30.159547] Allocated by task 3158: [ 30.159550] save_stack+0x43/0xd0 [ 30.159553] kasan_kmalloc+0xad/0xe0 [ 30.159559] kmem_cache_alloc_trace+0x136/0x750 [ 30.159564] binder_get_thread+0x1cf/0x870 [ 30.159567] binder_poll+0x8c/0x390 [ 30.159570] ep_item_poll.isra.10+0xec/0x320 [ 30.159572] ep_insert+0x6a3/0x1b10 [ 30.159575] SyS_epoll_ctl+0x12e4/0x1ab0 [ 30.159578] do_fast_syscall_32+0x3ee/0xf9d [ 30.159581] entry_SYSENTER_compat+0x54/0x63 [ 30.159582] [ 30.159583] Freed by task 3158: [ 30.159585] save_stack+0x43/0xd0 [ 30.159588] kasan_slab_free+0x71/0xc0 [ 30.159591] kfree+0xd6/0x260 [ 30.159594] binder_thread_dec_tmpref+0x27f/0x310 [ 30.159596] binder_thread_release+0x27d/0x540 [ 30.159600] binder_ioctl+0xc02/0x1417 [ 30.159603] compat_SyS_ioctl+0x151/0x2a30 [ 30.159606] do_fast_syscall_32+0x3ee/0xf9d [ 30.159609] entry_SYSENTER_compat+0x54/0x63 [ 30.159610] [ 30.159612] The buggy address belongs to the object at ffff8801c970a780 [ 30.159612] which belongs to the cache kmalloc-512 of size 512 [ 30.159615] The buggy address is located 176 bytes inside of [ 30.159615] 512-byte region [ffff8801c970a780, ffff8801c970a980) [ 30.159616] The buggy address belongs to the page: [ 30.159620] page:00000000b9e927c4 count:1 mapcount:0 mapping:0000000063f003b6 index:0x0 [ 30.159624] flags: 0x2fffc0000000100(slab) [ 30.159629] raw: 02fffc0000000100 ffff8801c970a000 0000000000000000 0000000100000006 [ 30.159633] raw: ffffea000726c120 ffffea0007262120 ffff8801db000940 0000000000000000 [ 30.159635] page dumped because: kasan: bad access detected [ 30.159635] [ 30.159636] Memory state around the buggy address: [ 30.159639] ffff8801c970a700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.159642] ffff8801c970a780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.159644] >ffff8801c970a800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.159645] ^ [ 30.159648] ffff8801c970a880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.159650] ffff8801c970a900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.159651] ================================================================== [ 30.159652] Disabling lock debugging due to kernel taint [ 30.159655] Kernel panic - not syncing: panic_on_warn set ... [ 30.159655] [ 30.159658] CPU: 0 PID: 3158 Comm: syzkaller656639 Tainted: G B 4.15.0-rc4+ #146 [ 30.159660] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.159661] Call Trace: [ 30.159665] dump_stack+0x194/0x257 [ 30.159669] ? arch_local_irq_restore+0x53/0x53 [ 30.159672] ? kasan_end_report+0x32/0x50 [ 30.159675] ? lock_downgrade+0x980/0x980 [ 30.159679] ? vsnprintf+0x1ed/0x1900 [ 30.159683] ? __lock_acquire+0x3cd0/0x3e00 [ 30.159686] panic+0x1e4/0x41c [ 30.159689] ? refcount_error_report+0x214/0x214 [ 30.159693] ? add_taint+0x40/0x50 [ 30.159696] ? add_taint+0x1c/0x50 [ 30.159700] ? __lock_acquire+0x3d4d/0x3e00 [ 30.159703] kasan_end_report+0x50/0x50 [ 30.159706] kasan_report+0x144/0x340 [ 30.159711] __asan_report_load8_noabort+0x14/0x20 [ 30.159714] __lock_acquire+0x3d4d/0x3e00 [ 30.159717] ? __lock_acquire+0x664/0x3e00 [ 30.159721] ? lock_downgrade+0x980/0x980 [ 30.159724] ? lock_downgrade+0x980/0x980 [ 30.159727] ? print_irqtrace_events+0x270/0x270 [ 30.159731] ? remove_wait_queue+0x81/0x350 [ 30.159736] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.159739] ? __lock_acquire+0x664/0x3e00 [ 30.159743] ? check_noncircular+0x20/0x20 [ 30.159749] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.159753] ? lock_acquire+0x1d5/0x580 [ 30.159756] ? lock_acquire+0x1d5/0x580 [ 30.159759] ? ep_free+0xf4/0x320 [ 30.159763] ? lock_release+0xa40/0xa40 [ 30.159767] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.159770] ? print_irqtrace_events+0x270/0x270 [ 30.159773] ? print_irqtrace_events+0x270/0x270 [ 30.159777] ? rcu_note_context_switch+0x710/0x710 [ 30.159781] ? __might_sleep+0x95/0x190 [ 30.159784] ? ep_free+0xf4/0x320 [ 30.159787] ? __mutex_lock+0x16f/0x1a80 [ 30.159789] ? ep_free+0xf4/0x320 [ 30.159793] ? print_irqtrace_events+0x270/0x270 [ 30.159796] ? ep_free+0xf4/0x320 [ 30.159800] lock_acquire+0x1d5/0x580 [ 30.159803] ? lock_acquire+0x1d5/0x580 [ 30.159807] ? remove_wait_queue+0x81/0x350 [ 30.159811] ? lock_release+0xa40/0xa40 [ 30.159816] ? lock_acquire+0x1d5/0x580 [ 30.159820] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.159823] ? lock_acquire+0x1d5/0x580 [ 30.159826] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 30.159830] _raw_spin_lock_irqsave+0x96/0xc0 [ 30.159833] ? remove_wait_queue+0x81/0x350 [ 30.159837] remove_wait_queue+0x81/0x350 [ 30.159840] ? depot_save_stack+0x3b5/0x490 [ 30.159844] ? add_wait_queue+0x290/0x290 [ 30.159848] ? rcutorture_record_progress+0x10/0x10 [ 30.159851] ? lock_release+0xa40/0xa40 [ 30.159856] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 30.159860] ? __kernel_text_address+0xd/0x40 [ 30.159864] ? clear_tfile_check_list+0x370/0x370 [ 30.159868] ? check_noncircular+0x20/0x20 [ 30.159872] ? locks_remove_file+0x3fa/0x5a0 [ 30.159877] ep_free+0x13f/0x320 [ 30.159880] ? ep_remove+0x800/0x800 [ 30.159883] ? fsnotify_first_mark+0x2b0/0x2b0 [ 30.159887] ? ep_free+0x320/0x320 [ 30.159891] ep_eventpoll_release+0x44/0x60 [ 30.159894] __fput+0x327/0x7e0 [ 30.159898] ? fput+0x140/0x140 [ 30.159902] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.159907] ____fput+0x15/0x20 [ 30.159910] task_work_run+0x199/0x270 [ 30.159915] ? task_work_cancel+0x210/0x210 [ 30.159918] ? _raw_spin_unlock+0x22/0x30 [ 30.159922] ? switch_task_namespaces+0x87/0xc0 [ 30.159926] do_exit+0x9bb/0x1ad0 [ 30.159929] ? __handle_mm_fault+0x2330/0x3ce0 [ 30.159934] ? mm_update_next_owner+0x930/0x930 [ 30.159939] ? do_raw_spin_trylock+0x190/0x190 [ 30.159943] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.159946] ? check_noncircular+0x20/0x20 [ 30.159950] ? _raw_spin_unlock+0x22/0x30 [ 30.159954] ? __handle_mm_fault+0x80e/0x3ce0 [ 30.159958] ? check_noncircular+0x20/0x20 [ 30.159961] ? __pmd_alloc+0x4e0/0x4e0 [ 30.159964] ? lock_downgrade+0x980/0x980 [ 30.159968] ? find_held_lock+0x35/0x1d0 [ 30.159973] ? handle_mm_fault+0x248/0x8d0 [ 30.159976] ? find_held_lock+0x35/0x1d0 [ 30.159982] ? __do_page_fault+0x5f7/0xc90 [ 30.159985] ? lock_downgrade+0x980/0x980 [ 30.159990] ? handle_mm_fault+0x410/0x8d0 [ 30.159993] ? down_read_trylock+0xdb/0x170 [ 30.159996] ? __do_page_fault+0x32d/0xc90 [ 30.159999] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 30.160005] ? vmacache_find+0x5f/0x280 [ 30.160009] ? vmacache_update+0xfe/0x130 [ 30.160013] do_group_exit+0x149/0x400 [ 30.160017] ? __do_page_fault+0x3d6/0xc90 [ 30.160020] ? SyS_exit+0x30/0x30 [ 30.160024] ? do_fast_syscall_32+0x156/0xf9d [ 30.160028] ? do_group_exit+0x400/0x400 [ 30.160031] SyS_exit_group+0x1d/0x20 [ 30.160035] do_fast_syscall_32+0x3ee/0xf9d [ 30.160040] ? do_int80_syscall_32+0x9d0/0x9d0 [ 30.160043] ? kasan_check_read+0x11/0x20 [ 30.160047] ? syscall_return_slowpath+0x550/0x550 [ 30.160051] ? SyS_rt_sigaction+0x94/0x1b0 [ 30.160055] ? SyS_sigprocmask+0x4b0/0x4b0 [ 30.160058] ? SyS_read+0x184/0x220 [ 30.160061] ? retint_user+0x18/0x18 [ 30.160066] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.160071] entry_SYSENTER_compat+0x54/0x63 [ 30.160073] RIP: 0023:0xf7f6fc79 [ 30.160075] RSP: 002b:00000000ffa0417c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 30.160078] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 30.160080] RDX: 0000000000000000 RSI: 00000000080d9b18 RDI: 00000000080f02a0 [ 30.160082] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 30.160084] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 30.160085] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 30.182336] Dumping ftrace buffer: [ 30.182340] (ftrace buffer empty) [ 30.182341] Kernel Offset: disabled [ 31.471017] Rebooting in 86400 seconds..