[....] Starting enhanced syslogd: rsyslogd[ 10.104251] audit: type=1400 audit(1514261905.641: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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 15.205999] audit: type=1400 audit(1514261910.742:6): avc: denied { map } for pid=3140 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-mmots-kasan-gce-3,10.128.0.24' (ECDSA) to the list of known hosts. executing program [ 43.947131] audit: type=1400 audit(1514261939.483:7): avc: denied { map } for pid=3158 comm="syzkaller378336" path="/root/syzkaller378336125" 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 [ 43.951445] ================================================================== [ 43.951458] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 43.951462] Read of size 8 at addr ffff8801c94f13f8 by task syzkaller378336/3158 [ 43.951463] [ 43.951469] CPU: 1 PID: 3158 Comm: syzkaller378336 Not tainted 4.15.0-rc4-mm1+ #49 [ 43.951471] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.951473] Call Trace: [ 43.951481] dump_stack+0x194/0x257 [ 43.951486] ? arch_local_irq_restore+0x53/0x53 [ 43.951493] ? show_regs_print_info+0x18/0x18 [ 43.951496] ? print_irqtrace_events+0x270/0x270 [ 43.951500] ? __lock_acquire+0x664/0x3e00 [ 43.951504] ? __lock_acquire+0x3d4d/0x3e00 [ 43.951511] print_address_description+0x73/0x250 [ 43.951515] ? __lock_acquire+0x3d4d/0x3e00 [ 43.951519] kasan_report+0x23b/0x360 [ 43.951525] __asan_report_load8_noabort+0x14/0x20 [ 43.951528] __lock_acquire+0x3d4d/0x3e00 [ 43.951532] ? __lock_acquire+0x664/0x3e00 [ 43.951535] ? lock_downgrade+0x980/0x980 [ 43.951538] ? lock_downgrade+0x980/0x980 [ 43.951545] ? remove_wait_queue+0x81/0x350 [ 43.951550] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.951554] ? __lock_acquire+0x664/0x3e00 [ 43.951558] ? check_noncircular+0x20/0x20 [ 43.951566] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.951570] ? lock_acquire+0x1d5/0x580 [ 43.951573] ? lock_acquire+0x1d5/0x580 [ 43.951579] ? ep_free+0xf4/0x320 [ 43.951584] ? lock_release+0xa40/0xa40 [ 43.951590] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 43.951593] ? print_irqtrace_events+0x270/0x270 [ 43.951599] ? rcu_note_context_switch+0x710/0x710 [ 43.951604] ? __might_sleep+0x95/0x190 [ 43.951607] ? ep_free+0xf4/0x320 [ 43.951612] ? __mutex_lock+0x16f/0x1a80 [ 43.951615] ? ep_free+0xf4/0x320 [ 43.951619] ? print_irqtrace_events+0x270/0x270 [ 43.951622] ? ep_free+0xf4/0x320 [ 43.951629] lock_acquire+0x1d5/0x580 [ 43.951633] ? lock_acquire+0x1d5/0x580 [ 43.951637] ? remove_wait_queue+0x81/0x350 [ 43.951640] ? __lock_acquire+0x664/0x3e00 [ 43.951645] ? lock_release+0xa40/0xa40 [ 43.951656] ? lock_acquire+0x1d5/0x580 [ 43.951659] ? lock_acquire+0x1d5/0x580 [ 43.951663] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 43.951669] _raw_spin_lock_irqsave+0x96/0xc0 [ 43.951672] ? remove_wait_queue+0x81/0x350 [ 43.951676] remove_wait_queue+0x81/0x350 [ 43.951681] ? add_wait_queue+0x290/0x290 [ 43.951684] ? rcutorture_record_progress+0x10/0x10 [ 43.951691] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 43.951698] ? __kernel_text_address+0xd/0x40 [ 43.951703] ? clear_tfile_check_list+0x370/0x370 [ 43.951707] ? check_noncircular+0x20/0x20 [ 43.951715] ? locks_remove_file+0x3fa/0x5a0 [ 43.951721] ep_free+0x13f/0x320 [ 43.951725] ? ep_remove+0x800/0x800 [ 43.951728] ? fsnotify_first_mark+0x2b0/0x2b0 [ 43.951733] ? ep_free+0x320/0x320 [ 43.951737] ep_eventpoll_release+0x44/0x60 [ 43.951742] __fput+0x327/0x7e0 [ 43.951748] ? fput+0x140/0x140 [ 43.951751] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.951757] ____fput+0x15/0x20 [ 43.951761] task_work_run+0x199/0x270 [ 43.951765] ? task_work_cancel+0x210/0x210 [ 43.951769] ? _raw_spin_unlock+0x22/0x30 [ 43.951773] ? switch_task_namespaces+0x87/0xc0 [ 43.951780] do_exit+0x9bb/0x1ad0 [ 43.951787] ? binder_ioctl+0x551/0x1417 [ 43.951790] ? mm_update_next_owner+0x930/0x930 [ 43.951795] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 43.951803] ? avc_ss_reset+0x110/0x110 [ 43.951809] ? mutex_unlock+0xd/0x10 [ 43.951813] ? SyS_epoll_ctl+0x30a/0x1a80 [ 43.951825] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 43.951828] ? up_read+0x1a/0x40 [ 43.951832] ? rcu_note_context_switch+0x710/0x710 [ 43.951837] ? __fd_install+0x288/0x740 [ 43.951842] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 43.951847] ? do_vfs_ioctl+0x486/0x1520 [ 43.951850] ? _cond_resched+0x14/0x30 [ 43.951855] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.951860] ? selinux_capable+0x40/0x40 [ 43.951864] ? __alloc_fd+0x750/0x750 [ 43.951869] do_group_exit+0x149/0x400 [ 43.951873] ? SyS_exit+0x30/0x30 [ 43.951877] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.951883] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.951888] SyS_exit_group+0x1d/0x20 [ 43.951892] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 43.951895] RIP: 0033:0x4429f8 [ 43.951897] RSP: 002b:00007fffa95ad368 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 43.951902] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 43.951904] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 43.951906] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 43.951908] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 43.951909] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 43.951915] [ 43.951917] Allocated by task 3158: [ 43.951921] save_stack+0x43/0xd0 [ 43.951924] kasan_kmalloc+0xad/0xe0 [ 43.951927] kmem_cache_alloc_trace+0x136/0x750 [ 43.951930] binder_get_thread+0x1cf/0x870 [ 43.951932] binder_poll+0x8c/0x390 [ 43.951935] ep_item_poll.isra.10+0xf2/0x320 [ 43.951938] ep_insert+0x6a2/0x1ac0 [ 43.951941] SyS_epoll_ctl+0x12bf/0x1a80 [ 43.951944] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 43.951945] [ 43.951946] Freed by task 3158: [ 43.951949] save_stack+0x43/0xd0 [ 43.951952] kasan_slab_free+0x71/0xc0 [ 43.951954] kfree+0xd6/0x260 [ 43.951957] binder_thread_dec_tmpref+0x27f/0x310 [ 43.951959] binder_thread_release+0x27d/0x540 [ 43.951962] binder_ioctl+0xc02/0x1417 [ 43.951964] do_vfs_ioctl+0x1b1/0x1520 [ 43.951967] SyS_ioctl+0x8f/0xc0 [ 43.951970] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 43.951970] [ 43.951973] The buggy address belongs to the object at ffff8801c94f1340 [ 43.951973] which belongs to the cache kmalloc-512 of size 512 [ 43.951976] The buggy address is located 184 bytes inside of [ 43.951976] 512-byte region [ffff8801c94f1340, ffff8801c94f1540) [ 43.951977] The buggy address belongs to the page: [ 43.951980] page:ffffea0007253c40 count:1 mapcount:0 mapping:ffff8801c94f10c0 index:0x0 [ 43.951984] flags: 0x2fffc0000000100(slab) [ 43.951990] raw: 02fffc0000000100 ffff8801c94f10c0 0000000000000000 0000000100000006 [ 43.951994] raw: ffffea0007250ea0 ffffea0007254060 ffff8801dac00940 0000000000000000 [ 43.951995] page dumped because: kasan: bad access detected [ 43.951996] [ 43.951997] Memory state around the buggy address: [ 43.952003] ffff8801c94f1280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 43.952006] ffff8801c94f1300: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 43.952009] >ffff8801c94f1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.952010] ^ [ 43.952013] ffff8801c94f1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.952015] ffff8801c94f1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.952017] ================================================================== [ 43.952018] Disabling lock debugging due to kernel taint [ 43.952021] Kernel panic - not syncing: panic_on_warn set ... [ 43.952021] [ 43.952025] CPU: 1 PID: 3158 Comm: syzkaller378336 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 43.952027] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.952028] Call Trace: [ 43.952031] dump_stack+0x194/0x257 [ 43.952035] ? arch_local_irq_restore+0x53/0x53 [ 43.952039] ? kasan_end_report+0x32/0x50 [ 43.952042] ? lock_downgrade+0x980/0x980 [ 43.952046] ? vsnprintf+0x1ed/0x1900 [ 43.952050] ? __lock_acquire+0x3c90/0x3e00 [ 43.952053] panic+0x1e4/0x41c [ 43.952057] ? refcount_error_report+0x214/0x214 [ 43.952061] ? add_taint+0x40/0x50 [ 43.952064] ? add_taint+0x1c/0x50 [ 43.952068] ? __lock_acquire+0x3d4d/0x3e00 [ 43.952071] kasan_end_report+0x50/0x50 [ 43.952074] kasan_report+0x148/0x360 [ 43.952079] __asan_report_load8_noabort+0x14/0x20 [ 43.952082] __lock_acquire+0x3d4d/0x3e00 [ 43.952086] ? __lock_acquire+0x664/0x3e00 [ 43.952089] ? lock_downgrade+0x980/0x980 [ 43.952092] ? lock_downgrade+0x980/0x980 [ 43.952096] ? remove_wait_queue+0x81/0x350 [ 43.952101] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.952105] ? __lock_acquire+0x664/0x3e00 [ 43.952108] ? check_noncircular+0x20/0x20 [ 43.952115] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.952119] ? lock_acquire+0x1d5/0x580 [ 43.952122] ? lock_acquire+0x1d5/0x580 [ 43.952125] ? ep_free+0xf4/0x320 [ 43.952129] ? lock_release+0xa40/0xa40 [ 43.952133] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 43.952137] ? print_irqtrace_events+0x270/0x270 [ 43.952140] ? rcu_note_context_switch+0x710/0x710 [ 43.952145] ? __might_sleep+0x95/0x190 [ 43.952148] ? ep_free+0xf4/0x320 [ 43.952151] ? __mutex_lock+0x16f/0x1a80 [ 43.952154] ? ep_free+0xf4/0x320 [ 43.952158] ? print_irqtrace_events+0x270/0x270 [ 43.952160] ? ep_free+0xf4/0x320 [ 43.952165] lock_acquire+0x1d5/0x580 [ 43.952168] ? lock_acquire+0x1d5/0x580 [ 43.952172] ? remove_wait_queue+0x81/0x350 [ 43.952175] ? __lock_acquire+0x664/0x3e00 [ 43.952179] ? lock_release+0xa40/0xa40 [ 43.952184] ? lock_acquire+0x1d5/0x580 [ 43.952187] ? lock_acquire+0x1d5/0x580 [ 43.952191] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 43.952195] _raw_spin_lock_irqsave+0x96/0xc0 [ 43.952198] ? remove_wait_queue+0x81/0x350 [ 43.952202] remove_wait_queue+0x81/0x350 [ 43.952206] ? add_wait_queue+0x290/0x290 [ 43.952210] ? rcutorture_record_progress+0x10/0x10 [ 43.952215] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 43.952219] ? __kernel_text_address+0xd/0x40 [ 43.952224] ? clear_tfile_check_list+0x370/0x370 [ 43.952228] ? check_noncircular+0x20/0x20 [ 43.952232] ? locks_remove_file+0x3fa/0x5a0 [ 43.952237] ep_free+0x13f/0x320 [ 43.952241] ? ep_remove+0x800/0x800 [ 43.952244] ? fsnotify_first_mark+0x2b0/0x2b0 [ 43.952248] ? ep_free+0x320/0x320 [ 43.952252] ep_eventpoll_release+0x44/0x60 [ 43.952255] __fput+0x327/0x7e0 [ 43.952260] ? fput+0x140/0x140 [ 43.952264] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.952268] ____fput+0x15/0x20 [ 43.952272] task_work_run+0x199/0x270 [ 43.952276] ? task_work_cancel+0x210/0x210 [ 43.952280] ? _raw_spin_unlock+0x22/0x30 [ 43.952283] ? switch_task_namespaces+0x87/0xc0 [ 43.952287] do_exit+0x9bb/0x1ad0 [ 43.952291] ? binder_ioctl+0x551/0x1417 [ 43.952295] ? mm_update_next_owner+0x930/0x930 [ 43.952299] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 43.952304] ? avc_ss_reset+0x110/0x110 [ 43.952308] ? mutex_unlock+0xd/0x10 [ 43.952311] ? SyS_epoll_ctl+0x30a/0x1a80 [ 43.952321] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 43.952324] ? up_read+0x1a/0x40 [ 43.952328] ? rcu_note_context_switch+0x710/0x710 [ 43.952331] ? __fd_install+0x288/0x740 [ 43.952336] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 43.952339] ? do_vfs_ioctl+0x486/0x1520 [ 43.952342] ? _cond_resched+0x14/0x30 [ 43.952347] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.952351] ? selinux_capable+0x40/0x40 [ 43.952354] ? __alloc_fd+0x750/0x750 [ 43.952359] do_group_exit+0x149/0x400 [ 43.952363] ? SyS_exit+0x30/0x30 [ 43.952367] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.952371] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.952375] SyS_exit_group+0x1d/0x20 [ 43.952379] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 43.952381] RIP: 0033:0x4429f8 [ 43.952383] RSP: 002b:00007fffa95ad368 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 43.952386] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 43.952388] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 43.952390] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 43.952392] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 43.952394] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 43.973020] Dumping ftrace buffer: [ 43.973023] (ftrace buffer empty) [ 43.973025] Kernel Offset: disabled [ 45.098249] Rebooting in 86400 seconds..