[....] Starting enhanced syslogd: rsyslogd[ 10.776621] audit: type=1400 audit(1514313769.955:5): avc: denied { syslog } for pid=2999 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.850882] audit: type=1400 audit(1514313775.029:6): avc: denied { map } for pid=3139 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-9,10.128.0.79' (ECDSA) to the list of known hosts. executing program [ 22.042366] audit: type=1400 audit(1514313781.221:7): avc: denied { map } for pid=3153 comm="syzkaller196328" path="/root/syzkaller196328626" 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 [ 22.047146] ================================================================== [ 22.047162] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.047167] Read of size 8 at addr ffff8801ca044630 by task syzkaller196328/3153 [ 22.047168] [ 22.047176] CPU: 1 PID: 3153 Comm: syzkaller196328 Not tainted 4.15.0-rc5+ #237 [ 22.047179] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.047181] Call Trace: [ 22.047191] dump_stack+0x194/0x257 [ 22.047202] ? arch_local_irq_restore+0x53/0x53 [ 22.047210] ? show_regs_print_info+0x18/0x18 [ 22.047216] ? print_irqtrace_events+0x270/0x270 [ 22.047222] ? __lock_acquire+0x664/0x3e00 [ 22.047229] ? __lock_acquire+0x3d4d/0x3e00 [ 22.047237] print_address_description+0x73/0x250 [ 22.047243] ? __lock_acquire+0x3d4d/0x3e00 [ 22.047249] kasan_report+0x25b/0x340 [ 22.047257] __asan_report_load8_noabort+0x14/0x20 [ 22.047262] __lock_acquire+0x3d4d/0x3e00 [ 22.047268] ? __lock_acquire+0x664/0x3e00 [ 22.047274] ? lock_downgrade+0x980/0x980 [ 22.047279] ? lock_downgrade+0x980/0x980 [ 22.047287] ? remove_wait_queue+0x81/0x350 [ 22.047296] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.047302] ? __lock_acquire+0x664/0x3e00 [ 22.047308] ? check_noncircular+0x20/0x20 [ 22.047320] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.047327] ? lock_acquire+0x1d5/0x580 [ 22.047332] ? lock_acquire+0x1d5/0x580 [ 22.047339] ? ep_free+0xf4/0x320 [ 22.047347] ? lock_release+0xa40/0xa40 [ 22.047354] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.047360] ? print_irqtrace_events+0x270/0x270 [ 22.047366] ? rcu_note_context_switch+0x710/0x710 [ 22.047374] ? __might_sleep+0x95/0x190 [ 22.047379] ? ep_free+0xf4/0x320 [ 22.047385] ? __mutex_lock+0x16f/0x1a80 [ 22.047389] ? ep_free+0xf4/0x320 [ 22.047396] ? print_irqtrace_events+0x270/0x270 [ 22.047400] ? ep_free+0xf4/0x320 [ 22.047409] lock_acquire+0x1d5/0x580 [ 22.047414] ? lock_acquire+0x1d5/0x580 [ 22.047419] ? remove_wait_queue+0x81/0x350 [ 22.047425] ? __lock_acquire+0x664/0x3e00 [ 22.047432] ? lock_release+0xa40/0xa40 [ 22.047442] ? lock_acquire+0x1d5/0x580 [ 22.047447] ? lock_acquire+0x1d5/0x580 [ 22.047452] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.047460] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.047465] ? remove_wait_queue+0x81/0x350 [ 22.047472] remove_wait_queue+0x81/0x350 [ 22.047480] ? add_wait_queue+0x290/0x290 [ 22.047485] ? rcutorture_record_progress+0x10/0x10 [ 22.047495] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.047502] ? __kernel_text_address+0xd/0x40 [ 22.047509] ? clear_tfile_check_list+0x370/0x370 [ 22.047517] ? check_noncircular+0x20/0x20 [ 22.047524] ? locks_remove_file+0x3fa/0x5a0 [ 22.047533] ep_free+0x13f/0x320 [ 22.047539] ? ep_remove+0x800/0x800 [ 22.047545] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.047553] ? ep_free+0x320/0x320 [ 22.047558] ep_eventpoll_release+0x44/0x60 [ 22.047564] __fput+0x327/0x7e0 [ 22.047572] ? fput+0x140/0x140 [ 22.047579] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.047586] ____fput+0x15/0x20 [ 22.047593] task_work_run+0x199/0x270 [ 22.047600] ? task_work_cancel+0x210/0x210 [ 22.047606] ? _raw_spin_unlock+0x22/0x30 [ 22.047612] ? switch_task_namespaces+0x87/0xc0 [ 22.047621] do_exit+0x9bb/0x1ad0 [ 22.047630] ? binder_ioctl+0x4a1/0x1417 [ 22.047636] ? mm_update_next_owner+0x930/0x930 [ 22.047644] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.047654] ? avc_ss_reset+0x110/0x110 [ 22.047659] ? mutex_unlock+0xd/0x10 [ 22.047664] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.047683] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.047688] ? up_read+0x1a/0x40 [ 22.047694] ? rcu_note_context_switch+0x710/0x710 [ 22.047700] ? __fd_install+0x288/0x740 [ 22.047709] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.047715] ? do_vfs_ioctl+0x486/0x1520 [ 22.047721] ? _cond_resched+0x14/0x30 [ 22.047729] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.047737] ? selinux_capable+0x40/0x40 [ 22.047744] ? __alloc_fd+0x750/0x750 [ 22.047752] do_group_exit+0x149/0x400 [ 22.047758] ? SyS_exit+0x30/0x30 [ 22.047765] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.047773] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.047780] SyS_exit_group+0x1d/0x20 [ 22.047786] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.047791] RIP: 0033:0x4429f8 [ 22.047795] RSP: 002b:00007fff29ac8038 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.047801] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.047804] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.047808] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.047811] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.047814] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.047823] [ 22.047825] Allocated by task 3153: [ 22.047830] save_stack+0x43/0xd0 [ 22.047835] kasan_kmalloc+0xad/0xe0 [ 22.047843] kmem_cache_alloc_trace+0x136/0x750 [ 22.047848] binder_get_thread+0x1cf/0x870 [ 22.047853] binder_poll+0x8c/0x390 [ 22.047857] ep_item_poll.isra.10+0xec/0x320 [ 22.047861] ep_insert+0x6a3/0x1b10 [ 22.047866] SyS_epoll_ctl+0x12e4/0x1ab0 [ 22.047871] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.047872] [ 22.047874] Freed by task 3153: [ 22.047878] save_stack+0x43/0xd0 [ 22.047883] kasan_slab_free+0x71/0xc0 [ 22.047886] kfree+0xd6/0x260 [ 22.047891] binder_thread_dec_tmpref+0x27f/0x310 [ 22.047896] binder_thread_release+0x27d/0x540 [ 22.047900] binder_ioctl+0xc02/0x1417 [ 22.047906] do_vfs_ioctl+0x1b1/0x1520 [ 22.047911] SyS_ioctl+0x8f/0xc0 [ 22.047916] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.047917] [ 22.047921] The buggy address belongs to the object at ffff8801ca044580 [ 22.047921] which belongs to the cache kmalloc-512 of size 512 [ 22.047926] The buggy address is located 176 bytes inside of [ 22.047926] 512-byte region [ffff8801ca044580, ffff8801ca044780) [ 22.047928] The buggy address belongs to the page: [ 22.047934] page:000000009fe46fa9 count:1 mapcount:0 mapping:000000005c8de516 index:0x0 [ 22.047939] flags: 0x2fffc0000000100(slab) [ 22.047947] raw: 02fffc0000000100 ffff8801ca044080 0000000000000000 0000000100000006 [ 22.047954] raw: ffffea00072808a0 ffffea0007281220 ffff8801db000940 0000000000000000 [ 22.047956] page dumped because: kasan: bad access detected [ 22.047957] [ 22.047959] Memory state around the buggy address: [ 22.047964] ffff8801ca044500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.047968] ffff8801ca044580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.047972] >ffff8801ca044600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.047974] ^ [ 22.047978] ffff8801ca044680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.047982] ffff8801ca044700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.047984] ================================================================== [ 22.047986] Disabling lock debugging due to kernel taint [ 22.047989] Kernel panic - not syncing: panic_on_warn set ... [ 22.047989] [ 22.047995] CPU: 1 PID: 3153 Comm: syzkaller196328 Tainted: G B 4.15.0-rc5+ #237 [ 22.047998] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.048000] Call Trace: [ 22.048009] dump_stack+0x194/0x257 [ 22.048016] ? arch_local_irq_restore+0x53/0x53 [ 22.048021] ? kasan_end_report+0x32/0x50 [ 22.048027] ? lock_downgrade+0x980/0x980 [ 22.048032] ? vsnprintf+0x1ed/0x1900 [ 22.048038] ? __lock_acquire+0x3cd0/0x3e00 [ 22.048044] panic+0x1e4/0x41c [ 22.048050] ? refcount_error_report+0x214/0x214 [ 22.048056] ? add_taint+0x40/0x50 [ 22.048061] ? add_taint+0x1c/0x50 [ 22.048068] ? __lock_acquire+0x3d4d/0x3e00 [ 22.048074] kasan_end_report+0x50/0x50 [ 22.048079] kasan_report+0x144/0x340 [ 22.048087] __asan_report_load8_noabort+0x14/0x20 [ 22.048092] __lock_acquire+0x3d4d/0x3e00 [ 22.048098] ? __lock_acquire+0x664/0x3e00 [ 22.048103] ? lock_downgrade+0x980/0x980 [ 22.048109] ? lock_downgrade+0x980/0x980 [ 22.048116] ? remove_wait_queue+0x81/0x350 [ 22.048124] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.048131] ? __lock_acquire+0x664/0x3e00 [ 22.048136] ? check_noncircular+0x20/0x20 [ 22.048147] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.048154] ? lock_acquire+0x1d5/0x580 [ 22.048159] ? lock_acquire+0x1d5/0x580 [ 22.048164] ? ep_free+0xf4/0x320 [ 22.048172] ? lock_release+0xa40/0xa40 [ 22.048178] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.048184] ? print_irqtrace_events+0x270/0x270 [ 22.048190] ? rcu_note_context_switch+0x710/0x710 [ 22.048201] ? __might_sleep+0x95/0x190 [ 22.048206] ? ep_free+0xf4/0x320 [ 22.048211] ? __mutex_lock+0x16f/0x1a80 [ 22.048216] ? ep_free+0xf4/0x320 [ 22.048223] ? print_irqtrace_events+0x270/0x270 [ 22.048227] ? ep_free+0xf4/0x320 [ 22.048235] lock_acquire+0x1d5/0x580 [ 22.048240] ? lock_acquire+0x1d5/0x580 [ 22.048246] ? remove_wait_queue+0x81/0x350 [ 22.048251] ? __lock_acquire+0x664/0x3e00 [ 22.048259] ? lock_release+0xa40/0xa40 [ 22.048267] ? lock_acquire+0x1d5/0x580 [ 22.048272] ? lock_acquire+0x1d5/0x580 [ 22.048278] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.048285] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.048291] ? remove_wait_queue+0x81/0x350 [ 22.048297] remove_wait_queue+0x81/0x350 [ 22.048304] ? add_wait_queue+0x290/0x290 [ 22.048310] ? rcutorture_record_progress+0x10/0x10 [ 22.048319] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.048326] ? __kernel_text_address+0xd/0x40 [ 22.048333] ? clear_tfile_check_list+0x370/0x370 [ 22.048340] ? check_noncircular+0x20/0x20 [ 22.048348] ? locks_remove_file+0x3fa/0x5a0 [ 22.048356] ep_free+0x13f/0x320 [ 22.048361] ? ep_remove+0x800/0x800 [ 22.048367] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.048374] ? ep_free+0x320/0x320 [ 22.048380] ep_eventpoll_release+0x44/0x60 [ 22.048385] __fput+0x327/0x7e0 [ 22.048392] ? fput+0x140/0x140 [ 22.048399] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.048406] ____fput+0x15/0x20 [ 22.048413] task_work_run+0x199/0x270 [ 22.048420] ? task_work_cancel+0x210/0x210 [ 22.048426] ? _raw_spin_unlock+0x22/0x30 [ 22.048432] ? switch_task_namespaces+0x87/0xc0 [ 22.048439] do_exit+0x9bb/0x1ad0 [ 22.048446] ? binder_ioctl+0x4a1/0x1417 [ 22.048452] ? mm_update_next_owner+0x930/0x930 [ 22.048460] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.048468] ? avc_ss_reset+0x110/0x110 [ 22.048473] ? mutex_unlock+0xd/0x10 [ 22.048479] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.048496] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.048501] ? up_read+0x1a/0x40 [ 22.048507] ? rcu_note_context_switch+0x710/0x710 [ 22.048513] ? __fd_install+0x288/0x740 [ 22.048522] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 22.048528] ? do_vfs_ioctl+0x486/0x1520 [ 22.048533] ? _cond_resched+0x14/0x30 [ 22.048541] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.048548] ? selinux_capable+0x40/0x40 [ 22.048555] ? __alloc_fd+0x750/0x750 [ 22.048563] do_group_exit+0x149/0x400 [ 22.048569] ? SyS_exit+0x30/0x30 [ 22.048576] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.048582] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.048589] SyS_exit_group+0x1d/0x20 [ 22.048595] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.048599] RIP: 0033:0x4429f8 [ 22.048602] RSP: 002b:00007fff29ac8038 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.048608] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.048611] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.048614] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.048618] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.048621] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.068661] Dumping ftrace buffer: [ 22.068665] (ftrace buffer empty) [ 22.068668] Kernel Offset: disabled [ 23.191187] Rebooting in 86400 seconds..