[?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.484265] audit: type=1400 audit(1513704587.324:6): avc: denied { map } for pid=3126 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-8,10.128.0.52' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 17.639903] audit: type=1400 audit(1513704593.479:7): avc: denied { map } for pid=3140 comm="syzkaller553004" path="/root/syzkaller553004931" 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.644414] ================================================================== [ 17.644432] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 17.644437] Read of size 8 at addr ffff8801ca331d70 by task syzkaller553004/3140 [ 17.644438] [ 17.644446] CPU: 0 PID: 3140 Comm: syzkaller553004 Not tainted 4.15.0-rc4+ #228 [ 17.644450] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.644452] Call Trace: [ 17.644463] dump_stack+0x194/0x257 [ 17.644472] ? arch_local_irq_restore+0x53/0x53 [ 17.644485] ? show_regs_print_info+0x18/0x18 [ 17.644491] ? print_irqtrace_events+0x270/0x270 [ 17.644497] ? __lock_acquire+0x664/0x3e00 [ 17.644503] ? __lock_acquire+0x3d4d/0x3e00 [ 17.644512] print_address_description+0x73/0x250 [ 17.644518] ? __lock_acquire+0x3d4d/0x3e00 [ 17.644524] kasan_report+0x25b/0x340 [ 17.644532] __asan_report_load8_noabort+0x14/0x20 [ 17.644537] __lock_acquire+0x3d4d/0x3e00 [ 17.644542] ? __lock_acquire+0x664/0x3e00 [ 17.644548] ? lock_downgrade+0x980/0x980 [ 17.644553] ? lock_downgrade+0x980/0x980 [ 17.644563] ? remove_wait_queue+0x81/0x350 [ 17.644573] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.644579] ? __lock_acquire+0x664/0x3e00 [ 17.644584] ? check_noncircular+0x20/0x20 [ 17.644597] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.644604] ? lock_acquire+0x1d5/0x580 [ 17.644609] ? lock_acquire+0x1d5/0x580 [ 17.644615] ? ep_free+0xf4/0x320 [ 17.644623] ? lock_release+0xa40/0xa40 [ 17.644631] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.644637] ? print_irqtrace_events+0x270/0x270 [ 17.644646] ? rcu_note_context_switch+0x710/0x710 [ 17.644653] ? __might_sleep+0x95/0x190 [ 17.644658] ? ep_free+0xf4/0x320 [ 17.644665] ? __mutex_lock+0x16f/0x1a80 [ 17.644669] ? ep_free+0xf4/0x320 [ 17.644676] ? print_irqtrace_events+0x270/0x270 [ 17.644680] ? ep_free+0xf4/0x320 [ 17.644688] lock_acquire+0x1d5/0x580 [ 17.644694] ? lock_acquire+0x1d5/0x580 [ 17.644699] ? remove_wait_queue+0x81/0x350 [ 17.644705] ? __lock_acquire+0x664/0x3e00 [ 17.644712] ? lock_release+0xa40/0xa40 [ 17.644721] ? lock_acquire+0x1d5/0x580 [ 17.644726] ? lock_acquire+0x1d5/0x580 [ 17.644733] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.644741] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.644746] ? remove_wait_queue+0x81/0x350 [ 17.644752] remove_wait_queue+0x81/0x350 [ 17.644760] ? add_wait_queue+0x290/0x290 [ 17.644765] ? rcutorture_record_progress+0x10/0x10 [ 17.644776] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.644783] ? __kernel_text_address+0xd/0x40 [ 17.644792] ? clear_tfile_check_list+0x370/0x370 [ 17.644799] ? check_noncircular+0x20/0x20 [ 17.644807] ? locks_remove_file+0x3fa/0x5a0 [ 17.644816] ep_free+0x13f/0x320 [ 17.644821] ? ep_remove+0x800/0x800 [ 17.644827] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.644834] ? ep_free+0x320/0x320 [ 17.644840] ep_eventpoll_release+0x44/0x60 [ 17.644846] __fput+0x327/0x7e0 [ 17.644853] ? fput+0x140/0x140 [ 17.644859] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.644867] ____fput+0x15/0x20 [ 17.644874] task_work_run+0x199/0x270 [ 17.644881] ? task_work_cancel+0x210/0x210 [ 17.644887] ? _raw_spin_unlock+0x22/0x30 [ 17.644892] ? switch_task_namespaces+0x87/0xc0 [ 17.644901] do_exit+0x9bb/0x1ad0 [ 17.644910] ? binder_ioctl+0x4e1/0x1417 [ 17.644916] ? mm_update_next_owner+0x930/0x930 [ 17.644923] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 17.644934] ? avc_ss_reset+0x110/0x110 [ 17.644940] ? mutex_unlock+0xd/0x10 [ 17.644945] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 17.644964] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.644969] ? up_read+0x1a/0x40 [ 17.644975] ? rcu_note_context_switch+0x710/0x710 [ 17.644981] ? __fd_install+0x288/0x740 [ 17.644990] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 17.644996] ? do_vfs_ioctl+0x486/0x1520 [ 17.645005] ? _cond_resched+0x14/0x30 [ 17.645013] ? ioctl_preallocate+0x2b0/0x2b0 [ 17.645020] ? selinux_capable+0x40/0x40 [ 17.645027] ? __alloc_fd+0x750/0x750 [ 17.645035] do_group_exit+0x149/0x400 [ 17.645042] ? SyS_exit+0x30/0x30 [ 17.645048] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.645057] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.645064] SyS_exit_group+0x1d/0x20 [ 17.645070] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.645075] RIP: 0033:0x4429f8 [ 17.645078] RSP: 002b:00007fff2aea0cd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 17.645085] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 17.645088] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 17.645092] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 17.645095] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 17.645098] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 17.645106] [ 17.645109] Allocated by task 3140: [ 17.645115] save_stack+0x43/0xd0 [ 17.645119] kasan_kmalloc+0xad/0xe0 [ 17.645126] kmem_cache_alloc_trace+0x136/0x750 [ 17.645130] binder_get_thread+0x1cf/0x870 [ 17.645134] binder_poll+0x8c/0x390 [ 17.645138] ep_item_poll.isra.10+0xec/0x320 [ 17.645143] ep_insert+0x6a3/0x1b10 [ 17.645147] SyS_epoll_ctl+0x12e4/0x1ab0 [ 17.645152] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.645153] [ 17.645155] Freed by task 3140: [ 17.645159] save_stack+0x43/0xd0 [ 17.645163] kasan_slab_free+0x71/0xc0 [ 17.645168] kfree+0xca/0x250 [ 17.645173] binder_thread_dec_tmpref+0x27f/0x310 [ 17.645177] binder_thread_release+0x27d/0x540 [ 17.645182] binder_ioctl+0xc02/0x1417 [ 17.645187] do_vfs_ioctl+0x1b1/0x1520 [ 17.645191] SyS_ioctl+0x8f/0xc0 [ 17.645196] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.645197] [ 17.645202] The buggy address belongs to the object at ffff8801ca331cc0 [ 17.645202] which belongs to the cache kmalloc-512 of size 512 [ 17.645206] The buggy address is located 176 bytes inside of [ 17.645206] 512-byte region [ffff8801ca331cc0, ffff8801ca331ec0) [ 17.645208] The buggy address belongs to the page: [ 17.645214] page:000000008b880560 count:1 mapcount:0 mapping:0000000032d68a5c index:0x0 [ 17.645219] flags: 0x2fffc0000000100(slab) [ 17.645228] raw: 02fffc0000000100 ffff8801ca331040 0000000000000000 0000000100000006 [ 17.645234] raw: ffffea0007288660 ffffea000728ea60 ffff8801db000940 0000000000000000 [ 17.645237] page dumped because: kasan: bad access detected [ 17.645238] [ 17.645239] Memory state around the buggy address: [ 17.645244] ffff8801ca331c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.645248] ffff8801ca331c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 17.645252] >ffff8801ca331d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.645255] ^ [ 17.645259] ffff8801ca331d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.645263] ffff8801ca331e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.645265] ================================================================== [ 17.645267] Disabling lock debugging due to kernel taint [ 17.645270] Kernel panic - not syncing: panic_on_warn set ... [ 17.645270] [ 17.645276] CPU: 0 PID: 3140 Comm: syzkaller553004 Tainted: G B 4.15.0-rc4+ #228 [ 17.645280] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 17.645281] Call Trace: [ 17.645288] dump_stack+0x194/0x257 [ 17.645295] ? arch_local_irq_restore+0x53/0x53 [ 17.645300] ? kasan_end_report+0x32/0x50 [ 17.645306] ? lock_downgrade+0x980/0x980 [ 17.645311] ? vsnprintf+0x1ed/0x1900 [ 17.645318] ? __lock_acquire+0x3c90/0x3e00 [ 17.645323] panic+0x1e4/0x41c [ 17.645329] ? refcount_error_report+0x214/0x214 [ 17.645336] ? add_taint+0x40/0x50 [ 17.645340] ? add_taint+0x1c/0x50 [ 17.645347] ? __lock_acquire+0x3d4d/0x3e00 [ 17.645352] kasan_end_report+0x50/0x50 [ 17.645357] kasan_report+0x144/0x340 [ 17.645365] __asan_report_load8_noabort+0x14/0x20 [ 17.645370] __lock_acquire+0x3d4d/0x3e00 [ 17.645376] ? __lock_acquire+0x664/0x3e00 [ 17.645381] ? lock_downgrade+0x980/0x980 [ 17.645386] ? lock_downgrade+0x980/0x980 [ 17.645393] ? remove_wait_queue+0x81/0x350 [ 17.645402] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.645408] ? __lock_acquire+0x664/0x3e00 [ 17.645413] ? check_noncircular+0x20/0x20 [ 17.645425] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 17.645432] ? lock_acquire+0x1d5/0x580 [ 17.645437] ? lock_acquire+0x1d5/0x580 [ 17.645442] ? ep_free+0xf4/0x320 [ 17.645450] ? lock_release+0xa40/0xa40 [ 17.645456] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.645461] ? print_irqtrace_events+0x270/0x270 [ 17.645468] ? rcu_note_context_switch+0x710/0x710 [ 17.645479] ? __might_sleep+0x95/0x190 [ 17.645484] ? ep_free+0xf4/0x320 [ 17.645490] ? __mutex_lock+0x16f/0x1a80 [ 17.645495] ? ep_free+0xf4/0x320 [ 17.645501] ? print_irqtrace_events+0x270/0x270 [ 17.645505] ? ep_free+0xf4/0x320 [ 17.645513] lock_acquire+0x1d5/0x580 [ 17.645519] ? lock_acquire+0x1d5/0x580 [ 17.645524] ? remove_wait_queue+0x81/0x350 [ 17.645530] ? __lock_acquire+0x664/0x3e00 [ 17.645537] ? lock_release+0xa40/0xa40 [ 17.645546] ? lock_acquire+0x1d5/0x580 [ 17.645551] ? lock_acquire+0x1d5/0x580 [ 17.645557] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 17.645564] _raw_spin_lock_irqsave+0x96/0xc0 [ 17.645570] ? remove_wait_queue+0x81/0x350 [ 17.645576] remove_wait_queue+0x81/0x350 [ 17.645583] ? add_wait_queue+0x290/0x290 [ 17.645589] ? rcutorture_record_progress+0x10/0x10 [ 17.645599] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 17.645605] ? __kernel_text_address+0xd/0x40 [ 17.645613] ? clear_tfile_check_list+0x370/0x370 [ 17.645621] ? check_noncircular+0x20/0x20 [ 17.645628] ? locks_remove_file+0x3fa/0x5a0 [ 17.645636] ep_free+0x13f/0x320 [ 17.645641] ? ep_remove+0x800/0x800 [ 17.645647] ? fsnotify_first_mark+0x2b0/0x2b0 [ 17.645654] ? ep_free+0x320/0x320 [ 17.645659] ep_eventpoll_release+0x44/0x60 [ 17.645664] __fput+0x327/0x7e0 [ 17.645672] ? fput+0x140/0x140 [ 17.645678] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.645685] ____fput+0x15/0x20 [ 17.645691] task_work_run+0x199/0x270 [ 17.645699] ? task_work_cancel+0x210/0x210 [ 17.645704] ? _raw_spin_unlock+0x22/0x30 [ 17.645710] ? switch_task_namespaces+0x87/0xc0 [ 17.645717] do_exit+0x9bb/0x1ad0 [ 17.645724] ? binder_ioctl+0x4e1/0x1417 [ 17.645730] ? mm_update_next_owner+0x930/0x930 [ 17.645737] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 17.645746] ? avc_ss_reset+0x110/0x110 [ 17.645752] ? mutex_unlock+0xd/0x10 [ 17.645757] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 17.645775] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 17.645779] ? up_read+0x1a/0x40 [ 17.645786] ? rcu_note_context_switch+0x710/0x710 [ 17.645791] ? __fd_install+0x288/0x740 [ 17.645799] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 17.645805] ? do_vfs_ioctl+0x486/0x1520 [ 17.645811] ? _cond_resched+0x14/0x30 [ 17.645819] ? ioctl_preallocate+0x2b0/0x2b0 [ 17.645825] ? selinux_capable+0x40/0x40 [ 17.645832] ? __alloc_fd+0x750/0x750 [ 17.645840] do_group_exit+0x149/0x400 [ 17.645846] ? SyS_exit+0x30/0x30 [ 17.645853] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.645861] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.645868] SyS_exit_group+0x1d/0x20 [ 17.645874] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 17.645877] RIP: 0033:0x4429f8 [ 17.645880] RSP: 002b:00007fff2aea0cd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 17.645886] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 17.645889] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 17.645892] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 17.645896] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 17.645899] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 17.666218] Dumping ftrace buffer: [ 17.666221] (ftrace buffer empty) [ 17.666224] Kernel Offset: disabled [ 18.790549] Rebooting in 86400 seconds..