[....] Starting enhanced syslogd: rsyslogd[ 11.228329] audit: type=1400 audit(1514111889.774: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.309256] audit: type=1400 audit(1514111894.855:6): avc: denied { map } for pid=3135 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-kasan-gce-7,10.128.0.62' (ECDSA) to the list of known hosts. executing program [ 28.412266] audit: type=1400 audit(1514111906.958:7): avc: denied { map } for pid=3151 comm="syzkaller850020" path="/root/syzkaller850020865" 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 [ 28.416786] ================================================================== [ 28.416800] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 28.416804] Read of size 8 at addr ffff8801c9e76d70 by task syzkaller850020/3151 [ 28.416804] [ 28.416810] CPU: 1 PID: 3151 Comm: syzkaller850020 Not tainted 4.15.0-rc5+ #237 [ 28.416812] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.416814] Call Trace: [ 28.416822] dump_stack+0x194/0x257 [ 28.416827] ? arch_local_irq_restore+0x53/0x53 [ 28.416832] ? show_regs_print_info+0x18/0x18 [ 28.416836] ? print_irqtrace_events+0x270/0x270 [ 28.416839] ? __lock_acquire+0x664/0x3e00 [ 28.416843] ? __lock_acquire+0x3d4d/0x3e00 [ 28.416849] print_address_description+0x73/0x250 [ 28.416853] ? __lock_acquire+0x3d4d/0x3e00 [ 28.416856] kasan_report+0x25b/0x340 [ 28.416861] __asan_report_load8_noabort+0x14/0x20 [ 28.416864] __lock_acquire+0x3d4d/0x3e00 [ 28.416867] ? __lock_acquire+0x664/0x3e00 [ 28.416871] ? lock_downgrade+0x980/0x980 [ 28.416874] ? lock_downgrade+0x980/0x980 [ 28.416879] ? remove_wait_queue+0x81/0x350 [ 28.416885] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.416888] ? __lock_acquire+0x664/0x3e00 [ 28.416891] ? check_noncircular+0x20/0x20 [ 28.416899] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.416903] ? lock_acquire+0x1d5/0x580 [ 28.416906] ? lock_acquire+0x1d5/0x580 [ 28.416911] ? ep_free+0xf4/0x320 [ 28.416916] ? lock_release+0xa40/0xa40 [ 28.416921] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.416925] ? print_irqtrace_events+0x270/0x270 [ 28.416930] ? rcu_note_context_switch+0x710/0x710 [ 28.416935] ? __might_sleep+0x95/0x190 [ 28.416938] ? ep_free+0xf4/0x320 [ 28.416943] ? __mutex_lock+0x16f/0x1a80 [ 28.416945] ? ep_free+0xf4/0x320 [ 28.416949] ? print_irqtrace_events+0x270/0x270 [ 28.416952] ? ep_free+0xf4/0x320 [ 28.416957] lock_acquire+0x1d5/0x580 [ 28.416960] ? lock_acquire+0x1d5/0x580 [ 28.416963] ? remove_wait_queue+0x81/0x350 [ 28.416967] ? __lock_acquire+0x664/0x3e00 [ 28.416971] ? lock_release+0xa40/0xa40 [ 28.416976] ? lock_acquire+0x1d5/0x580 [ 28.416979] ? lock_acquire+0x1d5/0x580 [ 28.416983] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 28.416988] _raw_spin_lock_irqsave+0x96/0xc0 [ 28.416992] ? remove_wait_queue+0x81/0x350 [ 28.416995] remove_wait_queue+0x81/0x350 [ 28.417000] ? add_wait_queue+0x290/0x290 [ 28.417008] ? rcutorture_record_progress+0x10/0x10 [ 28.417014] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 28.417020] ? __kernel_text_address+0xd/0x40 [ 28.417024] ? clear_tfile_check_list+0x370/0x370 [ 28.417029] ? check_noncircular+0x20/0x20 [ 28.417035] ? locks_remove_file+0x3fa/0x5a0 [ 28.417040] ep_free+0x13f/0x320 [ 28.417043] ? ep_remove+0x800/0x800 [ 28.417049] ? fsnotify_first_mark+0x2b0/0x2b0 [ 28.417053] ? ep_free+0x320/0x320 [ 28.417056] ep_eventpoll_release+0x44/0x60 [ 28.417061] __fput+0x327/0x7e0 [ 28.417066] ? fput+0x140/0x140 [ 28.417070] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.417074] ____fput+0x15/0x20 [ 28.417078] task_work_run+0x199/0x270 [ 28.417083] ? task_work_cancel+0x210/0x210 [ 28.417086] ? _raw_spin_unlock+0x22/0x30 [ 28.417090] ? switch_task_namespaces+0x87/0xc0 [ 28.417097] do_exit+0x9bb/0x1ad0 [ 28.417103] ? binder_ioctl+0x4a1/0x1417 [ 28.417107] ? mm_update_next_owner+0x930/0x930 [ 28.417112] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 28.417120] ? avc_ss_reset+0x110/0x110 [ 28.417128] ? mutex_unlock+0xd/0x10 [ 28.417131] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 28.417143] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.417146] ? up_read+0x1a/0x40 [ 28.417150] ? rcu_note_context_switch+0x710/0x710 [ 28.417156] ? __fd_install+0x288/0x740 [ 28.417161] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 28.417166] ? do_vfs_ioctl+0x486/0x1520 [ 28.417170] ? _cond_resched+0x14/0x30 [ 28.417175] ? ioctl_preallocate+0x2b0/0x2b0 [ 28.417181] ? selinux_capable+0x40/0x40 [ 28.417185] ? __alloc_fd+0x750/0x750 [ 28.417190] do_group_exit+0x149/0x400 [ 28.417194] ? SyS_exit+0x30/0x30 [ 28.417198] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.417205] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.417209] SyS_exit_group+0x1d/0x20 [ 28.417214] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.417217] RIP: 0033:0x4429f8 [ 28.417219] RSP: 002b:00007ffe3f050648 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 28.417223] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 28.417225] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 28.417228] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 28.417230] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 28.417232] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 28.417237] [ 28.417239] Allocated by task 3151: [ 28.417242] save_stack+0x43/0xd0 [ 28.417245] kasan_kmalloc+0xad/0xe0 [ 28.417249] kmem_cache_alloc_trace+0x136/0x750 [ 28.417253] binder_get_thread+0x1cf/0x870 [ 28.417256] binder_poll+0x8c/0x390 [ 28.417259] ep_item_poll.isra.10+0xec/0x320 [ 28.417261] ep_insert+0x6a3/0x1b10 [ 28.417264] SyS_epoll_ctl+0x12e4/0x1ab0 [ 28.417267] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.417267] [ 28.417269] Freed by task 3151: [ 28.417271] save_stack+0x43/0xd0 [ 28.417274] kasan_slab_free+0x71/0xc0 [ 28.417276] kfree+0xd6/0x260 [ 28.417279] binder_thread_dec_tmpref+0x27f/0x310 [ 28.417282] binder_thread_release+0x27d/0x540 [ 28.417285] binder_ioctl+0xc02/0x1417 [ 28.417288] do_vfs_ioctl+0x1b1/0x1520 [ 28.417291] SyS_ioctl+0x8f/0xc0 [ 28.417294] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.417294] [ 28.417297] The buggy address belongs to the object at ffff8801c9e76cc0 [ 28.417297] which belongs to the cache kmalloc-512 of size 512 [ 28.417300] The buggy address is located 176 bytes inside of [ 28.417300] 512-byte region [ffff8801c9e76cc0, ffff8801c9e76ec0) [ 28.417301] The buggy address belongs to the page: [ 28.417304] page:00000000ef5097c6 count:1 mapcount:0 mapping:00000000884b4a4f index:0x0 [ 28.417308] flags: 0x2fffc0000000100(slab) [ 28.417314] raw: 02fffc0000000100 ffff8801c9e76040 0000000000000000 0000000100000006 [ 28.417318] raw: ffffea00072646a0 ffffea0007264aa0 ffff8801db000940 0000000000000000 [ 28.417320] page dumped because: kasan: bad access detected [ 28.417320] [ 28.417321] Memory state around the buggy address: [ 28.417324] ffff8801c9e76c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.417326] ffff8801c9e76c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 28.417329] >ffff8801c9e76d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.417330] ^ [ 28.417333] ffff8801c9e76d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.417335] ffff8801c9e76e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.417336] ================================================================== [ 28.417337] Disabling lock debugging due to kernel taint [ 28.417340] Kernel panic - not syncing: panic_on_warn set ... [ 28.417340] [ 28.417343] CPU: 1 PID: 3151 Comm: syzkaller850020 Tainted: G B 4.15.0-rc5+ #237 [ 28.417345] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.417346] Call Trace: [ 28.417350] dump_stack+0x194/0x257 [ 28.417354] ? arch_local_irq_restore+0x53/0x53 [ 28.417357] ? kasan_end_report+0x32/0x50 [ 28.417361] ? lock_downgrade+0x980/0x980 [ 28.417364] ? vsnprintf+0x1ed/0x1900 [ 28.417368] ? __lock_acquire+0x3cd0/0x3e00 [ 28.417371] panic+0x1e4/0x41c [ 28.417374] ? refcount_error_report+0x214/0x214 [ 28.417378] ? add_taint+0x40/0x50 [ 28.417381] ? add_taint+0x1c/0x50 [ 28.417385] ? __lock_acquire+0x3d4d/0x3e00 [ 28.417388] kasan_end_report+0x50/0x50 [ 28.417392] kasan_report+0x144/0x340 [ 28.417396] __asan_report_load8_noabort+0x14/0x20 [ 28.417399] __lock_acquire+0x3d4d/0x3e00 [ 28.417403] ? __lock_acquire+0x664/0x3e00 [ 28.417406] ? lock_downgrade+0x980/0x980 [ 28.417409] ? lock_downgrade+0x980/0x980 [ 28.417413] ? remove_wait_queue+0x81/0x350 [ 28.417418] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.417422] ? __lock_acquire+0x664/0x3e00 [ 28.417425] ? check_noncircular+0x20/0x20 [ 28.417431] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.417435] ? lock_acquire+0x1d5/0x580 [ 28.417438] ? lock_acquire+0x1d5/0x580 [ 28.417441] ? ep_free+0xf4/0x320 [ 28.417446] ? lock_release+0xa40/0xa40 [ 28.417449] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.417453] ? print_irqtrace_events+0x270/0x270 [ 28.417456] ? rcu_note_context_switch+0x710/0x710 [ 28.417460] ? __might_sleep+0x95/0x190 [ 28.417464] ? ep_free+0xf4/0x320 [ 28.417467] ? __mutex_lock+0x16f/0x1a80 [ 28.417469] ? ep_free+0xf4/0x320 [ 28.417473] ? print_irqtrace_events+0x270/0x270 [ 28.417476] ? ep_free+0xf4/0x320 [ 28.417480] lock_acquire+0x1d5/0x580 [ 28.417483] ? lock_acquire+0x1d5/0x580 [ 28.417486] ? remove_wait_queue+0x81/0x350 [ 28.417490] ? __lock_acquire+0x664/0x3e00 [ 28.417494] ? lock_release+0xa40/0xa40 [ 28.417499] ? lock_acquire+0x1d5/0x580 [ 28.417502] ? lock_acquire+0x1d5/0x580 [ 28.417505] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 28.417509] _raw_spin_lock_irqsave+0x96/0xc0 [ 28.417513] ? remove_wait_queue+0x81/0x350 [ 28.417516] remove_wait_queue+0x81/0x350 [ 28.417521] ? add_wait_queue+0x290/0x290 [ 28.417524] ? rcutorture_record_progress+0x10/0x10 [ 28.417529] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 28.417533] ? __kernel_text_address+0xd/0x40 [ 28.417537] ? clear_tfile_check_list+0x370/0x370 [ 28.417541] ? check_noncircular+0x20/0x20 [ 28.417546] ? locks_remove_file+0x3fa/0x5a0 [ 28.417550] ep_free+0x13f/0x320 [ 28.417554] ? ep_remove+0x800/0x800 [ 28.417557] ? fsnotify_first_mark+0x2b0/0x2b0 [ 28.417561] ? ep_free+0x320/0x320 [ 28.417564] ep_eventpoll_release+0x44/0x60 [ 28.417568] __fput+0x327/0x7e0 [ 28.417572] ? fput+0x140/0x140 [ 28.417576] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.417580] ____fput+0x15/0x20 [ 28.417584] task_work_run+0x199/0x270 [ 28.417588] ? task_work_cancel+0x210/0x210 [ 28.417592] ? _raw_spin_unlock+0x22/0x30 [ 28.417595] ? switch_task_namespaces+0x87/0xc0 [ 28.417599] do_exit+0x9bb/0x1ad0 [ 28.417603] ? binder_ioctl+0x4a1/0x1417 [ 28.417607] ? mm_update_next_owner+0x930/0x930 [ 28.417611] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 28.417616] ? avc_ss_reset+0x110/0x110 [ 28.417619] ? mutex_unlock+0xd/0x10 [ 28.417622] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 28.417632] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.417635] ? up_read+0x1a/0x40 [ 28.417639] ? rcu_note_context_switch+0x710/0x710 [ 28.417642] ? __fd_install+0x288/0x740 [ 28.417647] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 28.417651] ? do_vfs_ioctl+0x486/0x1520 [ 28.417654] ? _cond_resched+0x14/0x30 [ 28.417659] ? ioctl_preallocate+0x2b0/0x2b0 [ 28.417663] ? selinux_capable+0x40/0x40 [ 28.417667] ? __alloc_fd+0x750/0x750 [ 28.417672] do_group_exit+0x149/0x400 [ 28.417676] ? SyS_exit+0x30/0x30 [ 28.417680] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.417683] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.417688] SyS_exit_group+0x1d/0x20 [ 28.417691] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.417693] RIP: 0033:0x4429f8 [ 28.417695] RSP: 002b:00007ffe3f050648 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 28.417699] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 28.417701] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 28.417703] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 28.417705] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 28.417706] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 28.438179] Dumping ftrace buffer: [ 28.438183] (ftrace buffer empty) [ 28.438185] Kernel Offset: disabled [ 29.563071] Rebooting in 86400 seconds..