[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.383337] audit: type=1400 audit(1513655847.289: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-kasan-gce-4,10.128.0.17' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.478521] audit: type=1400 audit(1513655869.384:7): avc: denied { map } for pid=3142 comm="syzkaller337880" path="/root/syzkaller337880372" 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 [ 33.482085] ================================================================== [ 33.482097] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 33.482100] Read of size 8 at addr ffff8801c964e3f0 by task syzkaller337880/3142 [ 33.482101] [ 33.482106] CPU: 1 PID: 3142 Comm: syzkaller337880 Not tainted 4.15.0-rc4+ #228 [ 33.482109] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.482111] Call Trace: [ 33.482118] dump_stack+0x194/0x257 [ 33.482124] ? arch_local_irq_restore+0x53/0x53 [ 33.482130] ? show_regs_print_info+0x18/0x18 [ 33.482134] ? __lock_acquire+0x3d4d/0x3e00 [ 33.482140] print_address_description+0x73/0x250 [ 33.482143] ? __lock_acquire+0x3d4d/0x3e00 [ 33.482147] kasan_report+0x25b/0x340 [ 33.482151] __asan_report_load8_noabort+0x14/0x20 [ 33.482155] __lock_acquire+0x3d4d/0x3e00 [ 33.482158] ? print_irqtrace_events+0x270/0x270 [ 33.482164] ? unwind_get_return_address+0x61/0xa0 [ 33.482170] ? remove_wait_queue+0x81/0x350 [ 33.482175] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482179] ? __lock_acquire+0x664/0x3e00 [ 33.482183] ? print_irqtrace_events+0x270/0x270 [ 33.482186] ? __lock_acquire+0x664/0x3e00 [ 33.482192] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482197] ? __lock_acquire+0x664/0x3e00 [ 33.482201] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482204] ? __lock_acquire+0x664/0x3e00 [ 33.482208] ? check_noncircular+0x20/0x20 [ 33.482212] ? check_noncircular+0x20/0x20 [ 33.482217] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482220] ? check_noncircular+0x20/0x20 [ 33.482225] ? __lock_is_held+0xb6/0x140 [ 33.482230] lock_acquire+0x1d5/0x580 [ 33.482234] ? lock_acquire+0x1d5/0x580 [ 33.482237] ? remove_wait_queue+0x81/0x350 [ 33.482240] ? find_held_lock+0x35/0x1d0 [ 33.482245] ? lock_release+0xa40/0xa40 [ 33.482248] ? print_irqtrace_events+0x270/0x270 [ 33.482253] ? lock_acquire+0x1d5/0x580 [ 33.482256] ? lock_acquire+0x1d5/0x580 [ 33.482263] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 33.482268] _raw_spin_lock_irqsave+0x96/0xc0 [ 33.482272] ? remove_wait_queue+0x81/0x350 [ 33.482275] remove_wait_queue+0x81/0x350 [ 33.482278] ? eventpoll_release_file+0xba/0x140 [ 33.482287] ? add_wait_queue+0x290/0x290 [ 33.482291] ? rcutorture_record_progress+0x10/0x10 [ 33.482297] ? mutex_lock_io_nested+0x1900/0x1900 [ 33.482303] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 33.482307] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482312] ? clear_tfile_check_list+0x370/0x370 [ 33.482316] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482320] ? rcutorture_record_progress+0x10/0x10 [ 33.482327] ? is_bpf_text_address+0xa4/0x120 [ 33.482331] ep_remove+0xcd/0x800 [ 33.482335] ? unwind_get_return_address+0x61/0xa0 [ 33.482339] ? ep_destroy_wakeup_source+0x240/0x240 [ 33.482342] ? check_noncircular+0x20/0x20 [ 33.482346] ? check_noncircular+0x20/0x20 [ 33.482352] ? fsnotify+0x7b3/0x1140 [ 33.482359] eventpoll_release_file+0xc5/0x140 [ 33.482364] __fput+0x5f1/0x7e0 [ 33.482369] ? fput+0x140/0x140 [ 33.482373] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.482377] ____fput+0x15/0x20 [ 33.482382] task_work_run+0x199/0x270 [ 33.482387] ? task_work_cancel+0x210/0x210 [ 33.482390] ? _raw_spin_unlock+0x22/0x30 [ 33.482395] ? switch_task_namespaces+0x87/0xc0 [ 33.482401] do_exit+0x9bb/0x1ad0 [ 33.482407] ? binder_ioctl+0x4e1/0x1417 [ 33.482411] ? mm_update_next_owner+0x930/0x930 [ 33.482415] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 33.482422] ? avc_ss_reset+0x110/0x110 [ 33.482425] ? mutex_unlock+0xd/0x10 [ 33.482429] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 33.482440] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 33.482443] ? up_read+0x1a/0x40 [ 33.482448] ? rcu_note_context_switch+0x710/0x710 [ 33.482453] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 33.482457] ? do_vfs_ioctl+0x486/0x1520 [ 33.482461] ? _cond_resched+0x14/0x30 [ 33.482466] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.482470] ? selinux_capable+0x40/0x40 [ 33.482474] ? putname+0xf3/0x130 [ 33.482479] do_group_exit+0x149/0x400 [ 33.482483] ? SyS_exit+0x30/0x30 [ 33.482487] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.482493] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.482498] SyS_exit_group+0x1d/0x20 [ 33.482501] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.482504] RIP: 0033:0x4429f8 [ 33.482507] RSP: 002b:00007ffefd8ff548 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 33.482511] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 33.482513] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 33.482515] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 33.482517] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 33.482519] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 33.482524] [ 33.482525] Allocated by task 3142: [ 33.482529] save_stack+0x43/0xd0 [ 33.482532] kasan_kmalloc+0xad/0xe0 [ 33.482536] kmem_cache_alloc_trace+0x136/0x750 [ 33.482539] binder_get_thread+0x1cf/0x870 [ 33.482542] binder_poll+0x8c/0x390 [ 33.482544] ep_item_poll.isra.10+0xec/0x320 [ 33.482547] ep_insert+0x6a3/0x1b10 [ 33.482549] SyS_epoll_ctl+0x12e4/0x1ab0 [ 33.482552] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.482553] [ 33.482554] Freed by task 3142: [ 33.482556] save_stack+0x43/0xd0 [ 33.482559] kasan_slab_free+0x71/0xc0 [ 33.482562] kfree+0xca/0x250 [ 33.482565] binder_thread_dec_tmpref+0x27f/0x310 [ 33.482568] binder_thread_release+0x27d/0x540 [ 33.482570] binder_ioctl+0xc02/0x1417 [ 33.482573] do_vfs_ioctl+0x1b1/0x1520 [ 33.482576] SyS_ioctl+0x8f/0xc0 [ 33.482579] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.482580] [ 33.482582] The buggy address belongs to the object at ffff8801c964e340 [ 33.482582] which belongs to the cache kmalloc-512 of size 512 [ 33.482586] The buggy address is located 176 bytes inside of [ 33.482586] 512-byte region [ffff8801c964e340, ffff8801c964e540) [ 33.482587] The buggy address belongs to the page: [ 33.482590] page:00000000c68a00ef count:1 mapcount:0 mapping:00000000781b73a9 index:0x0 [ 33.482594] flags: 0x2fffc0000000100(slab) [ 33.482600] raw: 02fffc0000000100 ffff8801c964e0c0 0000000000000000 0000000100000006 [ 33.482604] raw: ffffea000722b420 ffffea000722b6a0 ffff8801db000940 0000000000000000 [ 33.482605] page dumped because: kasan: bad access detected [ 33.482606] [ 33.482607] Memory state around the buggy address: [ 33.482610] ffff8801c964e280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.482613] ffff8801c964e300: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 33.482615] >ffff8801c964e380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.482617] ^ [ 33.482619] ffff8801c964e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.482622] ffff8801c964e480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.482623] ================================================================== [ 33.482624] Disabling lock debugging due to kernel taint [ 33.482626] Kernel panic - not syncing: panic_on_warn set ... [ 33.482626] [ 33.482630] CPU: 1 PID: 3142 Comm: syzkaller337880 Tainted: G B 4.15.0-rc4+ #228 [ 33.482632] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.482633] Call Trace: [ 33.482637] dump_stack+0x194/0x257 [ 33.482642] ? arch_local_irq_restore+0x53/0x53 [ 33.482645] ? kasan_end_report+0x32/0x50 [ 33.482648] ? lock_downgrade+0x980/0x980 [ 33.482652] ? vsnprintf+0x1ed/0x1900 [ 33.482656] ? __lock_acquire+0x3c90/0x3e00 [ 33.482659] panic+0x1e4/0x41c [ 33.482663] ? refcount_error_report+0x214/0x214 [ 33.482667] ? add_taint+0x40/0x50 [ 33.482670] ? add_taint+0x1c/0x50 [ 33.482674] ? __lock_acquire+0x3d4d/0x3e00 [ 33.482677] kasan_end_report+0x50/0x50 [ 33.482680] kasan_report+0x144/0x340 [ 33.482684] __asan_report_load8_noabort+0x14/0x20 [ 33.482688] __lock_acquire+0x3d4d/0x3e00 [ 33.482692] ? print_irqtrace_events+0x270/0x270 [ 33.482695] ? unwind_get_return_address+0x61/0xa0 [ 33.482699] ? remove_wait_queue+0x81/0x350 [ 33.482704] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482708] ? __lock_acquire+0x664/0x3e00 [ 33.482712] ? print_irqtrace_events+0x270/0x270 [ 33.482715] ? __lock_acquire+0x664/0x3e00 [ 33.482721] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482726] ? __lock_acquire+0x664/0x3e00 [ 33.482729] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482732] ? __lock_acquire+0x664/0x3e00 [ 33.482736] ? check_noncircular+0x20/0x20 [ 33.482740] ? check_noncircular+0x20/0x20 [ 33.482744] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482748] ? check_noncircular+0x20/0x20 [ 33.482753] ? __lock_is_held+0xb6/0x140 [ 33.482758] lock_acquire+0x1d5/0x580 [ 33.482761] ? lock_acquire+0x1d5/0x580 [ 33.482764] ? remove_wait_queue+0x81/0x350 [ 33.482768] ? find_held_lock+0x35/0x1d0 [ 33.482772] ? lock_release+0xa40/0xa40 [ 33.482775] ? print_irqtrace_events+0x270/0x270 [ 33.482780] ? lock_acquire+0x1d5/0x580 [ 33.482783] ? lock_acquire+0x1d5/0x580 [ 33.482787] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 33.482791] _raw_spin_lock_irqsave+0x96/0xc0 [ 33.482794] ? remove_wait_queue+0x81/0x350 [ 33.482798] remove_wait_queue+0x81/0x350 [ 33.482801] ? eventpoll_release_file+0xba/0x140 [ 33.482805] ? add_wait_queue+0x290/0x290 [ 33.482809] ? rcutorture_record_progress+0x10/0x10 [ 33.482812] ? mutex_lock_io_nested+0x1900/0x1900 [ 33.482818] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 33.482822] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482827] ? clear_tfile_check_list+0x370/0x370 [ 33.482831] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.482835] ? rcutorture_record_progress+0x10/0x10 [ 33.482840] ? is_bpf_text_address+0xa4/0x120 [ 33.482844] ep_remove+0xcd/0x800 [ 33.482848] ? unwind_get_return_address+0x61/0xa0 [ 33.482851] ? ep_destroy_wakeup_source+0x240/0x240 [ 33.482855] ? check_noncircular+0x20/0x20 [ 33.482859] ? check_noncircular+0x20/0x20 [ 33.482864] ? fsnotify+0x7b3/0x1140 [ 33.482870] eventpoll_release_file+0xc5/0x140 [ 33.482874] __fput+0x5f1/0x7e0 [ 33.482879] ? fput+0x140/0x140 [ 33.482882] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.482887] ____fput+0x15/0x20 [ 33.482890] task_work_run+0x199/0x270 [ 33.482895] ? task_work_cancel+0x210/0x210 [ 33.482898] ? _raw_spin_unlock+0x22/0x30 [ 33.482901] ? switch_task_namespaces+0x87/0xc0 [ 33.482906] do_exit+0x9bb/0x1ad0 [ 33.482910] ? binder_ioctl+0x4e1/0x1417 [ 33.482913] ? mm_update_next_owner+0x930/0x930 [ 33.482918] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 33.482923] ? avc_ss_reset+0x110/0x110 [ 33.482926] ? mutex_unlock+0xd/0x10 [ 33.482929] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 33.482940] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 33.482942] ? up_read+0x1a/0x40 [ 33.482946] ? rcu_note_context_switch+0x710/0x710 [ 33.482951] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 33.482955] ? do_vfs_ioctl+0x486/0x1520 [ 33.482958] ? _cond_resched+0x14/0x30 [ 33.482963] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.482967] ? selinux_capable+0x40/0x40 [ 33.482970] ? putname+0xf3/0x130 [ 33.482975] do_group_exit+0x149/0x400 [ 33.482979] ? SyS_exit+0x30/0x30 [ 33.482983] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.482986] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.482991] SyS_exit_group+0x1d/0x20 [ 33.482994] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.482997] RIP: 0033:0x4429f8 [ 33.482998] RSP: 002b:00007ffefd8ff548 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 33.483005] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 33.483007] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 33.483009] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 33.483011] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 33.483013] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 33.504894] Dumping ftrace buffer: [ 33.504898] (ftrace buffer empty) [ 33.504900] Kernel Offset: disabled [ 34.641470] Rebooting in 86400 seconds..