[....] Starting enhanced syslogd: rsyslogd[ 10.742596] audit: type=1400 audit(1514237086.802: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: [ 15.791151] audit: type=1400 audit(1514237091.850: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-4,10.128.15.232' (ECDSA) to the list of known hosts. executing program [ 21.947480] audit: type=1400 audit(1514237098.007:7): avc: denied { map } for pid=3148 comm="syzkaller458081" path="/root/syzkaller458081223" 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 [ 21.951937] ================================================================== [ 21.951952] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 21.951956] Read of size 8 at addr ffff8801c91d38f8 by task syzkaller458081/3148 [ 21.951958] [ 21.951964] CPU: 1 PID: 3148 Comm: syzkaller458081 Not tainted 4.15.0-rc4-mm1+ #49 [ 21.951966] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.951968] Call Trace: [ 21.951976] dump_stack+0x194/0x257 [ 21.951983] ? arch_local_irq_restore+0x53/0x53 [ 21.951990] ? show_regs_print_info+0x18/0x18 [ 21.951994] ? print_irqtrace_events+0x270/0x270 [ 21.951997] ? __lock_acquire+0x664/0x3e00 [ 21.952006] ? __lock_acquire+0x3d4d/0x3e00 [ 21.952013] print_address_description+0x73/0x250 [ 21.952017] ? __lock_acquire+0x3d4d/0x3e00 [ 21.952021] kasan_report+0x23b/0x360 [ 21.952026] __asan_report_load8_noabort+0x14/0x20 [ 21.952029] __lock_acquire+0x3d4d/0x3e00 [ 21.952032] ? __lock_acquire+0x664/0x3e00 [ 21.952036] ? lock_downgrade+0x980/0x980 [ 21.952040] ? lock_downgrade+0x980/0x980 [ 21.952048] ? remove_wait_queue+0x81/0x350 [ 21.952058] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 21.952064] ? __lock_acquire+0x664/0x3e00 [ 21.952070] ? check_noncircular+0x20/0x20 [ 21.952081] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 21.952088] ? lock_acquire+0x1d5/0x580 [ 21.952093] ? lock_acquire+0x1d5/0x580 [ 21.952100] ? ep_free+0xf4/0x320 [ 21.952106] ? lock_release+0xa40/0xa40 [ 21.952112] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 21.952115] ? print_irqtrace_events+0x270/0x270 [ 21.952121] ? rcu_note_context_switch+0x710/0x710 [ 21.952125] ? __might_sleep+0x95/0x190 [ 21.952129] ? ep_free+0xf4/0x320 [ 21.952133] ? __mutex_lock+0x16f/0x1a80 [ 21.952136] ? ep_free+0xf4/0x320 [ 21.952140] ? print_irqtrace_events+0x270/0x270 [ 21.952143] ? ep_free+0xf4/0x320 [ 21.952148] lock_acquire+0x1d5/0x580 [ 21.952151] ? lock_acquire+0x1d5/0x580 [ 21.952155] ? remove_wait_queue+0x81/0x350 [ 21.952158] ? __lock_acquire+0x664/0x3e00 [ 21.952163] ? lock_release+0xa40/0xa40 [ 21.952168] ? lock_acquire+0x1d5/0x580 [ 21.952171] ? lock_acquire+0x1d5/0x580 [ 21.952175] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 21.952180] _raw_spin_lock_irqsave+0x96/0xc0 [ 21.952183] ? remove_wait_queue+0x81/0x350 [ 21.952187] remove_wait_queue+0x81/0x350 [ 21.952192] ? add_wait_queue+0x290/0x290 [ 21.952196] ? rcutorture_record_progress+0x10/0x10 [ 21.952202] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 21.952207] ? __kernel_text_address+0xd/0x40 [ 21.952212] ? clear_tfile_check_list+0x370/0x370 [ 21.952217] ? check_noncircular+0x20/0x20 [ 21.952223] ? locks_remove_file+0x3fa/0x5a0 [ 21.952229] ep_free+0x13f/0x320 [ 21.952233] ? ep_remove+0x800/0x800 [ 21.952236] ? fsnotify_first_mark+0x2b0/0x2b0 [ 21.952241] ? ep_free+0x320/0x320 [ 21.952244] ep_eventpoll_release+0x44/0x60 [ 21.952250] __fput+0x327/0x7e0 [ 21.952255] ? fput+0x140/0x140 [ 21.952259] ? _raw_spin_unlock_irq+0x27/0x70 [ 21.952264] ____fput+0x15/0x20 [ 21.952268] task_work_run+0x199/0x270 [ 21.952273] ? task_work_cancel+0x210/0x210 [ 21.952276] ? _raw_spin_unlock+0x22/0x30 [ 21.952280] ? switch_task_namespaces+0x87/0xc0 [ 21.952286] do_exit+0x9bb/0x1ad0 [ 21.952293] ? binder_ioctl+0x551/0x1417 [ 21.952296] ? mm_update_next_owner+0x930/0x930 [ 21.952301] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 21.952307] ? avc_ss_reset+0x110/0x110 [ 21.952311] ? mutex_unlock+0xd/0x10 [ 21.952315] ? SyS_epoll_ctl+0x30a/0x1a80 [ 21.952327] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 21.952330] ? up_read+0x1a/0x40 [ 21.952334] ? rcu_note_context_switch+0x710/0x710 [ 21.952337] ? __fd_install+0x288/0x740 [ 21.952342] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 21.952346] ? do_vfs_ioctl+0x486/0x1520 [ 21.952350] ? _cond_resched+0x14/0x30 [ 21.952354] ? ioctl_preallocate+0x2b0/0x2b0 [ 21.952359] ? selinux_capable+0x40/0x40 [ 21.952363] ? __alloc_fd+0x750/0x750 [ 21.952368] do_group_exit+0x149/0x400 [ 21.952372] ? SyS_exit+0x30/0x30 [ 21.952376] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 21.952381] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 21.952386] SyS_exit_group+0x1d/0x20 [ 21.952389] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 21.952393] RIP: 0033:0x4429f8 [ 21.952395] RSP: 002b:00007ffdfc9490f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 21.952399] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 21.952401] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 21.952403] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 21.952405] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 21.952407] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 21.952413] [ 21.952415] Allocated by task 3148: [ 21.952419] save_stack+0x43/0xd0 [ 21.952421] kasan_kmalloc+0xad/0xe0 [ 21.952425] kmem_cache_alloc_trace+0x136/0x750 [ 21.952427] binder_get_thread+0x1cf/0x870 [ 21.952430] binder_poll+0x8c/0x390 [ 21.952433] ep_item_poll.isra.10+0xf2/0x320 [ 21.952436] ep_insert+0x6a2/0x1ac0 [ 21.952439] SyS_epoll_ctl+0x12bf/0x1a80 [ 21.952442] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 21.952442] [ 21.952444] Freed by task 3148: [ 21.952446] save_stack+0x43/0xd0 [ 21.952449] kasan_slab_free+0x71/0xc0 [ 21.952452] kfree+0xd6/0x260 [ 21.952454] binder_thread_dec_tmpref+0x27f/0x310 [ 21.952457] binder_thread_release+0x27d/0x540 [ 21.952460] binder_ioctl+0xc02/0x1417 [ 21.952462] do_vfs_ioctl+0x1b1/0x1520 [ 21.952464] SyS_ioctl+0x8f/0xc0 [ 21.952467] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 21.952468] [ 21.952471] The buggy address belongs to the object at ffff8801c91d3840 [ 21.952471] which belongs to the cache kmalloc-512 of size 512 [ 21.952474] The buggy address is located 184 bytes inside of [ 21.952474] 512-byte region [ffff8801c91d3840, ffff8801c91d3a40) [ 21.952475] The buggy address belongs to the page: [ 21.952478] page:ffffea00072474c0 count:1 mapcount:0 mapping:ffff8801c91d30c0 index:0x0 [ 21.952481] flags: 0x2fffc0000000100(slab) [ 21.952487] raw: 02fffc0000000100 ffff8801c91d30c0 0000000000000000 0000000100000006 [ 21.952491] raw: ffffea0007269be0 ffffea000726c9a0 ffff8801dac00940 0000000000000000 [ 21.952492] page dumped because: kasan: bad access detected [ 21.952493] [ 21.952494] Memory state around the buggy address: [ 21.952497] ffff8801c91d3780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 21.952500] ffff8801c91d3800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 21.952502] >ffff8801c91d3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.952504] ^ [ 21.952506] ffff8801c91d3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.952509] ffff8801c91d3980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.952510] ================================================================== [ 21.952511] Disabling lock debugging due to kernel taint [ 21.952514] Kernel panic - not syncing: panic_on_warn set ... [ 21.952514] [ 21.952518] CPU: 1 PID: 3148 Comm: syzkaller458081 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 21.952520] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.952521] Call Trace: [ 21.952524] dump_stack+0x194/0x257 [ 21.952529] ? arch_local_irq_restore+0x53/0x53 [ 21.952532] ? kasan_end_report+0x32/0x50 [ 21.952536] ? lock_downgrade+0x980/0x980 [ 21.952539] ? vsnprintf+0x1ed/0x1900 [ 21.952543] ? __lock_acquire+0x3c90/0x3e00 [ 21.952546] panic+0x1e4/0x41c [ 21.952550] ? refcount_error_report+0x214/0x214 [ 21.952554] ? add_taint+0x40/0x50 [ 21.952557] ? add_taint+0x1c/0x50 [ 21.952561] ? __lock_acquire+0x3d4d/0x3e00 [ 21.952564] kasan_end_report+0x50/0x50 [ 21.952567] kasan_report+0x148/0x360 [ 21.952572] __asan_report_load8_noabort+0x14/0x20 [ 21.952575] __lock_acquire+0x3d4d/0x3e00 [ 21.952579] ? __lock_acquire+0x664/0x3e00 [ 21.952582] ? lock_downgrade+0x980/0x980 [ 21.952589] ? lock_downgrade+0x980/0x980 [ 21.952594] ? remove_wait_queue+0x81/0x350 [ 21.952599] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 21.952603] ? __lock_acquire+0x664/0x3e00 [ 21.952606] ? check_noncircular+0x20/0x20 [ 21.952612] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 21.952616] ? lock_acquire+0x1d5/0x580 [ 21.952620] ? lock_acquire+0x1d5/0x580 [ 21.952623] ? ep_free+0xf4/0x320 [ 21.952627] ? lock_release+0xa40/0xa40 [ 21.952631] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 21.952634] ? print_irqtrace_events+0x270/0x270 [ 21.952638] ? rcu_note_context_switch+0x710/0x710 [ 21.952642] ? __might_sleep+0x95/0x190 [ 21.952646] ? ep_free+0xf4/0x320 [ 21.952649] ? __mutex_lock+0x16f/0x1a80 [ 21.952651] ? ep_free+0xf4/0x320 [ 21.952655] ? print_irqtrace_events+0x270/0x270 [ 21.952658] ? ep_free+0xf4/0x320 [ 21.952663] lock_acquire+0x1d5/0x580 [ 21.952666] ? lock_acquire+0x1d5/0x580 [ 21.952669] ? remove_wait_queue+0x81/0x350 [ 21.952673] ? __lock_acquire+0x664/0x3e00 [ 21.952677] ? lock_release+0xa40/0xa40 [ 21.952682] ? lock_acquire+0x1d5/0x580 [ 21.952685] ? lock_acquire+0x1d5/0x580 [ 21.952689] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 21.952693] _raw_spin_lock_irqsave+0x96/0xc0 [ 21.952698] ? remove_wait_queue+0x81/0x350 [ 21.952703] remove_wait_queue+0x81/0x350 [ 21.952708] ? add_wait_queue+0x290/0x290 [ 21.952712] ? rcutorture_record_progress+0x10/0x10 [ 21.952717] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 21.952721] ? __kernel_text_address+0xd/0x40 [ 21.952726] ? clear_tfile_check_list+0x370/0x370 [ 21.952730] ? check_noncircular+0x20/0x20 [ 21.952734] ? locks_remove_file+0x3fa/0x5a0 [ 21.952740] ep_free+0x13f/0x320 [ 21.952743] ? ep_remove+0x800/0x800 [ 21.952746] ? fsnotify_first_mark+0x2b0/0x2b0 [ 21.952750] ? ep_free+0x320/0x320 [ 21.952754] ep_eventpoll_release+0x44/0x60 [ 21.952757] __fput+0x327/0x7e0 [ 21.952762] ? fput+0x140/0x140 [ 21.952766] ? _raw_spin_unlock_irq+0x27/0x70 [ 21.952770] ____fput+0x15/0x20 [ 21.952774] task_work_run+0x199/0x270 [ 21.952778] ? task_work_cancel+0x210/0x210 [ 21.952782] ? _raw_spin_unlock+0x22/0x30 [ 21.952785] ? switch_task_namespaces+0x87/0xc0 [ 21.952789] do_exit+0x9bb/0x1ad0 [ 21.952793] ? binder_ioctl+0x551/0x1417 [ 21.952797] ? mm_update_next_owner+0x930/0x930 [ 21.952801] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 21.952806] ? avc_ss_reset+0x110/0x110 [ 21.952809] ? mutex_unlock+0xd/0x10 [ 21.952813] ? SyS_epoll_ctl+0x30a/0x1a80 [ 21.952823] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 21.952826] ? up_read+0x1a/0x40 [ 21.952830] ? rcu_note_context_switch+0x710/0x710 [ 21.952833] ? __fd_install+0x288/0x740 [ 21.952837] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 21.952840] ? do_vfs_ioctl+0x486/0x1520 [ 21.952844] ? _cond_resched+0x14/0x30 [ 21.952848] ? ioctl_preallocate+0x2b0/0x2b0 [ 21.952852] ? selinux_capable+0x40/0x40 [ 21.952856] ? __alloc_fd+0x750/0x750 [ 21.952860] do_group_exit+0x149/0x400 [ 21.952864] ? SyS_exit+0x30/0x30 [ 21.952868] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 21.952872] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 21.952876] SyS_exit_group+0x1d/0x20 [ 21.952880] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 21.952882] RIP: 0033:0x4429f8 [ 21.952884] RSP: 002b:00007ffdfc9490f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 21.952887] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 21.952889] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 21.952891] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 21.952893] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 21.952895] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 21.973363] Dumping ftrace buffer: [ 21.973367] (ftrace buffer empty) [ 21.973369] Kernel Offset: disabled [ 23.110290] Rebooting in 86400 seconds..