[ 10.309867] mcstransd (3035) used greatest stack depth: 14944 bytes left [....] 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.478819] audit: type=1400 audit(1514166441.099:6): avc: denied { map } for pid=3123 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-mmots-kasan-gce-1,10.128.0.38' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 17.703799] audit: type=1400 audit(1514166447.324:7): avc: denied { map } for pid=3137 comm="syzkaller428901" path="/root/syzkaller428901687" 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.707510] ================================================================== [ 17.707524] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 17.707529] Read of size 8 at addr ffff8801ca00cb38 by task syzkaller428901/3137 [ 17.707531] [ 17.707537] CPU: 1 PID: 3137 Comm: syzkaller428901 Not tainted 4.15.0-rc4-mm1+ #49 [ 17.707541] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.707542] Call Trace: [ 17.707552] dump_stack+0x194/0x257 [ 17.707559] ? arch_local_irq_restore+0x53/0x53 [ 17.707568] ? show_regs_print_info+0x18/0x18 [ 17.707573] ? print_irqtrace_events+0x270/0x270 [ 17.707579] ? __lock_acquire+0x664/0x3e00 [ 17.707586] ? __lock_acquire+0x3d4d/0x3e00 [ 17.707595] print_address_description+0x73/0x250 [ 17.707601] ? __lock_acquire+0x3d4d/0x3e00 [ 17.707607] kasan_report+0x23b/0x360 [ 17.707615] __asan_report_load8_noabort+0x14/0x20 [ 17.707621] __lock_acquire+0x3d4d/0x3e00 [ 17.707627] ? __lock_acquire+0x664/0x3e00 [ 17.707632] ? lock_downgrade+0x980/0x980 [ 17.707637] ? lock_downgrade+0x980/0x980 [ 17.707646] ? remove_wait_queue+0x81/0x350 [ 17.707655] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.707661] ? __lock_acquire+0x664/0x3e00 [ 17.707667] ? check_noncircular+0x20/0x20 [ 17.707679] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.707686] ? lock_acquire+0x1d5/0x580 [ 17.707692] ? lock_acquire+0x1d5/0x580 [ 17.707699] ? ep_free+0xf4/0x320 [ 17.707707] ? lock_release+0xa40/0xa40 [ 17.707714] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.707720] ? print_irqtrace_events+0x270/0x270 [ 17.707727] ? rcu_note_context_switch+0x710/0x710 [ 17.707734] ? __might_sleep+0x95/0x190 [ 17.707740] ? ep_free+0xf4/0x320 [ 17.707746] ? __mutex_lock+0x16f/0x1a80 [ 17.707751] ? ep_free+0xf4/0x320 [ 17.707758] ? print_irqtrace_events+0x270/0x270 [ 17.707763] ? ep_free+0xf4/0x320 [ 17.707771] lock_acquire+0x1d5/0x580 [ 17.707776] ? lock_acquire+0x1d5/0x580 [ 17.707782] ? remove_wait_queue+0x81/0x350 [ 17.707788] ? __lock_acquire+0x664/0x3e00 [ 17.707795] ? lock_release+0xa40/0xa40 [ 17.707810] ? lock_acquire+0x1d5/0x580 [ 17.707815] ? lock_acquire+0x1d5/0x580 [ 17.707821] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.707829] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.707834] ? remove_wait_queue+0x81/0x350 [ 17.707841] remove_wait_queue+0x81/0x350 [ 17.707848] ? add_wait_queue+0x290/0x290 [ 17.707854] ? rcutorture_record_progress+0x10/0x10 [ 17.707864] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.707872] ? __kernel_text_address+0xd/0x40 [ 17.707880] ? clear_tfile_check_list+0x370/0x370 [ 17.707888] ? check_noncircular+0x20/0x20 [ 17.707896] ? locks_remove_file+0x3fa/0x5a0 [ 17.707906] ep_free+0x13f/0x320 [ 17.707912] ? ep_remove+0x800/0x800 [ 17.707918] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.707925] ? ep_free+0x320/0x320 [ 17.707931] ep_eventpoll_release+0x44/0x60 [ 17.707938] __fput+0x327/0x7e0 [ 17.707946] ? fput+0x140/0x140 [ 17.707952] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.707961] ____fput+0x15/0x20 [ 17.707967] task_work_run+0x199/0x270 [ 17.707975] ? task_work_cancel+0x210/0x210 [ 17.707981] ? _raw_spin_unlock+0x22/0x30 [ 17.707987] ? switch_task_namespaces+0x87/0xc0 [ 17.707996] do_exit+0x9bb/0x1ad0 [ 17.708007] ? binder_ioctl+0x551/0x1417 [ 17.708013] ? mm_update_next_owner+0x930/0x930 [ 17.708021] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.708031] ? avc_ss_reset+0x110/0x110 [ 17.708038] ? mutex_unlock+0xd/0x10 [ 17.708043] ? SyS_epoll_ctl+0x30a/0x1a80 [ 17.708063] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.708068] ? up_read+0x1a/0x40 [ 17.708074] ? rcu_note_context_switch+0x710/0x710 [ 17.708079] ? __fd_install+0x288/0x740 [ 17.708088] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.708094] ? do_vfs_ioctl+0x486/0x1520 [ 17.708099] ? _cond_resched+0x14/0x30 [ 17.708107] ? ioctl_preallocate+0x2b0/0x2b0 [ 17.708114] ? selinux_capable+0x40/0x40 [ 17.708120] ? __alloc_fd+0x750/0x750 [ 17.708129] do_group_exit+0x149/0x400 [ 17.708136] ? SyS_exit+0x30/0x30 [ 17.708142] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.708149] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.708157] SyS_exit_group+0x1d/0x20 [ 17.708163] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.708167] RIP: 0033:0x442a48 [ 17.708170] RSP: 002b:00007fffde65ef68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 17.708177] RAX: ffffffffffffffda RBX: 6e69622f7665642f RCX: 0000000000442a48 [ 17.708180] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 17.708183] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 17.708187] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a90 [ 17.708190] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 17.708198] [ 17.708201] Allocated by task 3137: [ 17.708207] save_stack+0x43/0xd0 [ 17.708211] kasan_kmalloc+0xad/0xe0 [ 17.708216] kmem_cache_alloc_trace+0x136/0x750 [ 17.708220] binder_get_thread+0x1cf/0x870 [ 17.708225] binder_poll+0x8c/0x390 [ 17.708230] ep_item_poll.isra.10+0xf2/0x320 [ 17.708234] ep_insert+0x6a2/0x1ac0 [ 17.708239] SyS_epoll_ctl+0x12bf/0x1a80 [ 17.708244] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.708245] [ 17.708247] Freed by task 3137: [ 17.708252] save_stack+0x43/0xd0 [ 17.708257] kasan_slab_free+0x71/0xc0 [ 17.708260] kfree+0xd6/0x260 [ 17.708265] binder_thread_dec_tmpref+0x27f/0x310 [ 17.708270] binder_thread_release+0x27d/0x540 [ 17.708274] binder_ioctl+0xc02/0x1417 [ 17.708278] do_vfs_ioctl+0x1b1/0x1520 [ 17.708283] SyS_ioctl+0x8f/0xc0 [ 17.708287] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.708288] [ 17.708292] The buggy address belongs to the object at ffff8801ca00ca80 [ 17.708292] which belongs to the cache kmalloc-512 of size 512 [ 17.708297] The buggy address is located 184 bytes inside of [ 17.708297] 512-byte region [ffff8801ca00ca80, ffff8801ca00cc80) [ 17.708299] The buggy address belongs to the page: [ 17.708303] page:ffffea0007280300 count:1 mapcount:0 mapping:ffff8801ca00c080 index:0xffff8801ca00c800 [ 17.708308] flags: 0x2fffc0000000100(slab) [ 17.708317] raw: 02fffc0000000100 ffff8801ca00c080 ffff8801ca00c800 0000000100000004 [ 17.708324] raw: ffffea00073f6d60 ffffea0007280060 ffff8801dac00940 0000000000000000 [ 17.708326] page dumped because: kasan: bad access detected [ 17.708327] [ 17.708328] Memory state around the buggy address: [ 17.708333] ffff8801ca00ca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.708338] ffff8801ca00ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.708342] >ffff8801ca00cb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.708344] ^ [ 17.708348] ffff8801ca00cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.708352] ffff8801ca00cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.708354] ================================================================== [ 17.708356] Disabling lock debugging due to kernel taint [ 17.708359] Kernel panic - not syncing: panic_on_warn set ... [ 17.708359] [ 17.708364] CPU: 1 PID: 3137 Comm: syzkaller428901 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 17.708367] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.708369] Call Trace: [ 17.708375] dump_stack+0x194/0x257 [ 17.708381] ? arch_local_irq_restore+0x53/0x53 [ 17.708386] ? kasan_end_report+0x32/0x50 [ 17.708393] ? lock_downgrade+0x980/0x980 [ 17.708398] ? vsnprintf+0x1ed/0x1900 [ 17.708404] ? __lock_acquire+0x3c90/0x3e00 [ 17.708410] panic+0x1e4/0x41c [ 17.708416] ? refcount_error_report+0x214/0x214 [ 17.708423] ? add_taint+0x40/0x50 [ 17.708428] ? add_taint+0x1c/0x50 [ 17.708435] ? __lock_acquire+0x3d4d/0x3e00 [ 17.708441] kasan_end_report+0x50/0x50 [ 17.708446] kasan_report+0x148/0x360 [ 17.708455] __asan_report_load8_noabort+0x14/0x20 [ 17.708460] __lock_acquire+0x3d4d/0x3e00 [ 17.708466] ? __lock_acquire+0x664/0x3e00 [ 17.708471] ? lock_downgrade+0x980/0x980 [ 17.708477] ? lock_downgrade+0x980/0x980 [ 17.708484] ? remove_wait_queue+0x81/0x350 [ 17.708493] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.708499] ? __lock_acquire+0x664/0x3e00 [ 17.708504] ? check_noncircular+0x20/0x20 [ 17.708516] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.708523] ? lock_acquire+0x1d5/0x580 [ 17.708528] ? lock_acquire+0x1d5/0x580 [ 17.708533] ? ep_free+0xf4/0x320 [ 17.708541] ? lock_release+0xa40/0xa40 [ 17.708547] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.708553] ? print_irqtrace_events+0x270/0x270 [ 17.708559] ? rcu_note_context_switch+0x710/0x710 [ 17.708566] ? __might_sleep+0x95/0x190 [ 17.708572] ? ep_free+0xf4/0x320 [ 17.708577] ? __mutex_lock+0x16f/0x1a80 [ 17.708582] ? ep_free+0xf4/0x320 [ 17.708589] ? print_irqtrace_events+0x270/0x270 [ 17.708594] ? ep_free+0xf4/0x320 [ 17.708602] lock_acquire+0x1d5/0x580 [ 17.708607] ? lock_acquire+0x1d5/0x580 [ 17.708612] ? remove_wait_queue+0x81/0x350 [ 17.708618] ? __lock_acquire+0x664/0x3e00 [ 17.708625] ? lock_release+0xa40/0xa40 [ 17.708634] ? lock_acquire+0x1d5/0x580 [ 17.708639] ? lock_acquire+0x1d5/0x580 [ 17.708645] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.708653] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.708658] ? remove_wait_queue+0x81/0x350 [ 17.708665] remove_wait_queue+0x81/0x350 [ 17.708672] ? add_wait_queue+0x290/0x290 [ 17.708678] ? rcutorture_record_progress+0x10/0x10 [ 17.708688] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.708694] ? __kernel_text_address+0xd/0x40 [ 17.708702] ? clear_tfile_check_list+0x370/0x370 [ 17.708709] ? check_noncircular+0x20/0x20 [ 17.708717] ? locks_remove_file+0x3fa/0x5a0 [ 17.708726] ep_free+0x13f/0x320 [ 17.708732] ? ep_remove+0x800/0x800 [ 17.708737] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.708745] ? ep_free+0x320/0x320 [ 17.708750] ep_eventpoll_release+0x44/0x60 [ 17.708756] __fput+0x327/0x7e0 [ 17.708764] ? fput+0x140/0x140 [ 17.708770] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.708778] ____fput+0x15/0x20 [ 17.708785] task_work_run+0x199/0x270 [ 17.708792] ? task_work_cancel+0x210/0x210 [ 17.708798] ? _raw_spin_unlock+0x22/0x30 [ 17.708808] ? switch_task_namespaces+0x87/0xc0 [ 17.708815] do_exit+0x9bb/0x1ad0 [ 17.708822] ? binder_ioctl+0x551/0x1417 [ 17.708828] ? mm_update_next_owner+0x930/0x930 [ 17.708836] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.708844] ? avc_ss_reset+0x110/0x110 [ 17.708850] ? mutex_unlock+0xd/0x10 [ 17.708855] ? SyS_epoll_ctl+0x30a/0x1a80 [ 17.708873] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.708878] ? up_read+0x1a/0x40 [ 17.708885] ? rcu_note_context_switch+0x710/0x710 [ 17.708889] ? __fd_install+0x288/0x740 [ 17.708898] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 17.708903] ? do_vfs_ioctl+0x486/0x1520 [ 17.708908] ? _cond_resched+0x14/0x30 [ 17.708915] ? ioctl_preallocate+0x2b0/0x2b0 [ 17.708922] ? selinux_capable+0x40/0x40 [ 17.708928] ? __alloc_fd+0x750/0x750 [ 17.708936] do_group_exit+0x149/0x400 [ 17.708943] ? SyS_exit+0x30/0x30 [ 17.708950] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.708956] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.708963] SyS_exit_group+0x1d/0x20 [ 17.708969] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.708973] RIP: 0033:0x442a48 [ 17.708976] RSP: 002b:00007fffde65ef68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 17.708981] RAX: ffffffffffffffda RBX: 6e69622f7665642f RCX: 0000000000442a48 [ 17.708984] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 17.708988] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 17.708991] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a90 [ 17.708994] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 17.730566] Dumping ftrace buffer: [ 17.730570] (ftrace buffer empty) [ 17.730573] Kernel Offset: disabled [ 18.854602] Rebooting in 86400 seconds..