[....] Starting enhanced syslogd: rsyslogd[ 11.926390] audit: type=1400 audit(1515671071.248:5): avc: denied { syslog } for pid=3340 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.290283] audit: type=1400 audit(1515671075.612:6): avc: denied { map } for pid=3480 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.51' (ECDSA) to the list of known hosts. executing program [ 22.448569] audit: type=1400 audit(1515671081.770:7): avc: denied { map } for pid=3494 comm="syzkaller685314" path="/root/syzkaller685314653" 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.454156] ================================================================== [ 22.454170] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.454176] Read of size 8 at addr ffff8801ce765af0 by task syzkaller685314/3494 [ 22.454177] [ 22.454184] CPU: 0 PID: 3494 Comm: syzkaller685314 Not tainted 4.15.0-rc7+ #257 [ 22.454187] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.454189] Call Trace: [ 22.454199] dump_stack+0x194/0x257 [ 22.454206] ? arch_local_irq_restore+0x53/0x53 [ 22.454214] ? show_regs_print_info+0x18/0x18 [ 22.454220] ? print_irqtrace_events+0x270/0x270 [ 22.454226] ? __lock_acquire+0x664/0x3e00 [ 22.454232] ? __lock_acquire+0x3d4d/0x3e00 [ 22.454241] print_address_description+0x73/0x250 [ 22.454247] ? __lock_acquire+0x3d4d/0x3e00 [ 22.454253] kasan_report+0x25b/0x340 [ 22.454262] __asan_report_load8_noabort+0x14/0x20 [ 22.454267] __lock_acquire+0x3d4d/0x3e00 [ 22.454273] ? __lock_acquire+0x664/0x3e00 [ 22.454279] ? lock_downgrade+0x980/0x980 [ 22.454284] ? lock_downgrade+0x980/0x980 [ 22.454293] ? remove_wait_queue+0x81/0x350 [ 22.454302] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.454308] ? __lock_acquire+0x664/0x3e00 [ 22.454314] ? check_noncircular+0x20/0x20 [ 22.454326] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.454333] ? lock_acquire+0x1d5/0x580 [ 22.454338] ? lock_acquire+0x1d5/0x580 [ 22.454346] ? ep_free+0xf4/0x320 [ 22.454354] ? lock_release+0xa40/0xa40 [ 22.454360] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.454366] ? print_irqtrace_events+0x270/0x270 [ 22.454374] ? rcu_note_context_switch+0x710/0x710 [ 22.454381] ? __might_sleep+0x95/0x190 [ 22.454387] ? ep_free+0xf4/0x320 [ 22.454393] ? __mutex_lock+0x16f/0x1a80 [ 22.454398] ? ep_free+0xf4/0x320 [ 22.454405] ? print_irqtrace_events+0x270/0x270 [ 22.454409] ? ep_free+0xf4/0x320 [ 22.454417] lock_acquire+0x1d5/0x580 [ 22.454423] ? lock_acquire+0x1d5/0x580 [ 22.454429] ? remove_wait_queue+0x81/0x350 [ 22.454434] ? __lock_acquire+0x664/0x3e00 [ 22.454441] ? lock_release+0xa40/0xa40 [ 22.454451] ? lock_acquire+0x1d5/0x580 [ 22.454456] ? lock_acquire+0x1d5/0x580 [ 22.454462] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.454470] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.454475] ? remove_wait_queue+0x81/0x350 [ 22.454482] remove_wait_queue+0x81/0x350 [ 22.454490] ? add_wait_queue+0x290/0x290 [ 22.454495] ? rcutorture_record_progress+0x10/0x10 [ 22.454505] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.454513] ? __kernel_text_address+0xd/0x40 [ 22.454521] ? clear_tfile_check_list+0x370/0x370 [ 22.454529] ? check_noncircular+0x20/0x20 [ 22.454537] ? locks_remove_file+0x3fa/0x5a0 [ 22.454547] ep_free+0x13f/0x320 [ 22.454553] ? ep_remove+0x800/0x800 [ 22.454559] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.454566] ? ep_free+0x320/0x320 [ 22.454573] ep_eventpoll_release+0x44/0x60 [ 22.454579] __fput+0x327/0x7e0 [ 22.454588] ? fput+0x140/0x140 [ 22.454594] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.454603] ____fput+0x15/0x20 [ 22.454609] task_work_run+0x199/0x270 [ 22.454617] ? task_work_cancel+0x210/0x210 [ 22.454623] ? _raw_spin_unlock+0x22/0x30 [ 22.454629] ? switch_task_namespaces+0x87/0xc0 [ 22.454637] do_exit+0x9bb/0x1ad0 [ 22.454646] ? binder_ioctl+0x481/0x1417 [ 22.454652] ? mm_update_next_owner+0x930/0x930 [ 22.454659] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.454669] ? avc_ss_reset+0x110/0x110 [ 22.454674] ? mutex_unlock+0xd/0x10 [ 22.454680] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.454699] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.454704] ? up_read+0x1a/0x40 [ 22.454710] ? rcu_note_context_switch+0x710/0x710 [ 22.454716] ? __fd_install+0x288/0x740 [ 22.454725] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.454730] ? do_vfs_ioctl+0x486/0x1520 [ 22.454735] ? _cond_resched+0x14/0x30 [ 22.454742] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.454750] ? selinux_capable+0x40/0x40 [ 22.454756] ? __alloc_fd+0x750/0x750 [ 22.454764] do_group_exit+0x149/0x400 [ 22.454771] ? SyS_exit+0x30/0x30 [ 22.454778] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.454785] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.454792] SyS_exit_group+0x1d/0x20 [ 22.454799] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.454803] RIP: 0033:0x4429f8 [ 22.454806] RSP: 002b:00007ffd2f12bad8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.454813] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.454816] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.454819] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.454822] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.454826] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.454834] [ 22.454837] Allocated by task 3494: [ 22.454842] save_stack+0x43/0xd0 [ 22.454847] kasan_kmalloc+0xad/0xe0 [ 22.454852] kmem_cache_alloc_trace+0x136/0x750 [ 22.454856] binder_get_thread+0x1cf/0x870 [ 22.454860] binder_poll+0x8c/0x390 [ 22.454865] ep_item_poll.isra.10+0xec/0x320 [ 22.454870] ep_insert+0x6a3/0x1b10 [ 22.454875] SyS_epoll_ctl+0x12e4/0x1ab0 [ 22.454880] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.454881] [ 22.454883] Freed by task 3494: [ 22.454888] save_stack+0x43/0xd0 [ 22.454892] kasan_slab_free+0x71/0xc0 [ 22.454897] kfree+0xd6/0x260 [ 22.454901] binder_thread_dec_tmpref+0x27f/0x310 [ 22.454906] binder_thread_release+0x27d/0x540 [ 22.454910] binder_ioctl+0xc02/0x1417 [ 22.454914] do_vfs_ioctl+0x1b1/0x1520 [ 22.454919] SyS_ioctl+0x8f/0xc0 [ 22.454924] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.454925] [ 22.454929] The buggy address belongs to the object at ffff8801ce765a40 [ 22.454929] which belongs to the cache kmalloc-512 of size 512 [ 22.454934] The buggy address is located 176 bytes inside of [ 22.454934] 512-byte region [ffff8801ce765a40, ffff8801ce765c40) [ 22.454935] The buggy address belongs to the page: [ 22.454940] page:ffffea000739d940 count:1 mapcount:0 mapping:ffff8801ce765040 index:0x0 [ 22.454945] flags: 0x2fffc0000000100(slab) [ 22.454953] raw: 02fffc0000000100 ffff8801ce765040 0000000000000000 0000000100000006 [ 22.454960] raw: ffffea0007256420 ffffea00072433e0 ffff8801dac00940 0000000000000000 [ 22.454962] page dumped because: kasan: bad access detected [ 22.454963] [ 22.454964] Memory state around the buggy address: [ 22.454969] ffff8801ce765980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.454973] ffff8801ce765a00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.454978] >ffff8801ce765a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.454980] ^ [ 22.454984] ffff8801ce765b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.454988] ffff8801ce765b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.454990] ================================================================== [ 22.454992] Disabling lock debugging due to kernel taint [ 22.454995] Kernel panic - not syncing: panic_on_warn set ... [ 22.454995] [ 22.455007] CPU: 0 PID: 3494 Comm: syzkaller685314 Tainted: G B 4.15.0-rc7+ #257 [ 22.455010] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.455012] Call Trace: [ 22.455018] dump_stack+0x194/0x257 [ 22.455025] ? arch_local_irq_restore+0x53/0x53 [ 22.455030] ? kasan_end_report+0x32/0x50 [ 22.455036] ? lock_downgrade+0x980/0x980 [ 22.455043] ? vsnprintf+0x1ed/0x1900 [ 22.455049] ? __lock_acquire+0x3cb0/0x3e00 [ 22.455054] panic+0x1e4/0x41c [ 22.455060] ? refcount_error_report+0x214/0x214 [ 22.455067] ? add_taint+0x40/0x50 [ 22.455072] ? add_taint+0x1c/0x50 [ 22.455079] ? __lock_acquire+0x3d4d/0x3e00 [ 22.455085] kasan_end_report+0x50/0x50 [ 22.455090] kasan_report+0x144/0x340 [ 22.455098] __asan_report_load8_noabort+0x14/0x20 [ 22.455104] __lock_acquire+0x3d4d/0x3e00 [ 22.455109] ? __lock_acquire+0x664/0x3e00 [ 22.455115] ? lock_downgrade+0x980/0x980 [ 22.455120] ? lock_downgrade+0x980/0x980 [ 22.455127] ? remove_wait_queue+0x81/0x350 [ 22.455136] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.455142] ? __lock_acquire+0x664/0x3e00 [ 22.455147] ? check_noncircular+0x20/0x20 [ 22.455159] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.455166] ? lock_acquire+0x1d5/0x580 [ 22.455172] ? lock_acquire+0x1d5/0x580 [ 22.455177] ? ep_free+0xf4/0x320 [ 22.455185] ? lock_release+0xa40/0xa40 [ 22.455191] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.455197] ? print_irqtrace_events+0x270/0x270 [ 22.455203] ? rcu_note_context_switch+0x710/0x710 [ 22.455210] ? __might_sleep+0x95/0x190 [ 22.455216] ? ep_free+0xf4/0x320 [ 22.455221] ? __mutex_lock+0x16f/0x1a80 [ 22.455226] ? ep_free+0xf4/0x320 [ 22.455233] ? print_irqtrace_events+0x270/0x270 [ 22.455238] ? ep_free+0xf4/0x320 [ 22.455246] lock_acquire+0x1d5/0x580 [ 22.455251] ? lock_acquire+0x1d5/0x580 [ 22.455256] ? remove_wait_queue+0x81/0x350 [ 22.455262] ? __lock_acquire+0x664/0x3e00 [ 22.455269] ? lock_release+0xa40/0xa40 [ 22.455278] ? lock_acquire+0x1d5/0x580 [ 22.455283] ? lock_acquire+0x1d5/0x580 [ 22.455290] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.455297] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.455302] ? remove_wait_queue+0x81/0x350 [ 22.455309] remove_wait_queue+0x81/0x350 [ 22.455316] ? add_wait_queue+0x290/0x290 [ 22.455322] ? rcutorture_record_progress+0x10/0x10 [ 22.455332] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.455338] ? __kernel_text_address+0xd/0x40 [ 22.455346] ? clear_tfile_check_list+0x370/0x370 [ 22.455353] ? check_noncircular+0x20/0x20 [ 22.455361] ? locks_remove_file+0x3fa/0x5a0 [ 22.455370] ep_free+0x13f/0x320 [ 22.455376] ? ep_remove+0x800/0x800 [ 22.455381] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.455389] ? ep_free+0x320/0x320 [ 22.455395] ep_eventpoll_release+0x44/0x60 [ 22.455401] __fput+0x327/0x7e0 [ 22.455409] ? fput+0x140/0x140 [ 22.455416] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.455424] ____fput+0x15/0x20 [ 22.455430] task_work_run+0x199/0x270 [ 22.455437] ? task_work_cancel+0x210/0x210 [ 22.455443] ? _raw_spin_unlock+0x22/0x30 [ 22.455449] ? switch_task_namespaces+0x87/0xc0 [ 22.455456] do_exit+0x9bb/0x1ad0 [ 22.455463] ? binder_ioctl+0x481/0x1417 [ 22.455469] ? mm_update_next_owner+0x930/0x930 [ 22.455477] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.455485] ? avc_ss_reset+0x110/0x110 [ 22.455490] ? mutex_unlock+0xd/0x10 [ 22.455496] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 22.455513] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.455518] ? up_read+0x1a/0x40 [ 22.455525] ? rcu_note_context_switch+0x710/0x710 [ 22.455529] ? __fd_install+0x288/0x740 [ 22.455538] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.455543] ? do_vfs_ioctl+0x486/0x1520 [ 22.455548] ? _cond_resched+0x14/0x30 [ 22.455555] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.455562] ? selinux_capable+0x40/0x40 [ 22.455568] ? __alloc_fd+0x750/0x750 [ 22.455576] do_group_exit+0x149/0x400 [ 22.455583] ? SyS_exit+0x30/0x30 [ 22.455589] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.455595] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.455603] SyS_exit_group+0x1d/0x20 [ 22.455609] entry_SYSCALL_64_fastpath+0x23/0x9a [ 22.455612] RIP: 0033:0x4429f8 [ 22.455615] RSP: 002b:00007ffd2f12bad8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.455621] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.455624] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.455627] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.455631] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.455634] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.474914] Dumping ftrace buffer: [ 22.474918] (ftrace buffer empty) [ 22.474920] Kernel Offset: disabled [ 23.598751] Rebooting in 86400 seconds..