[....] Starting enhanced syslogd: rsyslogd[ 10.221230] audit: type=1400 audit(1514872682.364:5): avc: denied { syslog } for pid=2996 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.296171] audit: type=1400 audit(1514872688.438:6): avc: denied { map } for pid=3137 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.43' (ECDSA) to the list of known hosts. executing program [ 36.070101] audit: type=1400 audit(1514872708.212:7): avc: denied { map } for pid=3155 comm="syzkaller740805" path="/root/syzkaller740805488" 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.075066] ================================================================== [ 36.075078] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 36.075081] Read of size 8 at addr ffff8801c9bc6878 by task syzkaller740805/3155 [ 36.075082] [ 36.075087] CPU: 0 PID: 3155 Comm: syzkaller740805 Not tainted 4.15.0-rc4-mm1+ #49 [ 36.075089] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.075090] Call Trace: [ 36.075098] dump_stack+0x194/0x257 [ 36.075103] ? arch_local_irq_restore+0x53/0x53 [ 36.075109] ? show_regs_print_info+0x18/0x18 [ 36.075113] ? print_irqtrace_events+0x270/0x270 [ 36.075117] ? __lock_acquire+0x664/0x3e00 [ 36.075121] ? __lock_acquire+0x3d4d/0x3e00 [ 36.075127] print_address_description+0x73/0x250 [ 36.075131] ? __lock_acquire+0x3d4d/0x3e00 [ 36.075134] kasan_report+0x23b/0x360 [ 36.075139] __asan_report_load8_noabort+0x14/0x20 [ 36.075143] __lock_acquire+0x3d4d/0x3e00 [ 36.075146] ? __lock_acquire+0x664/0x3e00 [ 36.075150] ? lock_downgrade+0x980/0x980 [ 36.075153] ? lock_downgrade+0x980/0x980 [ 36.075159] ? remove_wait_queue+0x81/0x350 [ 36.075165] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.075169] ? __lock_acquire+0x664/0x3e00 [ 36.075172] ? check_noncircular+0x20/0x20 [ 36.075180] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.075184] ? lock_acquire+0x1d5/0x580 [ 36.075188] ? lock_acquire+0x1d5/0x580 [ 36.075192] ? ep_free+0xf4/0x320 [ 36.075197] ? lock_release+0xa40/0xa40 [ 36.075202] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.075206] ? print_irqtrace_events+0x270/0x270 [ 36.075212] ? rcu_note_context_switch+0x710/0x710 [ 36.075216] ? __might_sleep+0x95/0x190 [ 36.075220] ? ep_free+0xf4/0x320 [ 36.075224] ? __mutex_lock+0x16f/0x1a80 [ 36.075226] ? ep_free+0xf4/0x320 [ 36.075231] ? print_irqtrace_events+0x270/0x270 [ 36.075233] ? ep_free+0xf4/0x320 [ 36.075238] lock_acquire+0x1d5/0x580 [ 36.075242] ? lock_acquire+0x1d5/0x580 [ 36.075245] ? remove_wait_queue+0x81/0x350 [ 36.075250] ? __lock_acquire+0x664/0x3e00 [ 36.075257] ? lock_release+0xa40/0xa40 [ 36.075264] ? lock_acquire+0x1d5/0x580 [ 36.075267] ? lock_acquire+0x1d5/0x580 [ 36.075271] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 36.075277] _raw_spin_lock_irqsave+0x96/0xc0 [ 36.075280] ? remove_wait_queue+0x81/0x350 [ 36.075284] remove_wait_queue+0x81/0x350 [ 36.075289] ? add_wait_queue+0x290/0x290 [ 36.075293] ? rcutorture_record_progress+0x10/0x10 [ 36.075299] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 36.075306] ? __kernel_text_address+0xd/0x40 [ 36.075310] ? clear_tfile_check_list+0x370/0x370 [ 36.075315] ? check_noncircular+0x20/0x20 [ 36.075322] ? locks_remove_file+0x3fa/0x5a0 [ 36.075328] ep_free+0x13f/0x320 [ 36.075331] ? ep_remove+0x800/0x800 [ 36.075335] ? fsnotify_first_mark+0x2b0/0x2b0 [ 36.075340] ? ep_free+0x320/0x320 [ 36.075343] ep_eventpoll_release+0x44/0x60 [ 36.075348] __fput+0x327/0x7e0 [ 36.075353] ? fput+0x140/0x140 [ 36.075357] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.075362] ____fput+0x15/0x20 [ 36.075366] task_work_run+0x199/0x270 [ 36.075371] ? task_work_cancel+0x210/0x210 [ 36.075375] ? _raw_spin_unlock+0x22/0x30 [ 36.075379] ? switch_task_namespaces+0x87/0xc0 [ 36.075385] do_exit+0x9bb/0x1ad0 [ 36.075391] ? binder_ioctl+0x551/0x1417 [ 36.075395] ? mm_update_next_owner+0x930/0x930 [ 36.075399] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 36.075406] ? avc_ss_reset+0x110/0x110 [ 36.075411] ? mutex_unlock+0xd/0x10 [ 36.075414] ? SyS_epoll_ctl+0x30a/0x1a80 [ 36.075426] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.075429] ? up_read+0x1a/0x40 [ 36.075433] ? rcu_note_context_switch+0x710/0x710 [ 36.075437] ? __fd_install+0x288/0x740 [ 36.075442] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 36.075446] ? do_vfs_ioctl+0x486/0x1520 [ 36.075449] ? _cond_resched+0x14/0x30 [ 36.075453] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.075458] ? selinux_capable+0x40/0x40 [ 36.075462] ? __alloc_fd+0x750/0x750 [ 36.075467] do_group_exit+0x149/0x400 [ 36.075471] ? SyS_exit+0x30/0x30 [ 36.075475] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.075480] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.075485] SyS_exit_group+0x1d/0x20 [ 36.075489] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.075492] RIP: 0033:0x4429f8 [ 36.075494] RSP: 002b:00007ffc17ec5948 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 36.075498] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 36.075500] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 36.075502] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 36.075504] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 36.075506] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 36.075511] [ 36.075513] Allocated by task 3155: [ 36.075517] save_stack+0x43/0xd0 [ 36.075520] kasan_kmalloc+0xad/0xe0 [ 36.075523] kmem_cache_alloc_trace+0x136/0x750 [ 36.075526] binder_get_thread+0x1cf/0x870 [ 36.075528] binder_poll+0x8c/0x390 [ 36.075531] ep_item_poll.isra.10+0xf2/0x320 [ 36.075534] ep_insert+0x6a2/0x1ac0 [ 36.075537] SyS_epoll_ctl+0x12bf/0x1a80 [ 36.075540] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.075541] [ 36.075542] Freed by task 3155: [ 36.075545] save_stack+0x43/0xd0 [ 36.075547] kasan_slab_free+0x71/0xc0 [ 36.075550] kfree+0xd6/0x260 [ 36.075553] binder_thread_dec_tmpref+0x27f/0x310 [ 36.075555] binder_thread_release+0x27d/0x540 [ 36.075558] binder_ioctl+0xc02/0x1417 [ 36.075560] do_vfs_ioctl+0x1b1/0x1520 [ 36.075563] SyS_ioctl+0x8f/0xc0 [ 36.075566] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.075566] [ 36.075569] The buggy address belongs to the object at ffff8801c9bc67c0 [ 36.075569] which belongs to the cache kmalloc-512 of size 512 [ 36.075572] The buggy address is located 184 bytes inside of [ 36.075572] 512-byte region [ffff8801c9bc67c0, ffff8801c9bc69c0) [ 36.075573] The buggy address belongs to the page: [ 36.075576] page:ffffea000726f180 count:1 mapcount:0 mapping:ffff8801c9bc6040 index:0xffff8801c9bc6cc0 [ 36.075580] flags: 0x2fffc0000000100(slab) [ 36.075585] raw: 02fffc0000000100 ffff8801c9bc6040 ffff8801c9bc6cc0 0000000100000004 [ 36.075589] raw: ffffea00073b81a0 ffffea00072477e0 ffff8801dac00940 0000000000000000 [ 36.075591] page dumped because: kasan: bad access detected [ 36.075592] [ 36.075593] Memory state around the buggy address: [ 36.075596] ffff8801c9bc6700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 36.075598] ffff8801c9bc6780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 36.075601] >ffff8801c9bc6800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.075602] ^ [ 36.075605] ffff8801c9bc6880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.075607] ffff8801c9bc6900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.075608] ================================================================== [ 36.075610] Disabling lock debugging due to kernel taint [ 36.075612] Kernel panic - not syncing: panic_on_warn set ... [ 36.075612] [ 36.075615] CPU: 0 PID: 3155 Comm: syzkaller740805 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 36.075617] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.075618] Call Trace: [ 36.075622] dump_stack+0x194/0x257 [ 36.075626] ? arch_local_irq_restore+0x53/0x53 [ 36.075629] ? kasan_end_report+0x32/0x50 [ 36.075633] ? lock_downgrade+0x980/0x980 [ 36.075637] ? vsnprintf+0x1ed/0x1900 [ 36.075641] ? __lock_acquire+0x3c90/0x3e00 [ 36.075644] panic+0x1e4/0x41c [ 36.075648] ? refcount_error_report+0x214/0x214 [ 36.075652] ? add_taint+0x40/0x50 [ 36.075655] ? add_taint+0x1c/0x50 [ 36.075659] ? __lock_acquire+0x3d4d/0x3e00 [ 36.075662] kasan_end_report+0x50/0x50 [ 36.075666] kasan_report+0x148/0x360 [ 36.075670] __asan_report_load8_noabort+0x14/0x20 [ 36.075674] __lock_acquire+0x3d4d/0x3e00 [ 36.075677] ? __lock_acquire+0x664/0x3e00 [ 36.075680] ? lock_downgrade+0x980/0x980 [ 36.075683] ? lock_downgrade+0x980/0x980 [ 36.075688] ? remove_wait_queue+0x81/0x350 [ 36.075693] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.075696] ? __lock_acquire+0x664/0x3e00 [ 36.075700] ? check_noncircular+0x20/0x20 [ 36.075706] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 36.075710] ? lock_acquire+0x1d5/0x580 [ 36.075713] ? lock_acquire+0x1d5/0x580 [ 36.075716] ? ep_free+0xf4/0x320 [ 36.075721] ? lock_release+0xa40/0xa40 [ 36.075725] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.075728] ? print_irqtrace_events+0x270/0x270 [ 36.075732] ? rcu_note_context_switch+0x710/0x710 [ 36.075736] ? __might_sleep+0x95/0x190 [ 36.075740] ? ep_free+0xf4/0x320 [ 36.075743] ? __mutex_lock+0x16f/0x1a80 [ 36.075745] ? ep_free+0xf4/0x320 [ 36.075754] ? print_irqtrace_events+0x270/0x270 [ 36.075757] ? ep_free+0xf4/0x320 [ 36.075762] lock_acquire+0x1d5/0x580 [ 36.075765] ? lock_acquire+0x1d5/0x580 [ 36.075768] ? remove_wait_queue+0x81/0x350 [ 36.075772] ? __lock_acquire+0x664/0x3e00 [ 36.075776] ? lock_release+0xa40/0xa40 [ 36.075781] ? lock_acquire+0x1d5/0x580 [ 36.075784] ? lock_acquire+0x1d5/0x580 [ 36.075788] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 36.075792] _raw_spin_lock_irqsave+0x96/0xc0 [ 36.075795] ? remove_wait_queue+0x81/0x350 [ 36.075799] remove_wait_queue+0x81/0x350 [ 36.075803] ? add_wait_queue+0x290/0x290 [ 36.075807] ? rcutorture_record_progress+0x10/0x10 [ 36.075812] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 36.075816] ? __kernel_text_address+0xd/0x40 [ 36.075821] ? clear_tfile_check_list+0x370/0x370 [ 36.075825] ? check_noncircular+0x20/0x20 [ 36.075830] ? locks_remove_file+0x3fa/0x5a0 [ 36.075835] ep_free+0x13f/0x320 [ 36.075838] ? ep_remove+0x800/0x800 [ 36.075841] ? fsnotify_first_mark+0x2b0/0x2b0 [ 36.075845] ? ep_free+0x320/0x320 [ 36.075849] ep_eventpoll_release+0x44/0x60 [ 36.075852] __fput+0x327/0x7e0 [ 36.075857] ? fput+0x140/0x140 [ 36.075861] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.075865] ____fput+0x15/0x20 [ 36.075869] task_work_run+0x199/0x270 [ 36.075873] ? task_work_cancel+0x210/0x210 [ 36.075877] ? _raw_spin_unlock+0x22/0x30 [ 36.075880] ? switch_task_namespaces+0x87/0xc0 [ 36.075885] do_exit+0x9bb/0x1ad0 [ 36.075889] ? binder_ioctl+0x551/0x1417 [ 36.075892] ? mm_update_next_owner+0x930/0x930 [ 36.075896] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 36.075901] ? avc_ss_reset+0x110/0x110 [ 36.075905] ? mutex_unlock+0xd/0x10 [ 36.075908] ? SyS_epoll_ctl+0x30a/0x1a80 [ 36.075918] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 36.075921] ? up_read+0x1a/0x40 [ 36.075925] ? rcu_note_context_switch+0x710/0x710 [ 36.075928] ? __fd_install+0x288/0x740 [ 36.075932] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 36.075935] ? do_vfs_ioctl+0x486/0x1520 [ 36.075939] ? _cond_resched+0x14/0x30 [ 36.075943] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.075947] ? selinux_capable+0x40/0x40 [ 36.075951] ? __alloc_fd+0x750/0x750 [ 36.075955] do_group_exit+0x149/0x400 [ 36.075959] ? SyS_exit+0x30/0x30 [ 36.075963] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.075967] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.075971] SyS_exit_group+0x1d/0x20 [ 36.075975] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 36.075977] RIP: 0033:0x4429f8 [ 36.075979] RSP: 002b:00007ffc17ec5948 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 36.075982] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 36.075984] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 36.075986] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 36.075988] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 36.075990] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 36.095996] Dumping ftrace buffer: [ 36.096000] (ftrace buffer empty) [ 36.096002] Kernel Offset: disabled [ 37.242669] Rebooting in 86400 seconds..