[....] Starting enhanced syslogd: rsyslogd[ 11.729985] audit: type=1400 audit(1513810434.027:5): avc: denied { syslog } for pid=2995 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?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. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 16.919797] audit: type=1400 audit(1513810439.217:6): avc: denied { map } for pid=3134 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 Warning: Permanently added 'ci-upstream-mmots-kasan-gce-9,10.128.0.47' (ECDSA) to the list of known hosts. executing program [ 36.859651] audit: type=1400 audit(1513810459.157:7): avc: denied { map } for pid=3152 comm="syzkaller034403" path="/root/syzkaller034403548" 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 [ 36.863918] ================================================================== [ 36.863927] BUG: KASAN: use-after-free in __lock_acquire+0x465e/0x47f0 [ 36.863932] Read of size 8 at addr ffff8801c5ac18f8 by task syzkaller034403/3152 [ 36.863933] [ 36.863939] CPU: 0 PID: 3152 Comm: syzkaller034403 Not tainted 4.15.0-rc2-mm1+ #39 [ 36.863942] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.863943] Call Trace: [ 36.863952] dump_stack+0x194/0x257 [ 36.863958] ? arch_local_irq_restore+0x53/0x53 [ 36.863964] ? show_regs_print_info+0x18/0x18 [ 36.863970] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 36.863975] ? __lock_acquire+0x6e9/0x47f0 [ 36.863981] ? __lock_acquire+0x465e/0x47f0 [ 36.863989] print_address_description+0x73/0x250 [ 36.863995] ? __lock_acquire+0x465e/0x47f0 [ 36.864005] kasan_report+0x25b/0x340 [ 36.864010] __asan_report_load8_noabort+0x14/0x20 [ 36.864014] __lock_acquire+0x465e/0x47f0 [ 36.864017] ? __lock_acquire+0x6e9/0x47f0 [ 36.864023] ? __save_stack_trace+0x61/0xd0 [ 36.864029] ? __is_insn_slot_addr+0x1fc/0x330 [ 36.864035] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 36.864038] ? __lock_acquire+0x6e9/0x47f0 [ 36.864042] ? lock_release+0xda0/0xda0 [ 36.864048] ? bpf_prog_kallsyms_find+0xbd/0x440 [ 36.864054] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 36.864058] ? lock_acquire+0x1d5/0x580 [ 36.864062] ? ep_free+0xfa/0x300 [ 36.864067] ? lock_release+0xda0/0xda0 [ 36.864073] ? rcu_note_context_switch+0x710/0x710 [ 36.864079] ? __might_sleep+0x95/0x190 [ 36.864082] ? ep_free+0xfa/0x300 [ 36.864087] ? __mutex_lock+0x16f/0x1a80 [ 36.864089] ? ep_free+0xfa/0x300 [ 36.864095] ? unwind_get_return_address+0x61/0xa0 [ 36.864098] ? ep_free+0xfa/0x300 [ 36.864103] lock_acquire+0x1d5/0x580 [ 36.864109] ? remove_wait_queue+0x81/0x350 [ 36.864115] ? save_stack_trace+0x1a/0x20 [ 36.864119] ? __lock_acquire+0x324e/0x47f0 [ 36.864123] ? lock_release+0xda0/0xda0 [ 36.864127] ? save_stack_trace+0x1a/0x20 [ 36.864130] ? __lock_acquire+0x324e/0x47f0 [ 36.864134] ? lock_acquire+0x1d5/0x580 [ 36.864138] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 36.864143] _raw_spin_lock_irqsave+0x96/0xc0 [ 36.864146] ? remove_wait_queue+0x81/0x350 [ 36.864150] remove_wait_queue+0x81/0x350 [ 36.864155] ? add_wait_queue+0x290/0x290 [ 36.864158] ? rcutorture_record_progress+0x10/0x10 [ 36.864164] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 36.864170] ? __kernel_text_address+0xd/0x40 [ 36.864174] ? clear_tfile_check_list+0x370/0x370 [ 36.864179] ? check_noncircular+0x20/0x20 [ 36.864184] ? free_fs_struct+0x52/0x60 [ 36.864189] ? locks_remove_file+0x3fa/0x5a0 [ 36.864194] ep_free+0x135/0x300 [ 36.864197] ? ep_remove+0x810/0x810 [ 36.864202] ? fsnotify_first_mark+0x2b0/0x2b0 [ 36.864206] ? ep_free+0x300/0x300 [ 36.864209] ep_eventpoll_release+0x44/0x60 [ 36.864214] __fput+0x333/0x7f0 [ 36.864219] ? fput+0x140/0x140 [ 36.864223] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.864228] ____fput+0x15/0x20 [ 36.864232] task_work_run+0x199/0x270 [ 36.864236] ? task_work_cancel+0x210/0x210 [ 36.864240] ? _raw_spin_unlock+0x22/0x30 [ 36.864244] ? switch_task_namespaces+0x87/0xc0 [ 36.864250] do_exit+0x9bb/0x1ae0 [ 36.864257] ? binder_ioctl+0x561/0x141a [ 36.864261] ? mm_update_next_owner+0x930/0x930 [ 36.864266] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.864273] ? avc_ss_reset+0x110/0x110 [ 36.864276] ? mutex_unlock+0xd/0x10 [ 36.864285] ? down_read_trylock+0xdb/0x170 [ 36.864291] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.864294] ? up_read+0x1a/0x40 [ 36.864298] ? rcu_note_context_switch+0x710/0x710 [ 36.864302] ? __fd_install+0x288/0x740 [ 36.864307] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.864311] ? do_vfs_ioctl+0x492/0x1530 [ 36.864314] ? _cond_resched+0x14/0x30 [ 36.864319] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.864324] ? selinux_capable+0x40/0x40 [ 36.864328] ? __alloc_fd+0x750/0x750 [ 36.864333] do_group_exit+0x149/0x400 [ 36.864337] ? SyS_exit+0x30/0x30 [ 36.864340] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.864347] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.864351] SyS_exit_group+0x1d/0x20 [ 36.864356] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.864359] RIP: 0033:0x442a08 [ 36.864361] RSP: 002b:00007fff3eaf5108 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 36.864365] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000442a08 [ 36.864367] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 36.864369] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 36.864371] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a50 [ 36.864373] R13: 0000000000401ae0 R14: 0000000000000000 R15: 0000000000000000 [ 36.864378] [ 36.864380] Allocated by task 3152: [ 36.864384] save_stack+0x43/0xd0 [ 36.864386] kasan_kmalloc+0xad/0xe0 [ 36.864391] kmem_cache_alloc_trace+0x136/0x750 [ 36.864394] binder_get_thread+0x1cf/0x870 [ 36.864397] binder_poll+0x8c/0x390 [ 36.864400] ep_item_poll.isra.10+0xf2/0x320 [ 36.864402] ep_insert+0x6a2/0x1b50 [ 36.864405] SyS_epoll_ctl+0x129b/0x1a60 [ 36.864408] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.864409] [ 36.864410] Freed by task 3152: [ 36.864413] save_stack+0x43/0xd0 [ 36.864416] kasan_slab_free+0x71/0xc0 [ 36.864419] kfree+0xca/0x250 [ 36.864422] binder_thread_dec_tmpref+0x27f/0x310 [ 36.864425] binder_thread_release+0x27d/0x540 [ 36.864428] binder_ioctl+0xc05/0x141a [ 36.864431] do_vfs_ioctl+0x1b1/0x1530 [ 36.864434] SyS_ioctl+0x8f/0xc0 [ 36.864437] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.864438] [ 36.864441] The buggy address belongs to the object at ffff8801c5ac1840 [ 36.864441] which belongs to the cache kmalloc-512 of size 512 [ 36.864444] The buggy address is located 184 bytes inside of [ 36.864444] 512-byte region [ffff8801c5ac1840, ffff8801c5ac1a40) [ 36.864445] The buggy address belongs to the page: [ 36.864448] page:00000000c4137f6b count:1 mapcount:0 mapping:00000000fa8624a4 index:0x0 [ 36.864452] flags: 0x2fffc0000000100(slab) [ 36.864457] raw: 02fffc0000000100 ffff8801c5ac10c0 0000000000000000 0000000100000006 [ 36.864461] raw: ffffea0007142ca0 ffffea00071431a0 ffff8801dac00940 0000000000000000 [ 36.864463] page dumped because: kasan: bad access detected [ 36.864463] [ 36.864464] Memory state around the buggy address: [ 36.864467] ffff8801c5ac1780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 36.864470] ffff8801c5ac1800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 36.864473] >ffff8801c5ac1880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.864474] ^ [ 36.864476] ffff8801c5ac1900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.864479] ffff8801c5ac1980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.864480] ================================================================== [ 36.864481] Disabling lock debugging due to kernel taint [ 36.864483] Kernel panic - not syncing: panic_on_warn set ... [ 36.864483] [ 36.864487] CPU: 0 PID: 3152 Comm: syzkaller034403 Tainted: G B 4.15.0-rc2-mm1+ #39 [ 36.864489] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.864490] Call Trace: [ 36.864494] dump_stack+0x194/0x257 [ 36.864498] ? arch_local_irq_restore+0x53/0x53 [ 36.864502] ? vprintk_default+0x28/0x30 [ 36.864507] ? vsnprintf+0x1ed/0x1900 [ 36.864510] ? __lock_acquire+0x45b0/0x47f0 [ 36.864514] panic+0x1e4/0x41c [ 36.864517] ? refcount_error_report+0x214/0x214 [ 36.864521] ? add_taint+0x40/0x50 [ 36.864524] ? add_taint+0x1c/0x50 [ 36.864528] ? __lock_acquire+0x465e/0x47f0 [ 36.864532] kasan_end_report+0x50/0x50 [ 36.864535] kasan_report+0x144/0x340 [ 36.864539] __asan_report_load8_noabort+0x14/0x20 [ 36.864543] __lock_acquire+0x465e/0x47f0 [ 36.864546] ? __lock_acquire+0x6e9/0x47f0 [ 36.864550] ? __save_stack_trace+0x61/0xd0 [ 36.864554] ? __is_insn_slot_addr+0x1fc/0x330 [ 36.864559] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 36.864562] ? __lock_acquire+0x6e9/0x47f0 [ 36.864566] ? lock_release+0xda0/0xda0 [ 36.864570] ? bpf_prog_kallsyms_find+0xbd/0x440 [ 36.864576] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 36.864580] ? lock_acquire+0x1d5/0x580 [ 36.864583] ? ep_free+0xfa/0x300 [ 36.864587] ? lock_release+0xda0/0xda0 [ 36.864592] ? rcu_note_context_switch+0x710/0x710 [ 36.864596] ? __might_sleep+0x95/0x190 [ 36.864599] ? ep_free+0xfa/0x300 [ 36.864603] ? __mutex_lock+0x16f/0x1a80 [ 36.864609] ? ep_free+0xfa/0x300 [ 36.864613] ? unwind_get_return_address+0x61/0xa0 [ 36.864616] ? ep_free+0xfa/0x300 [ 36.864621] lock_acquire+0x1d5/0x580 [ 36.864624] ? remove_wait_queue+0x81/0x350 [ 36.864628] ? save_stack_trace+0x1a/0x20 [ 36.864631] ? __lock_acquire+0x324e/0x47f0 [ 36.864635] ? lock_release+0xda0/0xda0 [ 36.864639] ? save_stack_trace+0x1a/0x20 [ 36.864642] ? __lock_acquire+0x324e/0x47f0 [ 36.864646] ? lock_acquire+0x1d5/0x580 [ 36.864649] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 36.864654] _raw_spin_lock_irqsave+0x96/0xc0 [ 36.864657] ? remove_wait_queue+0x81/0x350 [ 36.864661] remove_wait_queue+0x81/0x350 [ 36.864666] ? add_wait_queue+0x290/0x290 [ 36.864669] ? rcutorture_record_progress+0x10/0x10 [ 36.864674] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 36.864678] ? __kernel_text_address+0xd/0x40 [ 36.864682] ? clear_tfile_check_list+0x370/0x370 [ 36.864687] ? check_noncircular+0x20/0x20 [ 36.864691] ? free_fs_struct+0x52/0x60 [ 36.864694] ? locks_remove_file+0x3fa/0x5a0 [ 36.864699] ep_free+0x135/0x300 [ 36.864702] ? ep_remove+0x810/0x810 [ 36.864706] ? fsnotify_first_mark+0x2b0/0x2b0 [ 36.864710] ? ep_free+0x300/0x300 [ 36.864713] ep_eventpoll_release+0x44/0x60 [ 36.864716] __fput+0x333/0x7f0 [ 36.864721] ? fput+0x140/0x140 [ 36.864725] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.864729] ____fput+0x15/0x20 [ 36.864733] task_work_run+0x199/0x270 [ 36.864737] ? task_work_cancel+0x210/0x210 [ 36.864741] ? _raw_spin_unlock+0x22/0x30 [ 36.864745] ? switch_task_namespaces+0x87/0xc0 [ 36.864749] do_exit+0x9bb/0x1ae0 [ 36.864753] ? binder_ioctl+0x561/0x141a [ 36.864757] ? mm_update_next_owner+0x930/0x930 [ 36.864762] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.864767] ? avc_ss_reset+0x110/0x110 [ 36.864770] ? mutex_unlock+0xd/0x10 [ 36.864777] ? down_read_trylock+0xdb/0x170 [ 36.864783] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.864786] ? up_read+0x1a/0x40 [ 36.864790] ? rcu_note_context_switch+0x710/0x710 [ 36.864793] ? __fd_install+0x288/0x740 [ 36.864799] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 36.864802] ? do_vfs_ioctl+0x492/0x1530 [ 36.864805] ? _cond_resched+0x14/0x30 [ 36.864810] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.864814] ? selinux_capable+0x40/0x40 [ 36.864818] ? __alloc_fd+0x750/0x750 [ 36.864822] do_group_exit+0x149/0x400 [ 36.864826] ? SyS_exit+0x30/0x30 [ 36.864830] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.864834] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.864838] SyS_exit_group+0x1d/0x20 [ 36.864842] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.864844] RIP: 0033:0x442a08 [ 36.864846] RSP: 002b:00007fff3eaf5108 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 36.864850] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000442a08 [ 36.864852] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 36.864854] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 36.864856] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a50 [ 36.864858] R13: 0000000000401ae0 R14: 0000000000000000 R15: 0000000000000000 [ 36.885521] Dumping ftrace buffer: [ 36.885524] (ftrace buffer empty) [ 36.885525] Kernel Offset: disabled [ 37.997124] Rebooting in 86400 seconds..