[....] Starting enhanced syslogd: rsyslogd[?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.469859] audit: type=1400 audit(1514237851.545:6): avc: denied { map } for pid=3136 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-2,10.128.0.60' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.631188] audit: type=1400 audit(1514237870.706:7): avc: denied { map } for pid=3154 comm="syzkaller612270" path="/root/syzkaller612270514" 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 [ 31.636170] ================================================================== [ 31.636187] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 31.636191] Read of size 8 at addr ffff8801cf343630 by task syzkaller612270/3154 [ 31.636192] [ 31.636198] CPU: 1 PID: 3154 Comm: syzkaller612270 Not tainted 4.15.0-rc5+ #147 [ 31.636200] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.636202] Call Trace: [ 31.636211] dump_stack+0x194/0x257 [ 31.636216] ? arch_local_irq_restore+0x53/0x53 [ 31.636222] ? show_regs_print_info+0x18/0x18 [ 31.636226] ? print_irqtrace_events+0x270/0x270 [ 31.636229] ? __lock_acquire+0x664/0x3e00 [ 31.636233] ? __lock_acquire+0x3d4d/0x3e00 [ 31.636240] print_address_description+0x73/0x250 [ 31.636244] ? __lock_acquire+0x3d4d/0x3e00 [ 31.636247] kasan_report+0x25b/0x340 [ 31.636252] __asan_report_load8_noabort+0x14/0x20 [ 31.636255] __lock_acquire+0x3d4d/0x3e00 [ 31.636258] ? __lock_acquire+0x664/0x3e00 [ 31.636262] ? lock_downgrade+0x980/0x980 [ 31.636265] ? lock_downgrade+0x980/0x980 [ 31.636269] ? print_irqtrace_events+0x270/0x270 [ 31.636274] ? remove_wait_queue+0x81/0x350 [ 31.636279] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.636283] ? __lock_acquire+0x664/0x3e00 [ 31.636286] ? check_noncircular+0x20/0x20 [ 31.636293] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.636297] ? lock_acquire+0x1d5/0x580 [ 31.636300] ? lock_acquire+0x1d5/0x580 [ 31.636305] ? ep_free+0xf4/0x320 [ 31.636310] ? lock_release+0xa40/0xa40 [ 31.636315] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.636319] ? print_irqtrace_events+0x270/0x270 [ 31.636322] ? print_irqtrace_events+0x270/0x270 [ 31.636328] ? rcu_note_context_switch+0x710/0x710 [ 31.636333] ? __might_sleep+0x95/0x190 [ 31.636336] ? ep_free+0xf4/0x320 [ 31.636341] ? __mutex_lock+0x16f/0x1a80 [ 31.636343] ? ep_free+0xf4/0x320 [ 31.636347] ? print_irqtrace_events+0x270/0x270 [ 31.636350] ? ep_free+0xf4/0x320 [ 31.636354] lock_acquire+0x1d5/0x580 [ 31.636358] ? lock_acquire+0x1d5/0x580 [ 31.636361] ? remove_wait_queue+0x81/0x350 [ 31.636366] ? lock_release+0xa40/0xa40 [ 31.636371] ? lock_acquire+0x1d5/0x580 [ 31.636374] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.636377] ? lock_acquire+0x1d5/0x580 [ 31.636380] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 31.636386] _raw_spin_lock_irqsave+0x96/0xc0 [ 31.636389] ? remove_wait_queue+0x81/0x350 [ 31.636393] remove_wait_queue+0x81/0x350 [ 31.636399] ? depot_save_stack+0x3b5/0x490 [ 31.636404] ? add_wait_queue+0x290/0x290 [ 31.636407] ? rcutorture_record_progress+0x10/0x10 [ 31.636411] ? lock_release+0xa40/0xa40 [ 31.636416] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 31.636424] ? __kernel_text_address+0xd/0x40 [ 31.636428] ? clear_tfile_check_list+0x370/0x370 [ 31.636433] ? check_noncircular+0x20/0x20 [ 31.636439] ? locks_remove_file+0x3fa/0x5a0 [ 31.636444] ep_free+0x13f/0x320 [ 31.636447] ? ep_remove+0x800/0x800 [ 31.636453] ? fsnotify_first_mark+0x2b0/0x2b0 [ 31.636457] ? ep_free+0x320/0x320 [ 31.636460] ep_eventpoll_release+0x44/0x60 [ 31.636465] __fput+0x327/0x7e0 [ 31.636469] ? fput+0x140/0x140 [ 31.636473] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.636478] ____fput+0x15/0x20 [ 31.636482] task_work_run+0x199/0x270 [ 31.636486] ? task_work_cancel+0x210/0x210 [ 31.636490] ? _raw_spin_unlock+0x22/0x30 [ 31.636493] ? switch_task_namespaces+0x87/0xc0 [ 31.636500] do_exit+0x9bb/0x1ad0 [ 31.636505] ? __handle_mm_fault+0x2330/0x3ce0 [ 31.636510] ? mm_update_next_owner+0x930/0x930 [ 31.636516] ? do_raw_spin_trylock+0x190/0x190 [ 31.636520] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.636524] ? check_noncircular+0x20/0x20 [ 31.636528] ? _raw_spin_unlock+0x22/0x30 [ 31.636531] ? __handle_mm_fault+0x80e/0x3ce0 [ 31.636536] ? check_noncircular+0x20/0x20 [ 31.636538] ? __pmd_alloc+0x4e0/0x4e0 [ 31.636541] ? lock_downgrade+0x980/0x980 [ 31.636546] ? find_held_lock+0x35/0x1d0 [ 31.636551] ? handle_mm_fault+0x248/0x8d0 [ 31.636555] ? find_held_lock+0x35/0x1d0 [ 31.636562] ? __do_page_fault+0x5f7/0xc90 [ 31.636565] ? lock_downgrade+0x980/0x980 [ 31.636570] ? handle_mm_fault+0x410/0x8d0 [ 31.636573] ? down_read_trylock+0xdb/0x170 [ 31.636576] ? __do_page_fault+0x32d/0xc90 [ 31.636580] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 31.636584] ? vmacache_find+0x5f/0x280 [ 31.636589] do_group_exit+0x149/0x400 [ 31.636593] ? __do_page_fault+0x3d6/0xc90 [ 31.636596] ? SyS_exit+0x30/0x30 [ 31.636603] ? do_fast_syscall_32+0x156/0xf9d [ 31.636606] ? do_group_exit+0x400/0x400 [ 31.636610] SyS_exit_group+0x1d/0x20 [ 31.636613] do_fast_syscall_32+0x3ee/0xf9d [ 31.636618] ? do_int80_syscall_32+0x9d0/0x9d0 [ 31.636621] ? kasan_check_read+0x11/0x20 [ 31.636625] ? syscall_return_slowpath+0x550/0x550 [ 31.636630] ? SyS_rt_sigaction+0x94/0x1b0 [ 31.636634] ? SyS_sigprocmask+0x4b0/0x4b0 [ 31.636637] ? SyS_read+0x184/0x220 [ 31.636640] ? retint_user+0x18/0x18 [ 31.636645] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 31.636651] entry_SYSENTER_compat+0x54/0x63 [ 31.636654] RIP: 0023:0xf7fa9c79 [ 31.636657] RSP: 002b:00000000ffe66bac EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 31.636661] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 31.636663] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 31.636665] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 31.636667] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 31.636669] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 31.636673] [ 31.636675] Allocated by task 3154: [ 31.636679] save_stack+0x43/0xd0 [ 31.636681] kasan_kmalloc+0xad/0xe0 [ 31.636686] kmem_cache_alloc_trace+0x136/0x750 [ 31.636691] binder_get_thread+0x1cf/0x870 [ 31.636693] binder_poll+0x8c/0x390 [ 31.636696] ep_item_poll.isra.10+0xec/0x320 [ 31.636699] ep_insert+0x6a3/0x1b10 [ 31.636701] SyS_epoll_ctl+0x12e4/0x1ab0 [ 31.636704] do_fast_syscall_32+0x3ee/0xf9d [ 31.636708] entry_SYSENTER_compat+0x54/0x63 [ 31.636708] [ 31.636709] Freed by task 3154: [ 31.636712] save_stack+0x43/0xd0 [ 31.636715] kasan_slab_free+0x71/0xc0 [ 31.636717] kfree+0xd6/0x260 [ 31.636720] binder_thread_dec_tmpref+0x27f/0x310 [ 31.636723] binder_thread_release+0x27d/0x540 [ 31.636727] binder_ioctl+0xc02/0x1417 [ 31.636729] compat_SyS_ioctl+0x151/0x2a30 [ 31.636732] do_fast_syscall_32+0x3ee/0xf9d [ 31.636735] entry_SYSENTER_compat+0x54/0x63 [ 31.636736] [ 31.636739] The buggy address belongs to the object at ffff8801cf343580 [ 31.636739] which belongs to the cache kmalloc-512 of size 512 [ 31.636742] The buggy address is located 176 bytes inside of [ 31.636742] 512-byte region [ffff8801cf343580, ffff8801cf343780) [ 31.636743] The buggy address belongs to the page: [ 31.636747] page:0000000075828173 count:1 mapcount:0 mapping:000000002cdcef4f index:0x0 [ 31.636751] flags: 0x2fffc0000000100(slab) [ 31.636757] raw: 02fffc0000000100 ffff8801cf343080 0000000000000000 0000000100000006 [ 31.636761] raw: ffffea00073cd0a0 ffffea00073ccb60 ffff8801db000940 0000000000000000 [ 31.636762] page dumped because: kasan: bad access detected [ 31.636763] [ 31.636764] Memory state around the buggy address: [ 31.636767] ffff8801cf343500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.636769] ffff8801cf343580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.636772] >ffff8801cf343600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.636774] ^ [ 31.636776] ffff8801cf343680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.636779] ffff8801cf343700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.636780] ================================================================== [ 31.636781] Disabling lock debugging due to kernel taint [ 31.636784] Kernel panic - not syncing: panic_on_warn set ... [ 31.636784] [ 31.636787] CPU: 1 PID: 3154 Comm: syzkaller612270 Tainted: G B 4.15.0-rc5+ #147 [ 31.636789] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.636790] Call Trace: [ 31.636794] dump_stack+0x194/0x257 [ 31.636798] ? arch_local_irq_restore+0x53/0x53 [ 31.636801] ? kasan_end_report+0x32/0x50 [ 31.636805] ? lock_downgrade+0x980/0x980 [ 31.636809] ? vsnprintf+0x1ed/0x1900 [ 31.636813] ? __lock_acquire+0x3cd0/0x3e00 [ 31.636816] panic+0x1e4/0x41c [ 31.636819] ? refcount_error_report+0x214/0x214 [ 31.636823] ? add_taint+0x40/0x50 [ 31.636826] ? add_taint+0x1c/0x50 [ 31.636830] ? __lock_acquire+0x3d4d/0x3e00 [ 31.636833] kasan_end_report+0x50/0x50 [ 31.636836] kasan_report+0x144/0x340 [ 31.636841] __asan_report_load8_noabort+0x14/0x20 [ 31.636844] __lock_acquire+0x3d4d/0x3e00 [ 31.636847] ? __lock_acquire+0x664/0x3e00 [ 31.636855] ? lock_downgrade+0x980/0x980 [ 31.636859] ? lock_downgrade+0x980/0x980 [ 31.636862] ? print_irqtrace_events+0x270/0x270 [ 31.636866] ? remove_wait_queue+0x81/0x350 [ 31.636871] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.636874] ? __lock_acquire+0x664/0x3e00 [ 31.636878] ? check_noncircular+0x20/0x20 [ 31.636884] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.636888] ? lock_acquire+0x1d5/0x580 [ 31.636891] ? lock_acquire+0x1d5/0x580 [ 31.636894] ? ep_free+0xf4/0x320 [ 31.636898] ? lock_release+0xa40/0xa40 [ 31.636902] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.636905] ? print_irqtrace_events+0x270/0x270 [ 31.636908] ? print_irqtrace_events+0x270/0x270 [ 31.636912] ? rcu_note_context_switch+0x710/0x710 [ 31.636916] ? __might_sleep+0x95/0x190 [ 31.636919] ? ep_free+0xf4/0x320 [ 31.636922] ? __mutex_lock+0x16f/0x1a80 [ 31.636925] ? ep_free+0xf4/0x320 [ 31.636929] ? print_irqtrace_events+0x270/0x270 [ 31.636931] ? ep_free+0xf4/0x320 [ 31.636936] lock_acquire+0x1d5/0x580 [ 31.636939] ? lock_acquire+0x1d5/0x580 [ 31.636942] ? remove_wait_queue+0x81/0x350 [ 31.636947] ? lock_release+0xa40/0xa40 [ 31.636951] ? lock_acquire+0x1d5/0x580 [ 31.636955] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.636958] ? lock_acquire+0x1d5/0x580 [ 31.636961] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 31.636965] _raw_spin_lock_irqsave+0x96/0xc0 [ 31.636968] ? remove_wait_queue+0x81/0x350 [ 31.636972] remove_wait_queue+0x81/0x350 [ 31.636976] ? depot_save_stack+0x3b5/0x490 [ 31.636980] ? add_wait_queue+0x290/0x290 [ 31.636983] ? rcutorture_record_progress+0x10/0x10 [ 31.636986] ? lock_release+0xa40/0xa40 [ 31.636991] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 31.636995] ? __kernel_text_address+0xd/0x40 [ 31.636999] ? clear_tfile_check_list+0x370/0x370 [ 31.637006] ? check_noncircular+0x20/0x20 [ 31.637010] ? locks_remove_file+0x3fa/0x5a0 [ 31.637015] ep_free+0x13f/0x320 [ 31.637018] ? ep_remove+0x800/0x800 [ 31.637022] ? fsnotify_first_mark+0x2b0/0x2b0 [ 31.637026] ? ep_free+0x320/0x320 [ 31.637029] ep_eventpoll_release+0x44/0x60 [ 31.637032] __fput+0x327/0x7e0 [ 31.637037] ? fput+0x140/0x140 [ 31.637041] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.637045] ____fput+0x15/0x20 [ 31.637049] task_work_run+0x199/0x270 [ 31.637053] ? task_work_cancel+0x210/0x210 [ 31.637057] ? _raw_spin_unlock+0x22/0x30 [ 31.637060] ? switch_task_namespaces+0x87/0xc0 [ 31.637064] do_exit+0x9bb/0x1ad0 [ 31.637068] ? __handle_mm_fault+0x2330/0x3ce0 [ 31.637072] ? mm_update_next_owner+0x930/0x930 [ 31.637077] ? do_raw_spin_trylock+0x190/0x190 [ 31.637081] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 31.637085] ? check_noncircular+0x20/0x20 [ 31.637089] ? _raw_spin_unlock+0x22/0x30 [ 31.637092] ? __handle_mm_fault+0x80e/0x3ce0 [ 31.637096] ? check_noncircular+0x20/0x20 [ 31.637099] ? __pmd_alloc+0x4e0/0x4e0 [ 31.637102] ? lock_downgrade+0x980/0x980 [ 31.637106] ? find_held_lock+0x35/0x1d0 [ 31.637111] ? handle_mm_fault+0x248/0x8d0 [ 31.637115] ? find_held_lock+0x35/0x1d0 [ 31.637120] ? __do_page_fault+0x5f7/0xc90 [ 31.637123] ? lock_downgrade+0x980/0x980 [ 31.637128] ? handle_mm_fault+0x410/0x8d0 [ 31.637131] ? down_read_trylock+0xdb/0x170 [ 31.637134] ? __do_page_fault+0x32d/0xc90 [ 31.637138] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 31.637141] ? vmacache_find+0x5f/0x280 [ 31.637146] do_group_exit+0x149/0x400 [ 31.637150] ? __do_page_fault+0x3d6/0xc90 [ 31.637153] ? SyS_exit+0x30/0x30 [ 31.637157] ? do_fast_syscall_32+0x156/0xf9d [ 31.637161] ? do_group_exit+0x400/0x400 [ 31.637164] SyS_exit_group+0x1d/0x20 [ 31.637168] do_fast_syscall_32+0x3ee/0xf9d [ 31.637172] ? do_int80_syscall_32+0x9d0/0x9d0 [ 31.637176] ? kasan_check_read+0x11/0x20 [ 31.637180] ? syscall_return_slowpath+0x550/0x550 [ 31.637184] ? SyS_rt_sigaction+0x94/0x1b0 [ 31.637187] ? SyS_sigprocmask+0x4b0/0x4b0 [ 31.637190] ? SyS_read+0x184/0x220 [ 31.637193] ? retint_user+0x18/0x18 [ 31.637198] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 31.637203] entry_SYSENTER_compat+0x54/0x63 [ 31.637205] RIP: 0023:0xf7fa9c79 [ 31.637207] RSP: 002b:00000000ffe66bac EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 31.637211] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 31.637213] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 31.637214] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 31.637216] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 31.637218] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 31.657116] Dumping ftrace buffer: [ 31.657120] (ftrace buffer empty) [ 31.657123] Kernel Offset: disabled [ 32.939910] Rebooting in 86400 seconds..