[....] Starting enhanced syslogd: rsyslogd[ 11.300691] audit: type=1400 audit(1515010691.930:5): avc: denied { syslog } for pid=3323 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.971961] audit: type=1400 audit(1515010696.601:6): avc: denied { map } for pid=3461 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 '10.128.0.36' (ECDSA) to the list of known hosts. executing program [ 22.167297] audit: type=1400 audit(1515010702.797:7): avc: denied { map } for pid=3475 comm="syzkaller693954" path="/root/syzkaller693954057" 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.173229] ================================================================== [ 22.173246] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.173251] Read of size 8 at addr ffff8801c865b3b0 by task syzkaller693954/3475 [ 22.173252] [ 22.173259] CPU: 0 PID: 3475 Comm: syzkaller693954 Not tainted 4.15.0-rc6+ #246 [ 22.173262] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.173265] Call Trace: [ 22.173277] dump_stack+0x194/0x257 [ 22.173285] ? arch_local_irq_restore+0x53/0x53 [ 22.173292] ? show_regs_print_info+0x18/0x18 [ 22.173298] ? print_irqtrace_events+0x270/0x270 [ 22.173304] ? __lock_acquire+0x664/0x3e00 [ 22.173311] ? __lock_acquire+0x3d4d/0x3e00 [ 22.173320] print_address_description+0x73/0x250 [ 22.173326] ? __lock_acquire+0x3d4d/0x3e00 [ 22.173332] kasan_report+0x25b/0x340 [ 22.173341] __asan_report_load8_noabort+0x14/0x20 [ 22.173347] __lock_acquire+0x3d4d/0x3e00 [ 22.173352] ? __lock_acquire+0x664/0x3e00 [ 22.173358] ? lock_downgrade+0x980/0x980 [ 22.173363] ? lock_downgrade+0x980/0x980 [ 22.173371] ? remove_wait_queue+0x81/0x350 [ 22.173380] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.173387] ? __lock_acquire+0x664/0x3e00 [ 22.173392] ? check_noncircular+0x20/0x20 [ 22.173404] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.173411] ? lock_acquire+0x1d5/0x580 [ 22.173416] ? lock_acquire+0x1d5/0x580 [ 22.173424] ? ep_free+0xf4/0x320 [ 22.173432] ? lock_release+0xa40/0xa40 [ 22.173440] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.173446] ? print_irqtrace_events+0x270/0x270 [ 22.173454] ? rcu_note_context_switch+0x710/0x710 [ 22.173462] ? __might_sleep+0x95/0x190 [ 22.173467] ? ep_free+0xf4/0x320 [ 22.173473] ? __mutex_lock+0x16f/0x1a80 [ 22.173478] ? ep_free+0xf4/0x320 [ 22.173485] ? print_irqtrace_events+0x270/0x270 [ 22.173495] ? ep_free+0xf4/0x320 [ 22.173503] lock_acquire+0x1d5/0x580 [ 22.173508] ? lock_acquire+0x1d5/0x580 [ 22.173514] ? remove_wait_queue+0x81/0x350 [ 22.173520] ? __lock_acquire+0x664/0x3e00 [ 22.173527] ? lock_release+0xa40/0xa40 [ 22.173536] ? lock_acquire+0x1d5/0x580 [ 22.173542] ? lock_acquire+0x1d5/0x580 [ 22.173548] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.173556] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.173561] ? remove_wait_queue+0x81/0x350 [ 22.173568] remove_wait_queue+0x81/0x350 [ 22.173575] ? add_wait_queue+0x290/0x290 [ 22.173581] ? rcutorture_record_progress+0x10/0x10 [ 22.173591] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.173599] ? __kernel_text_address+0xd/0x40 [ 22.173607] ? clear_tfile_check_list+0x370/0x370 [ 22.173615] ? check_noncircular+0x20/0x20 [ 22.173624] ? locks_remove_file+0x3fa/0x5a0 [ 22.173634] ep_free+0x13f/0x320 [ 22.173640] ? ep_remove+0x800/0x800 [ 22.173645] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.173653] ? ep_free+0x320/0x320 [ 22.173659] ep_eventpoll_release+0x44/0x60 [ 22.173667] __fput+0x327/0x7e0 [ 22.173676] ? fput+0x140/0x140 [ 22.173683] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.173691] ____fput+0x15/0x20 [ 22.173697] task_work_run+0x199/0x270 [ 22.173704] ? task_work_cancel+0x210/0x210 [ 22.173711] ? _raw_spin_unlock+0x22/0x30 [ 22.173717] ? switch_task_namespaces+0x87/0xc0 [ 22.173727] do_exit+0x9bb/0x1ad0 [ 22.173735] ? binder_ioctl+0x551/0x1417 [ 22.173741] ? mm_update_next_owner+0x930/0x930 [ 22.173749] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.173759] ? avc_ss_reset+0x110/0x110 [ 22.173765] ? mutex_unlock+0xd/0x10 [ 22.173770] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.173789] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.173794] ? up_read+0x1a/0x40 [ 22.173800] ? rcu_note_context_switch+0x710/0x710 [ 22.173805] ? __fd_install+0x288/0x740 [ 22.173814] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.173820] ? do_vfs_ioctl+0x486/0x1520 [ 22.173824] ? _cond_resched+0x14/0x30 [ 22.173832] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.173839] ? selinux_capable+0x40/0x40 [ 22.173846] ? __alloc_fd+0x750/0x750 [ 22.173854] do_group_exit+0x149/0x400 [ 22.173860] ? SyS_exit+0x30/0x30 [ 22.173867] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.173875] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.173882] SyS_exit_group+0x1d/0x20 [ 22.173889] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.173894] RIP: 0033:0x4429f8 [ 22.173897] RSP: 002b:00007ffd85d8c398 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.173904] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.173907] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.173910] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.173914] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.173917] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.173925] [ 22.173928] Allocated by task 3475: [ 22.173934] save_stack+0x43/0xd0 [ 22.173938] kasan_kmalloc+0xad/0xe0 [ 22.173943] kmem_cache_alloc_trace+0x136/0x750 [ 22.173947] binder_get_thread+0x1cf/0x870 [ 22.173951] binder_poll+0x8c/0x390 [ 22.173956] ep_item_poll.isra.10+0xec/0x320 [ 22.173961] ep_insert+0x6a3/0x1b10 [ 22.173966] SyS_epoll_ctl+0x12e4/0x1ab0 [ 22.173971] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.173972] [ 22.173974] Freed by task 3475: [ 22.173979] save_stack+0x43/0xd0 [ 22.173983] kasan_slab_free+0x71/0xc0 [ 22.173987] kfree+0xd6/0x260 [ 22.173992] binder_thread_dec_tmpref+0x27f/0x310 [ 22.173996] binder_thread_release+0x27d/0x540 [ 22.174004] binder_ioctl+0xc02/0x1417 [ 22.174008] do_vfs_ioctl+0x1b1/0x1520 [ 22.174012] SyS_ioctl+0x8f/0xc0 [ 22.174018] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.174019] [ 22.174023] The buggy address belongs to the object at ffff8801c865b300 [ 22.174023] which belongs to the cache kmalloc-512 of size 512 [ 22.174028] The buggy address is located 176 bytes inside of [ 22.174028] 512-byte region [ffff8801c865b300, ffff8801c865b500) [ 22.174029] The buggy address belongs to the page: [ 22.174035] page:00000000691489a6 count:1 mapcount:0 mapping:000000008633c280 index:0x0 [ 22.174040] flags: 0x2fffc0000000100(slab) [ 22.174049] raw: 02fffc0000000100 ffff8801c865b080 0000000000000000 0000000100000006 [ 22.174056] raw: ffffea0007398aa0 ffffea0007398b60 ffff8801dac00940 0000000000000000 [ 22.174058] page dumped because: kasan: bad access detected [ 22.174059] [ 22.174060] Memory state around the buggy address: [ 22.174065] ffff8801c865b280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.174069] ffff8801c865b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.174074] >ffff8801c865b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.174076] ^ [ 22.174080] ffff8801c865b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.174084] ffff8801c865b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.174086] ================================================================== [ 22.174088] Disabling lock debugging due to kernel taint [ 22.174092] Kernel panic - not syncing: panic_on_warn set ... [ 22.174092] [ 22.174098] CPU: 0 PID: 3475 Comm: syzkaller693954 Tainted: G B 4.15.0-rc6+ #246 [ 22.174101] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.174102] Call Trace: [ 22.174108] dump_stack+0x194/0x257 [ 22.174115] ? arch_local_irq_restore+0x53/0x53 [ 22.174120] ? kasan_end_report+0x32/0x50 [ 22.174127] ? lock_downgrade+0x980/0x980 [ 22.174133] ? vsnprintf+0x1ed/0x1900 [ 22.174139] ? __lock_acquire+0x3cb0/0x3e00 [ 22.174145] panic+0x1e4/0x41c [ 22.174150] ? refcount_error_report+0x214/0x214 [ 22.174157] ? add_taint+0x40/0x50 [ 22.174162] ? add_taint+0x1c/0x50 [ 22.174169] ? __lock_acquire+0x3d4d/0x3e00 [ 22.174175] kasan_end_report+0x50/0x50 [ 22.174180] kasan_report+0x144/0x340 [ 22.174188] __asan_report_load8_noabort+0x14/0x20 [ 22.174194] __lock_acquire+0x3d4d/0x3e00 [ 22.174199] ? __lock_acquire+0x664/0x3e00 [ 22.174204] ? lock_downgrade+0x980/0x980 [ 22.174210] ? lock_downgrade+0x980/0x980 [ 22.174217] ? remove_wait_queue+0x81/0x350 [ 22.174225] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.174232] ? __lock_acquire+0x664/0x3e00 [ 22.174237] ? check_noncircular+0x20/0x20 [ 22.174249] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.174255] ? lock_acquire+0x1d5/0x580 [ 22.174261] ? lock_acquire+0x1d5/0x580 [ 22.174266] ? ep_free+0xf4/0x320 [ 22.174274] ? lock_release+0xa40/0xa40 [ 22.174280] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.174285] ? print_irqtrace_events+0x270/0x270 [ 22.174292] ? rcu_note_context_switch+0x710/0x710 [ 22.174299] ? __might_sleep+0x95/0x190 [ 22.174304] ? ep_free+0xf4/0x320 [ 22.174310] ? __mutex_lock+0x16f/0x1a80 [ 22.174314] ? ep_free+0xf4/0x320 [ 22.174321] ? print_irqtrace_events+0x270/0x270 [ 22.174326] ? ep_free+0xf4/0x320 [ 22.174334] lock_acquire+0x1d5/0x580 [ 22.174339] ? lock_acquire+0x1d5/0x580 [ 22.174345] ? remove_wait_queue+0x81/0x350 [ 22.174350] ? __lock_acquire+0x664/0x3e00 [ 22.174358] ? lock_release+0xa40/0xa40 [ 22.174366] ? lock_acquire+0x1d5/0x580 [ 22.174371] ? lock_acquire+0x1d5/0x580 [ 22.174377] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.174384] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.174390] ? remove_wait_queue+0x81/0x350 [ 22.174396] remove_wait_queue+0x81/0x350 [ 22.174404] ? add_wait_queue+0x290/0x290 [ 22.174409] ? rcutorture_record_progress+0x10/0x10 [ 22.174419] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.174425] ? __kernel_text_address+0xd/0x40 [ 22.174433] ? clear_tfile_check_list+0x370/0x370 [ 22.174440] ? check_noncircular+0x20/0x20 [ 22.174448] ? locks_remove_file+0x3fa/0x5a0 [ 22.174457] ep_free+0x13f/0x320 [ 22.174462] ? ep_remove+0x800/0x800 [ 22.174468] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.174475] ? ep_free+0x320/0x320 [ 22.174481] ep_eventpoll_release+0x44/0x60 [ 22.174492] __fput+0x327/0x7e0 [ 22.174501] ? fput+0x140/0x140 [ 22.174507] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.174515] ____fput+0x15/0x20 [ 22.174521] task_work_run+0x199/0x270 [ 22.174529] ? task_work_cancel+0x210/0x210 [ 22.174535] ? _raw_spin_unlock+0x22/0x30 [ 22.174541] ? switch_task_namespaces+0x87/0xc0 [ 22.174548] do_exit+0x9bb/0x1ad0 [ 22.174555] ? binder_ioctl+0x551/0x1417 [ 22.174561] ? mm_update_next_owner+0x930/0x930 [ 22.174568] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.174576] ? avc_ss_reset+0x110/0x110 [ 22.174581] ? mutex_unlock+0xd/0x10 [ 22.174587] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.174604] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.174609] ? up_read+0x1a/0x40 [ 22.174615] ? rcu_note_context_switch+0x710/0x710 [ 22.174620] ? __fd_install+0x288/0x740 [ 22.174628] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.174633] ? do_vfs_ioctl+0x486/0x1520 [ 22.174638] ? _cond_resched+0x14/0x30 [ 22.174645] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.174652] ? selinux_capable+0x40/0x40 [ 22.174658] ? __alloc_fd+0x750/0x750 [ 22.174666] do_group_exit+0x149/0x400 [ 22.174672] ? SyS_exit+0x30/0x30 [ 22.174679] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.174685] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.174692] SyS_exit_group+0x1d/0x20 [ 22.174699] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.174702] RIP: 0033:0x4429f8 [ 22.174705] RSP: 002b:00007ffd85d8c398 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.174710] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.174714] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.174717] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.174720] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.174723] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.193611] Dumping ftrace buffer: [ 22.193615] (ftrace buffer empty) [ 22.193617] Kernel Offset: disabled [ 23.315529] Rebooting in 86400 seconds..