[?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.185983] audit: type=1400 audit(1513703838.351:6): avc: denied { map } for pid=3124 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-1,10.128.15.243' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.299709] audit: type=1400 audit(1513703844.465:7): avc: denied { map } for pid=3138 comm="syzkaller976205" path="/root/syzkaller976205473" 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 [ 18.303443] ================================================================== [ 18.303456] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 18.303461] Read of size 8 at addr ffff8801cabf65f0 by task syzkaller976205/3138 [ 18.303462] [ 18.303469] CPU: 1 PID: 3138 Comm: syzkaller976205 Not tainted 4.15.0-rc4+ #138 [ 18.303472] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.303474] Call Trace: [ 18.303484] dump_stack+0x194/0x257 [ 18.303492] ? arch_local_irq_restore+0x53/0x53 [ 18.303499] ? show_regs_print_info+0x18/0x18 [ 18.303504] ? print_irqtrace_events+0x270/0x270 [ 18.303510] ? __lock_acquire+0x664/0x3e00 [ 18.303517] ? __lock_acquire+0x3d4d/0x3e00 [ 18.303524] print_address_description+0x73/0x250 [ 18.303530] ? __lock_acquire+0x3d4d/0x3e00 [ 18.303536] kasan_report+0x25b/0x340 [ 18.303543] __asan_report_load8_noabort+0x14/0x20 [ 18.303549] __lock_acquire+0x3d4d/0x3e00 [ 18.303555] ? __lock_acquire+0x664/0x3e00 [ 18.303560] ? lock_downgrade+0x980/0x980 [ 18.303566] ? lock_downgrade+0x980/0x980 [ 18.303572] ? print_irqtrace_events+0x270/0x270 [ 18.303578] ? remove_wait_queue+0x81/0x350 [ 18.303587] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.303594] ? __lock_acquire+0x664/0x3e00 [ 18.303599] ? check_noncircular+0x20/0x20 [ 18.303611] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.303617] ? lock_acquire+0x1d5/0x580 [ 18.303623] ? lock_acquire+0x1d5/0x580 [ 18.303628] ? ep_free+0xf4/0x320 [ 18.303636] ? lock_release+0xa40/0xa40 [ 18.303643] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.303648] ? print_irqtrace_events+0x270/0x270 [ 18.303654] ? print_irqtrace_events+0x270/0x270 [ 18.303660] ? rcu_note_context_switch+0x710/0x710 [ 18.303665] ? find_held_lock+0x35/0x1d0 [ 18.303672] ? __might_sleep+0x95/0x190 [ 18.303677] ? ep_free+0xf4/0x320 [ 18.303684] ? __mutex_lock+0x16f/0x1a80 [ 18.303688] ? ep_free+0xf4/0x320 [ 18.303695] ? print_irqtrace_events+0x270/0x270 [ 18.303699] ? ep_free+0xf4/0x320 [ 18.303707] lock_acquire+0x1d5/0x580 [ 18.303712] ? lock_acquire+0x1d5/0x580 [ 18.303718] ? remove_wait_queue+0x81/0x350 [ 18.303726] ? lock_release+0xa40/0xa40 [ 18.303735] ? lock_acquire+0x1d5/0x580 [ 18.303741] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.303745] ? lock_acquire+0x1d5/0x580 [ 18.303753] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.303760] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.303765] ? remove_wait_queue+0x81/0x350 [ 18.303772] remove_wait_queue+0x81/0x350 [ 18.303778] ? depot_save_stack+0x3b5/0x490 [ 18.303785] ? add_wait_queue+0x290/0x290 [ 18.303790] ? rcutorture_record_progress+0x10/0x10 [ 18.303796] ? lock_release+0xa40/0xa40 [ 18.303806] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.303812] ? __kernel_text_address+0xd/0x40 [ 18.303821] ? clear_tfile_check_list+0x370/0x370 [ 18.303829] ? check_noncircular+0x20/0x20 [ 18.303836] ? locks_remove_file+0x3fa/0x5a0 [ 18.303844] ep_free+0x13f/0x320 [ 18.303850] ? ep_remove+0x800/0x800 [ 18.303856] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.303863] ? ep_free+0x320/0x320 [ 18.303868] ep_eventpoll_release+0x44/0x60 [ 18.303874] __fput+0x327/0x7e0 [ 18.303882] ? fput+0x140/0x140 [ 18.303888] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.303895] ____fput+0x15/0x20 [ 18.303901] task_work_run+0x199/0x270 [ 18.303909] ? task_work_cancel+0x210/0x210 [ 18.303914] ? _raw_spin_unlock+0x22/0x30 [ 18.303920] ? switch_task_namespaces+0x87/0xc0 [ 18.303929] do_exit+0x9bb/0x1ad0 [ 18.303935] ? __handle_mm_fault+0x2330/0x3ce0 [ 18.303943] ? mm_update_next_owner+0x930/0x930 [ 18.303952] ? do_raw_spin_trylock+0x190/0x190 [ 18.303959] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.303965] ? check_noncircular+0x20/0x20 [ 18.303971] ? _raw_spin_unlock+0x22/0x30 [ 18.303977] ? __handle_mm_fault+0x80e/0x3ce0 [ 18.303984] ? check_noncircular+0x20/0x20 [ 18.303989] ? __pmd_alloc+0x4e0/0x4e0 [ 18.303998] ? lock_downgrade+0x980/0x980 [ 18.304010] ? find_held_lock+0x35/0x1d0 [ 18.304018] ? handle_mm_fault+0x248/0x8d0 [ 18.304025] ? find_held_lock+0x35/0x1d0 [ 18.304035] ? __do_page_fault+0x5f7/0xc90 [ 18.304041] ? lock_downgrade+0x980/0x980 [ 18.304050] ? handle_mm_fault+0x410/0x8d0 [ 18.304055] ? down_read_trylock+0xdb/0x170 [ 18.304060] ? __do_page_fault+0x32d/0xc90 [ 18.304066] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 18.304073] ? vmacache_find+0x5f/0x280 [ 18.304082] do_group_exit+0x149/0x400 [ 18.304088] ? __do_page_fault+0x3d6/0xc90 [ 18.304093] ? SyS_exit+0x30/0x30 [ 18.304102] ? do_fast_syscall_32+0x156/0xf9d [ 18.304108] ? do_group_exit+0x400/0x400 [ 18.304114] SyS_exit_group+0x1d/0x20 [ 18.304120] do_fast_syscall_32+0x3ee/0xf9d [ 18.304129] ? do_int80_syscall_32+0x9d0/0x9d0 [ 18.304134] ? kasan_check_read+0x11/0x20 [ 18.304141] ? syscall_return_slowpath+0x550/0x550 [ 18.304149] ? SyS_rt_sigaction+0x94/0x1b0 [ 18.304155] ? SyS_sigprocmask+0x4b0/0x4b0 [ 18.304160] ? SyS_read+0x184/0x220 [ 18.304165] ? retint_user+0x18/0x18 [ 18.304173] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 18.304183] entry_SYSENTER_compat+0x54/0x63 [ 18.304187] RIP: 0023:0xf7f59c79 [ 18.304190] RSP: 002b:00000000ffe5cbac EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 18.304197] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 18.304200] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 18.304203] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 18.304206] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 18.304209] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 18.304217] [ 18.304220] Allocated by task 3138: [ 18.304225] save_stack+0x43/0xd0 [ 18.304230] kasan_kmalloc+0xad/0xe0 [ 18.304236] kmem_cache_alloc_trace+0x136/0x750 [ 18.304242] binder_get_thread+0x1cf/0x870 [ 18.304246] binder_poll+0x8c/0x390 [ 18.304250] ep_item_poll.isra.10+0xec/0x320 [ 18.304254] ep_insert+0x6a3/0x1b10 [ 18.304259] SyS_epoll_ctl+0x12e4/0x1ab0 [ 18.304264] do_fast_syscall_32+0x3ee/0xf9d [ 18.304269] entry_SYSENTER_compat+0x54/0x63 [ 18.304270] [ 18.304272] Freed by task 3138: [ 18.304276] save_stack+0x43/0xd0 [ 18.304280] kasan_slab_free+0x71/0xc0 [ 18.304285] kfree+0xca/0x250 [ 18.304289] binder_thread_dec_tmpref+0x27f/0x310 [ 18.304294] binder_thread_release+0x27d/0x540 [ 18.304298] binder_ioctl+0xc02/0x1417 [ 18.304302] compat_SyS_ioctl+0x151/0x2a30 [ 18.304307] do_fast_syscall_32+0x3ee/0xf9d [ 18.304312] entry_SYSENTER_compat+0x54/0x63 [ 18.304313] [ 18.304317] The buggy address belongs to the object at ffff8801cabf6540 [ 18.304317] which belongs to the cache kmalloc-512 of size 512 [ 18.304322] The buggy address is located 176 bytes inside of [ 18.304322] 512-byte region [ffff8801cabf6540, ffff8801cabf6740) [ 18.304324] The buggy address belongs to the page: [ 18.304329] page:00000000c715499c count:1 mapcount:0 mapping:00000000e127ad32 index:0x0 [ 18.304333] flags: 0x2fffc0000000100(slab) [ 18.304341] raw: 02fffc0000000100 ffff8801cabf6040 0000000000000000 0000000100000006 [ 18.304348] raw: ffffea00072afd20 ffffea00072884a0 ffff8801db000940 0000000000000000 [ 18.304351] page dumped because: kasan: bad access detected [ 18.304352] [ 18.304353] Memory state around the buggy address: [ 18.304358] ffff8801cabf6480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.304362] ffff8801cabf6500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 18.304366] >ffff8801cabf6580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.304369] ^ [ 18.304373] ffff8801cabf6600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.304377] ffff8801cabf6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.304379] ================================================================== [ 18.304380] Disabling lock debugging due to kernel taint [ 18.304383] Kernel panic - not syncing: panic_on_warn set ... [ 18.304383] [ 18.304389] CPU: 1 PID: 3138 Comm: syzkaller976205 Tainted: G B 4.15.0-rc4+ #138 [ 18.304392] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.304394] Call Trace: [ 18.304400] dump_stack+0x194/0x257 [ 18.304408] ? arch_local_irq_restore+0x53/0x53 [ 18.304413] ? kasan_end_report+0x32/0x50 [ 18.304419] ? lock_downgrade+0x980/0x980 [ 18.304424] ? vsnprintf+0x1ed/0x1900 [ 18.304431] ? __lock_acquire+0x3c90/0x3e00 [ 18.304436] panic+0x1e4/0x41c [ 18.304442] ? refcount_error_report+0x214/0x214 [ 18.304449] ? add_taint+0x40/0x50 [ 18.304454] ? add_taint+0x1c/0x50 [ 18.304460] ? __lock_acquire+0x3d4d/0x3e00 [ 18.304466] kasan_end_report+0x50/0x50 [ 18.304471] kasan_report+0x144/0x340 [ 18.304478] __asan_report_load8_noabort+0x14/0x20 [ 18.304483] __lock_acquire+0x3d4d/0x3e00 [ 18.304489] ? __lock_acquire+0x664/0x3e00 [ 18.304495] ? lock_downgrade+0x980/0x980 [ 18.304500] ? lock_downgrade+0x980/0x980 [ 18.304506] ? print_irqtrace_events+0x270/0x270 [ 18.304511] ? remove_wait_queue+0x81/0x350 [ 18.304520] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.304526] ? __lock_acquire+0x664/0x3e00 [ 18.304532] ? check_noncircular+0x20/0x20 [ 18.304543] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.304549] ? lock_acquire+0x1d5/0x580 [ 18.304555] ? lock_acquire+0x1d5/0x580 [ 18.304559] ? ep_free+0xf4/0x320 [ 18.304567] ? lock_release+0xa40/0xa40 [ 18.304573] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.304578] ? print_irqtrace_events+0x270/0x270 [ 18.304584] ? print_irqtrace_events+0x270/0x270 [ 18.304590] ? rcu_note_context_switch+0x710/0x710 [ 18.304595] ? find_held_lock+0x35/0x1d0 [ 18.304601] ? __might_sleep+0x95/0x190 [ 18.304606] ? ep_free+0xf4/0x320 [ 18.304612] ? __mutex_lock+0x16f/0x1a80 [ 18.304616] ? ep_free+0xf4/0x320 [ 18.304623] ? print_irqtrace_events+0x270/0x270 [ 18.304627] ? ep_free+0xf4/0x320 [ 18.304635] lock_acquire+0x1d5/0x580 [ 18.304640] ? lock_acquire+0x1d5/0x580 [ 18.304646] ? remove_wait_queue+0x81/0x350 [ 18.304654] ? lock_release+0xa40/0xa40 [ 18.304662] ? lock_acquire+0x1d5/0x580 [ 18.304668] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.304673] ? lock_acquire+0x1d5/0x580 [ 18.304680] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 18.304686] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.304692] ? remove_wait_queue+0x81/0x350 [ 18.304698] remove_wait_queue+0x81/0x350 [ 18.304704] ? depot_save_stack+0x3b5/0x490 [ 18.304711] ? add_wait_queue+0x290/0x290 [ 18.304716] ? rcutorture_record_progress+0x10/0x10 [ 18.304722] ? lock_release+0xa40/0xa40 [ 18.304731] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 18.304737] ? __kernel_text_address+0xd/0x40 [ 18.304746] ? clear_tfile_check_list+0x370/0x370 [ 18.304753] ? check_noncircular+0x20/0x20 [ 18.304760] ? locks_remove_file+0x3fa/0x5a0 [ 18.304768] ep_free+0x13f/0x320 [ 18.304773] ? ep_remove+0x800/0x800 [ 18.304779] ? fsnotify_first_mark+0x2b0/0x2b0 [ 18.304786] ? ep_free+0x320/0x320 [ 18.304791] ep_eventpoll_release+0x44/0x60 [ 18.304796] __fput+0x327/0x7e0 [ 18.304804] ? fput+0x140/0x140 [ 18.304810] ? _raw_spin_unlock_irq+0x27/0x70 [ 18.304817] ____fput+0x15/0x20 [ 18.304823] task_work_run+0x199/0x270 [ 18.304830] ? task_work_cancel+0x210/0x210 [ 18.304836] ? _raw_spin_unlock+0x22/0x30 [ 18.304842] ? switch_task_namespaces+0x87/0xc0 [ 18.304849] do_exit+0x9bb/0x1ad0 [ 18.304854] ? __handle_mm_fault+0x2330/0x3ce0 [ 18.304861] ? mm_update_next_owner+0x930/0x930 [ 18.304870] ? do_raw_spin_trylock+0x190/0x190 [ 18.304877] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 18.304883] ? check_noncircular+0x20/0x20 [ 18.304889] ? _raw_spin_unlock+0x22/0x30 [ 18.304895] ? __handle_mm_fault+0x80e/0x3ce0 [ 18.304902] ? check_noncircular+0x20/0x20 [ 18.304907] ? __pmd_alloc+0x4e0/0x4e0 [ 18.304912] ? lock_downgrade+0x980/0x980 [ 18.304919] ? find_held_lock+0x35/0x1d0 [ 18.304927] ? handle_mm_fault+0x248/0x8d0 [ 18.304934] ? find_held_lock+0x35/0x1d0 [ 18.304943] ? __do_page_fault+0x5f7/0xc90 [ 18.304949] ? lock_downgrade+0x980/0x980 [ 18.304957] ? handle_mm_fault+0x410/0x8d0 [ 18.304961] ? down_read_trylock+0xdb/0x170 [ 18.304967] ? __do_page_fault+0x32d/0xc90 [ 18.304973] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 18.304978] ? vmacache_find+0x5f/0x280 [ 18.304987] do_group_exit+0x149/0x400 [ 18.304996] ? __do_page_fault+0x3d6/0xc90 [ 18.305001] ? SyS_exit+0x30/0x30 [ 18.305009] ? do_fast_syscall_32+0x156/0xf9d [ 18.305015] ? do_group_exit+0x400/0x400 [ 18.305021] SyS_exit_group+0x1d/0x20 [ 18.305027] do_fast_syscall_32+0x3ee/0xf9d [ 18.305035] ? do_int80_syscall_32+0x9d0/0x9d0 [ 18.305040] ? kasan_check_read+0x11/0x20 [ 18.305047] ? syscall_return_slowpath+0x550/0x550 [ 18.305054] ? SyS_rt_sigaction+0x94/0x1b0 [ 18.305060] ? SyS_sigprocmask+0x4b0/0x4b0 [ 18.305065] ? SyS_read+0x184/0x220 [ 18.305070] ? retint_user+0x18/0x18 [ 18.305078] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 18.305086] entry_SYSENTER_compat+0x54/0x63 [ 18.305089] RIP: 0023:0xf7f59c79 [ 18.305092] RSP: 002b:00000000ffe5cbac EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 18.305098] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 18.305101] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 18.305104] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 18.305107] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 18.305110] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 18.326017] Dumping ftrace buffer: [ 18.326021] (ftrace buffer empty) [ 18.326023] Kernel Offset: disabled [ 19.616491] Rebooting in 86400 seconds..