[?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. [ 11.356839] audit: type=1400 audit(1513690521.266:6): avc: denied { map } for pid=3129 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-4,10.128.15.221' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 17.486367] audit: type=1400 audit(1513690527.396:7): avc: denied { map } for pid=3143 comm="syzkaller769787" path="/root/syzkaller769787780" 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 [ 17.491166] ================================================================== [ 17.491184] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 17.491189] Read of size 8 at addr ffff8801c8edb630 by task syzkaller769787/3143 [ 17.491190] [ 17.491199] CPU: 1 PID: 3143 Comm: syzkaller769787 Not tainted 4.15.0-rc4+ #138 [ 17.491202] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.491204] Call Trace: [ 17.491215] dump_stack+0x194/0x257 [ 17.491224] ? arch_local_irq_restore+0x53/0x53 [ 17.491231] ? show_regs_print_info+0x18/0x18 [ 17.491237] ? print_irqtrace_events+0x270/0x270 [ 17.491243] ? __lock_acquire+0x664/0x3e00 [ 17.491249] ? __lock_acquire+0x3d4d/0x3e00 [ 17.491258] print_address_description+0x73/0x250 [ 17.491264] ? __lock_acquire+0x3d4d/0x3e00 [ 17.491269] kasan_report+0x25b/0x340 [ 17.491277] __asan_report_load8_noabort+0x14/0x20 [ 17.491283] __lock_acquire+0x3d4d/0x3e00 [ 17.491288] ? __lock_acquire+0x664/0x3e00 [ 17.491294] ? lock_downgrade+0x980/0x980 [ 17.491299] ? lock_downgrade+0x980/0x980 [ 17.491305] ? print_irqtrace_events+0x270/0x270 [ 17.491312] ? remove_wait_queue+0x81/0x350 [ 17.491321] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.491328] ? __lock_acquire+0x664/0x3e00 [ 17.491333] ? check_noncircular+0x20/0x20 [ 17.491345] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.491352] ? lock_acquire+0x1d5/0x580 [ 17.491357] ? lock_acquire+0x1d5/0x580 [ 17.491363] ? ep_free+0xf4/0x320 [ 17.491371] ? lock_release+0xa40/0xa40 [ 17.491377] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.491383] ? print_irqtrace_events+0x270/0x270 [ 17.491388] ? print_irqtrace_events+0x270/0x270 [ 17.491395] ? rcu_note_context_switch+0x710/0x710 [ 17.491400] ? find_held_lock+0x35/0x1d0 [ 17.491407] ? __might_sleep+0x95/0x190 [ 17.491412] ? ep_free+0xf4/0x320 [ 17.491424] ? __mutex_lock+0x16f/0x1a80 [ 17.491428] ? ep_free+0xf4/0x320 [ 17.491435] ? print_irqtrace_events+0x270/0x270 [ 17.491439] ? ep_free+0xf4/0x320 [ 17.491447] lock_acquire+0x1d5/0x580 [ 17.491453] ? lock_acquire+0x1d5/0x580 [ 17.491458] ? remove_wait_queue+0x81/0x350 [ 17.491466] ? lock_release+0xa40/0xa40 [ 17.491475] ? lock_acquire+0x1d5/0x580 [ 17.491481] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.491486] ? lock_acquire+0x1d5/0x580 [ 17.491493] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.491500] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.491506] ? remove_wait_queue+0x81/0x350 [ 17.491512] remove_wait_queue+0x81/0x350 [ 17.491520] ? depot_save_stack+0x3b5/0x490 [ 17.491527] ? add_wait_queue+0x290/0x290 [ 17.491533] ? rcutorture_record_progress+0x10/0x10 [ 17.491538] ? lock_release+0xa40/0xa40 [ 17.491548] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.491556] ? __kernel_text_address+0xd/0x40 [ 17.491565] ? clear_tfile_check_list+0x370/0x370 [ 17.491572] ? check_noncircular+0x20/0x20 [ 17.491580] ? locks_remove_file+0x3fa/0x5a0 [ 17.491589] ep_free+0x13f/0x320 [ 17.491594] ? ep_remove+0x800/0x800 [ 17.491601] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.491608] ? ep_free+0x320/0x320 [ 17.491613] ep_eventpoll_release+0x44/0x60 [ 17.491620] __fput+0x327/0x7e0 [ 17.491628] ? fput+0x140/0x140 [ 17.491634] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.491642] ____fput+0x15/0x20 [ 17.491648] task_work_run+0x199/0x270 [ 17.491656] ? task_work_cancel+0x210/0x210 [ 17.491661] ? _raw_spin_unlock+0x22/0x30 [ 17.491668] ? switch_task_namespaces+0x87/0xc0 [ 17.491678] do_exit+0x9bb/0x1ad0 [ 17.491686] ? __handle_mm_fault+0x2330/0x3ce0 [ 17.491694] ? mm_update_next_owner+0x930/0x930 [ 17.491703] ? do_raw_spin_trylock+0x190/0x190 [ 17.491710] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.491716] ? check_noncircular+0x20/0x20 [ 17.491722] ? _raw_spin_unlock+0x22/0x30 [ 17.491728] ? __handle_mm_fault+0x80e/0x3ce0 [ 17.491735] ? check_noncircular+0x20/0x20 [ 17.491740] ? __pmd_alloc+0x4e0/0x4e0 [ 17.491745] ? lock_downgrade+0x980/0x980 [ 17.491753] ? find_held_lock+0x35/0x1d0 [ 17.491761] ? handle_mm_fault+0x248/0x8d0 [ 17.491768] ? find_held_lock+0x35/0x1d0 [ 17.491778] ? __do_page_fault+0x5f7/0xc90 [ 17.491784] ? lock_downgrade+0x980/0x980 [ 17.491792] ? handle_mm_fault+0x410/0x8d0 [ 17.491797] ? down_read_trylock+0xdb/0x170 [ 17.491803] ? __do_page_fault+0x32d/0xc90 [ 17.491808] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 17.491814] ? vmacache_find+0x5f/0x280 [ 17.491823] do_group_exit+0x149/0x400 [ 17.491829] ? __do_page_fault+0x3d6/0xc90 [ 17.491835] ? SyS_exit+0x30/0x30 [ 17.491845] ? do_fast_syscall_32+0x156/0xf9d [ 17.491851] ? do_group_exit+0x400/0x400 [ 17.491857] SyS_exit_group+0x1d/0x20 [ 17.491863] do_fast_syscall_32+0x3ee/0xf9d [ 17.491872] ? do_int80_syscall_32+0x9d0/0x9d0 [ 17.491877] ? kasan_check_read+0x11/0x20 [ 17.491884] ? syscall_return_slowpath+0x550/0x550 [ 17.491891] ? SyS_rt_sigaction+0x94/0x1b0 [ 17.491898] ? SyS_sigprocmask+0x4b0/0x4b0 [ 17.491902] ? SyS_read+0x184/0x220 [ 17.491907] ? retint_user+0x18/0x18 [ 17.491916] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 17.491924] entry_SYSENTER_compat+0x54/0x63 [ 17.491929] RIP: 0023:0xf7f1cc79 [ 17.491932] RSP: 002b:00000000ffa2db1c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 17.491939] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 17.491943] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 17.491946] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 17.491949] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 17.491952] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 17.491960] [ 17.491962] Allocated by task 3143: [ 17.491968] save_stack+0x43/0xd0 [ 17.491972] kasan_kmalloc+0xad/0xe0 [ 17.491978] kmem_cache_alloc_trace+0x136/0x750 [ 17.491985] binder_get_thread+0x1cf/0x870 [ 17.491989] binder_poll+0x8c/0x390 [ 17.491993] ep_item_poll.isra.10+0xec/0x320 [ 17.491997] ep_insert+0x6a3/0x1b10 [ 17.492005] SyS_epoll_ctl+0x12e4/0x1ab0 [ 17.492010] do_fast_syscall_32+0x3ee/0xf9d [ 17.492015] entry_SYSENTER_compat+0x54/0x63 [ 17.492016] [ 17.492018] Freed by task 3143: [ 17.492022] save_stack+0x43/0xd0 [ 17.492026] kasan_slab_free+0x71/0xc0 [ 17.492031] kfree+0xca/0x250 [ 17.492036] binder_thread_dec_tmpref+0x27f/0x310 [ 17.492040] binder_thread_release+0x27d/0x540 [ 17.492044] binder_ioctl+0xc02/0x1417 [ 17.492049] compat_SyS_ioctl+0x151/0x2a30 [ 17.492054] do_fast_syscall_32+0x3ee/0xf9d [ 17.492059] entry_SYSENTER_compat+0x54/0x63 [ 17.492060] [ 17.492064] The buggy address belongs to the object at ffff8801c8edb580 [ 17.492064] which belongs to the cache kmalloc-512 of size 512 [ 17.492069] The buggy address is located 176 bytes inside of [ 17.492069] 512-byte region [ffff8801c8edb580, ffff8801c8edb780) [ 17.492070] The buggy address belongs to the page: [ 17.492075] page:000000001bfe6ac1 count:1 mapcount:0 mapping:0000000035d819d5 index:0x0 [ 17.492081] flags: 0x2fffc0000000100(slab) [ 17.492089] raw: 02fffc0000000100 ffff8801c8edb080 0000000000000000 0000000100000006 [ 17.492096] raw: ffffea00072322e0 ffffea00072642e0 ffff8801db000940 0000000000000000 [ 17.492098] page dumped because: kasan: bad access detected [ 17.492099] [ 17.492101] Memory state around the buggy address: [ 17.492106] ffff8801c8edb500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.492110] ffff8801c8edb580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.492114] >ffff8801c8edb600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.492116] ^ [ 17.492120] ffff8801c8edb680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.492124] ffff8801c8edb700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.492126] ================================================================== [ 17.492128] Disabling lock debugging due to kernel taint [ 17.492131] Kernel panic - not syncing: panic_on_warn set ... [ 17.492131] [ 17.492137] CPU: 1 PID: 3143 Comm: syzkaller769787 Tainted: G B 4.15.0-rc4+ #138 [ 17.492140] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.492141] Call Trace: [ 17.492148] dump_stack+0x194/0x257 [ 17.492156] ? arch_local_irq_restore+0x53/0x53 [ 17.492160] ? kasan_end_report+0x32/0x50 [ 17.492167] ? lock_downgrade+0x980/0x980 [ 17.492172] ? vsnprintf+0x1ed/0x1900 [ 17.492178] ? __lock_acquire+0x3c90/0x3e00 [ 17.492184] panic+0x1e4/0x41c [ 17.492189] ? refcount_error_report+0x214/0x214 [ 17.492196] ? add_taint+0x40/0x50 [ 17.492201] ? add_taint+0x1c/0x50 [ 17.492208] ? __lock_acquire+0x3d4d/0x3e00 [ 17.492213] kasan_end_report+0x50/0x50 [ 17.492218] kasan_report+0x144/0x340 [ 17.492226] __asan_report_load8_noabort+0x14/0x20 [ 17.492231] __lock_acquire+0x3d4d/0x3e00 [ 17.492236] ? __lock_acquire+0x664/0x3e00 [ 17.492242] ? lock_downgrade+0x980/0x980 [ 17.492247] ? lock_downgrade+0x980/0x980 [ 17.492253] ? print_irqtrace_events+0x270/0x270 [ 17.492259] ? remove_wait_queue+0x81/0x350 [ 17.492268] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.492274] ? __lock_acquire+0x664/0x3e00 [ 17.492280] ? check_noncircular+0x20/0x20 [ 17.492291] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.492298] ? lock_acquire+0x1d5/0x580 [ 17.492303] ? lock_acquire+0x1d5/0x580 [ 17.492307] ? ep_free+0xf4/0x320 [ 17.492315] ? lock_release+0xa40/0xa40 [ 17.492321] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.492326] ? print_irqtrace_events+0x270/0x270 [ 17.492331] ? print_irqtrace_events+0x270/0x270 [ 17.492337] ? rcu_note_context_switch+0x710/0x710 [ 17.492342] ? find_held_lock+0x35/0x1d0 [ 17.492349] ? __might_sleep+0x95/0x190 [ 17.492354] ? ep_free+0xf4/0x320 [ 17.492360] ? __mutex_lock+0x16f/0x1a80 [ 17.492363] ? ep_free+0xf4/0x320 [ 17.492370] ? print_irqtrace_events+0x270/0x270 [ 17.492375] ? ep_free+0xf4/0x320 [ 17.492382] lock_acquire+0x1d5/0x580 [ 17.492388] ? lock_acquire+0x1d5/0x580 [ 17.492394] ? remove_wait_queue+0x81/0x350 [ 17.492401] ? lock_release+0xa40/0xa40 [ 17.492410] ? lock_acquire+0x1d5/0x580 [ 17.492419] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.492424] ? lock_acquire+0x1d5/0x580 [ 17.492431] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.492438] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.492444] ? remove_wait_queue+0x81/0x350 [ 17.492450] remove_wait_queue+0x81/0x350 [ 17.492455] ? depot_save_stack+0x3b5/0x490 [ 17.492462] ? add_wait_queue+0x290/0x290 [ 17.492467] ? rcutorture_record_progress+0x10/0x10 [ 17.492473] ? lock_release+0xa40/0xa40 [ 17.492482] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.492489] ? __kernel_text_address+0xd/0x40 [ 17.492497] ? clear_tfile_check_list+0x370/0x370 [ 17.492504] ? check_noncircular+0x20/0x20 [ 17.492511] ? locks_remove_file+0x3fa/0x5a0 [ 17.492519] ep_free+0x13f/0x320 [ 17.492525] ? ep_remove+0x800/0x800 [ 17.492531] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.492538] ? ep_free+0x320/0x320 [ 17.492543] ep_eventpoll_release+0x44/0x60 [ 17.492548] __fput+0x327/0x7e0 [ 17.492556] ? fput+0x140/0x140 [ 17.492562] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.492569] ____fput+0x15/0x20 [ 17.492575] task_work_run+0x199/0x270 [ 17.492582] ? task_work_cancel+0x210/0x210 [ 17.492588] ? _raw_spin_unlock+0x22/0x30 [ 17.492594] ? switch_task_namespaces+0x87/0xc0 [ 17.492601] do_exit+0x9bb/0x1ad0 [ 17.492606] ? __handle_mm_fault+0x2330/0x3ce0 [ 17.492614] ? mm_update_next_owner+0x930/0x930 [ 17.492623] ? do_raw_spin_trylock+0x190/0x190 [ 17.492630] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.492635] ? check_noncircular+0x20/0x20 [ 17.492641] ? _raw_spin_unlock+0x22/0x30 [ 17.492647] ? __handle_mm_fault+0x80e/0x3ce0 [ 17.492654] ? check_noncircular+0x20/0x20 [ 17.492659] ? __pmd_alloc+0x4e0/0x4e0 [ 17.492664] ? lock_downgrade+0x980/0x980 [ 17.492672] ? find_held_lock+0x35/0x1d0 [ 17.492680] ? handle_mm_fault+0x248/0x8d0 [ 17.492686] ? find_held_lock+0x35/0x1d0 [ 17.492695] ? __do_page_fault+0x5f7/0xc90 [ 17.492701] ? lock_downgrade+0x980/0x980 [ 17.492709] ? handle_mm_fault+0x410/0x8d0 [ 17.492714] ? down_read_trylock+0xdb/0x170 [ 17.492720] ? __do_page_fault+0x32d/0xc90 [ 17.492726] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 17.492731] ? vmacache_find+0x5f/0x280 [ 17.492739] do_group_exit+0x149/0x400 [ 17.492745] ? __do_page_fault+0x3d6/0xc90 [ 17.492751] ? SyS_exit+0x30/0x30 [ 17.492758] ? do_fast_syscall_32+0x156/0xf9d [ 17.492764] ? do_group_exit+0x400/0x400 [ 17.492770] SyS_exit_group+0x1d/0x20 [ 17.492777] do_fast_syscall_32+0x3ee/0xf9d [ 17.492785] ? do_int80_syscall_32+0x9d0/0x9d0 [ 17.492790] ? kasan_check_read+0x11/0x20 [ 17.492797] ? syscall_return_slowpath+0x550/0x550 [ 17.492804] ? SyS_rt_sigaction+0x94/0x1b0 [ 17.492810] ? SyS_sigprocmask+0x4b0/0x4b0 [ 17.492815] ? SyS_read+0x184/0x220 [ 17.492820] ? retint_user+0x18/0x18 [ 17.492828] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 17.492836] entry_SYSENTER_compat+0x54/0x63 [ 17.492840] RIP: 0023:0xf7f1cc79 [ 17.492842] RSP: 002b:00000000ffa2db1c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 17.492848] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f0298 [ 17.492852] RDX: 0000000000000000 RSI: 00000000080d9ad8 RDI: 00000000080f02a0 [ 17.492855] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 17.492858] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 17.492861] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 17.512627] Dumping ftrace buffer: [ 17.512630] (ftrace buffer empty) [ 17.512633] Kernel Offset: disabled [ 18.800557] Rebooting in 86400 seconds..