[....] Starting enhanced syslogd: rsyslogd[ 10.699785] audit: type=1400 audit(1514300638.128: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.224920] audit: type=1400 audit(1514300643.653: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 'ci-upstream-next-kasan-gce-3,10.128.0.45' (ECDSA) to the list of known hosts. executing program [ 28.019351] audit: type=1400 audit(1514300655.448:7): avc: denied { map } for pid=3153 comm="syzkaller832950" path="/root/syzkaller832950536" 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 [ 28.023531] ================================================================== [ 28.023541] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 28.023545] Read of size 8 at addr ffff8801c98da878 by task syzkaller832950/3153 [ 28.023545] [ 28.023551] CPU: 1 PID: 3153 Comm: syzkaller832950 Not tainted 4.15.0-rc4-next-20171221+ #78 [ 28.023554] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.023555] Call Trace: [ 28.023562] dump_stack+0x194/0x257 [ 28.023567] ? arch_local_irq_restore+0x53/0x53 [ 28.023573] ? show_regs_print_info+0x18/0x18 [ 28.023577] ? print_irqtrace_events+0x270/0x270 [ 28.023581] ? __lock_acquire+0x664/0x3e00 [ 28.023585] ? __lock_acquire+0x3d4d/0x3e00 [ 28.023591] print_address_description+0x73/0x250 [ 28.023595] ? __lock_acquire+0x3d4d/0x3e00 [ 28.023599] kasan_report+0x25b/0x340 [ 28.023605] __asan_report_load8_noabort+0x14/0x20 [ 28.023608] __lock_acquire+0x3d4d/0x3e00 [ 28.023612] ? __lock_acquire+0x664/0x3e00 [ 28.023615] ? lock_downgrade+0x980/0x980 [ 28.023619] ? lock_downgrade+0x980/0x980 [ 28.023624] ? remove_wait_queue+0x81/0x350 [ 28.023630] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.023634] ? __lock_acquire+0x664/0x3e00 [ 28.023638] ? check_noncircular+0x20/0x20 [ 28.023646] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.023650] ? lock_acquire+0x1d5/0x580 [ 28.023653] ? lock_acquire+0x1d5/0x580 [ 28.023658] ? ep_free+0xf4/0x320 [ 28.023664] ? lock_release+0xa40/0xa40 [ 28.023669] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.023672] ? print_irqtrace_events+0x270/0x270 [ 28.023678] ? rcu_note_context_switch+0x710/0x710 [ 28.023683] ? __might_sleep+0x95/0x190 [ 28.023686] ? ep_free+0xf4/0x320 [ 28.023692] ? __mutex_lock+0x16f/0x1a80 [ 28.023695] ? ep_free+0xf4/0x320 [ 28.023699] ? print_irqtrace_events+0x270/0x270 [ 28.023702] ? ep_free+0xf4/0x320 [ 28.023707] lock_acquire+0x1d5/0x580 [ 28.023710] ? lock_acquire+0x1d5/0x580 [ 28.023714] ? remove_wait_queue+0x81/0x350 [ 28.023718] ? __lock_acquire+0x664/0x3e00 [ 28.023722] ? lock_release+0xa40/0xa40 [ 28.023728] ? lock_acquire+0x1d5/0x580 [ 28.023731] ? lock_acquire+0x1d5/0x580 [ 28.023735] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 28.023740] _raw_spin_lock_irqsave+0x96/0xc0 [ 28.023744] ? remove_wait_queue+0x81/0x350 [ 28.023748] remove_wait_queue+0x81/0x350 [ 28.023753] ? add_wait_queue+0x290/0x290 [ 28.023756] ? rcutorture_record_progress+0x10/0x10 [ 28.023763] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 28.023769] ? __kernel_text_address+0xd/0x40 [ 28.023774] ? clear_tfile_check_list+0x370/0x370 [ 28.023778] ? check_noncircular+0x20/0x20 [ 28.023784] ? locks_remove_file+0x3fa/0x5a0 [ 28.023790] ep_free+0x13f/0x320 [ 28.023794] ? ep_remove+0x800/0x800 [ 28.023797] ? fsnotify_first_mark+0x2b0/0x2b0 [ 28.023802] ? ep_free+0x320/0x320 [ 28.023805] ep_eventpoll_release+0x44/0x60 [ 28.023810] __fput+0x327/0x7e0 [ 28.023815] ? fput+0x140/0x140 [ 28.023819] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.023825] ____fput+0x15/0x20 [ 28.023829] task_work_run+0x199/0x270 [ 28.023834] ? task_work_cancel+0x210/0x210 [ 28.023837] ? _raw_spin_unlock+0x22/0x30 [ 28.023841] ? switch_task_namespaces+0x87/0xc0 [ 28.023847] do_exit+0x9bb/0x1ad0 [ 28.023852] ? binder_ioctl+0x491/0x1417 [ 28.023856] ? mm_update_next_owner+0x930/0x930 [ 28.023861] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 28.023867] ? avc_ss_reset+0x110/0x110 [ 28.023871] ? mutex_unlock+0xd/0x10 [ 28.023874] ? SyS_epoll_ctl+0x30a/0x1a80 [ 28.023887] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.023890] ? up_read+0x1a/0x40 [ 28.023894] ? rcu_note_context_switch+0x710/0x710 [ 28.023898] ? __fd_install+0x288/0x740 [ 28.023903] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 28.023906] ? do_vfs_ioctl+0x486/0x1520 [ 28.023910] ? _cond_resched+0x14/0x30 [ 28.023915] ? ioctl_preallocate+0x2b0/0x2b0 [ 28.023920] ? selinux_capable+0x40/0x40 [ 28.023923] ? __alloc_fd+0x750/0x750 [ 28.023929] do_group_exit+0x149/0x400 [ 28.023933] ? SyS_exit+0x30/0x30 [ 28.023937] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.023942] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.023947] SyS_exit_group+0x1d/0x20 [ 28.023951] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.023954] RIP: 0033:0x4429f8 [ 28.023956] RSP: 002b:00007ffe0ff6c6a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 28.023960] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 28.023963] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 28.023965] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 28.023967] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 28.023969] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 28.023974] [ 28.023976] Allocated by task 3153: [ 28.023980] save_stack+0x43/0xd0 [ 28.023983] kasan_kmalloc+0xad/0xe0 [ 28.023986] kmem_cache_alloc_trace+0x136/0x750 [ 28.023989] binder_get_thread+0x1cf/0x870 [ 28.023991] binder_poll+0x8c/0x390 [ 28.023994] ep_item_poll.isra.10+0xf2/0x320 [ 28.023997] ep_insert+0x6a2/0x1ac0 [ 28.024003] SyS_epoll_ctl+0x12bf/0x1a80 [ 28.024007] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.024008] [ 28.024009] Freed by task 3153: [ 28.024012] save_stack+0x43/0xd0 [ 28.024015] kasan_slab_free+0x71/0xc0 [ 28.024017] kfree+0xd6/0x260 [ 28.024020] binder_thread_dec_tmpref+0x27f/0x310 [ 28.024023] binder_thread_release+0x27d/0x540 [ 28.024025] binder_ioctl+0xc02/0x1417 [ 28.024028] do_vfs_ioctl+0x1b1/0x1520 [ 28.024030] SyS_ioctl+0x8f/0xc0 [ 28.024033] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.024034] [ 28.024036] The buggy address belongs to the object at ffff8801c98da7c0 [ 28.024036] which belongs to the cache kmalloc-512 of size 512 [ 28.024040] The buggy address is located 184 bytes inside of [ 28.024040] 512-byte region [ffff8801c98da7c0, ffff8801c98da9c0) [ 28.024041] The buggy address belongs to the page: [ 28.024045] page:00000000066e564f count:1 mapcount:0 mapping:000000006f44a4d0 index:0x0 [ 28.024048] flags: 0x2fffc0000000100(slab) [ 28.024054] raw: 02fffc0000000100 ffff8801c98da040 0000000000000000 0000000100000006 [ 28.024059] raw: ffffea000725d120 ffffea0007253860 ffff8801dac00940 0000000000000000 [ 28.024060] page dumped because: kasan: bad access detected [ 28.024061] [ 28.024062] Memory state around the buggy address: [ 28.024065] ffff8801c98da700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.024068] ffff8801c98da780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 28.024070] >ffff8801c98da800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.024072] ^ [ 28.024074] ffff8801c98da880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.024077] ffff8801c98da900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.024078] ================================================================== [ 28.024079] Disabling lock debugging due to kernel taint [ 28.024082] Kernel panic - not syncing: panic_on_warn set ... [ 28.024082] [ 28.024085] CPU: 1 PID: 3153 Comm: syzkaller832950 Tainted: G B 4.15.0-rc4-next-20171221+ #78 [ 28.024087] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.024088] Call Trace: [ 28.024092] dump_stack+0x194/0x257 [ 28.024096] ? arch_local_irq_restore+0x53/0x53 [ 28.024099] ? kasan_end_report+0x32/0x50 [ 28.024103] ? lock_downgrade+0x980/0x980 [ 28.024106] ? vsnprintf+0x1ed/0x1900 [ 28.024110] ? __lock_acquire+0x3d30/0x3e00 [ 28.024114] panic+0x1e4/0x41c [ 28.024117] ? refcount_error_report+0x214/0x214 [ 28.024122] ? add_taint+0x40/0x50 [ 28.024125] ? add_taint+0x1c/0x50 [ 28.024129] ? __lock_acquire+0x3d4d/0x3e00 [ 28.024132] kasan_end_report+0x50/0x50 [ 28.024136] kasan_report+0x144/0x340 [ 28.024141] __asan_report_load8_noabort+0x14/0x20 [ 28.024144] __lock_acquire+0x3d4d/0x3e00 [ 28.024147] ? __lock_acquire+0x664/0x3e00 [ 28.024151] ? lock_downgrade+0x980/0x980 [ 28.024154] ? lock_downgrade+0x980/0x980 [ 28.024158] ? remove_wait_queue+0x81/0x350 [ 28.024164] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.024167] ? __lock_acquire+0x664/0x3e00 [ 28.024171] ? check_noncircular+0x20/0x20 [ 28.024177] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 28.024182] ? lock_acquire+0x1d5/0x580 [ 28.024185] ? lock_acquire+0x1d5/0x580 [ 28.024188] ? ep_free+0xf4/0x320 [ 28.024193] ? lock_release+0xa40/0xa40 [ 28.024197] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.024200] ? print_irqtrace_events+0x270/0x270 [ 28.024204] ? rcu_note_context_switch+0x710/0x710 [ 28.024208] ? __might_sleep+0x95/0x190 [ 28.024212] ? ep_free+0xf4/0x320 [ 28.024216] ? __mutex_lock+0x16f/0x1a80 [ 28.024219] ? ep_free+0xf4/0x320 [ 28.024223] ? print_irqtrace_events+0x270/0x270 [ 28.024226] ? ep_free+0xf4/0x320 [ 28.024230] lock_acquire+0x1d5/0x580 [ 28.024233] ? lock_acquire+0x1d5/0x580 [ 28.024237] ? remove_wait_queue+0x81/0x350 [ 28.024240] ? __lock_acquire+0x664/0x3e00 [ 28.024245] ? lock_release+0xa40/0xa40 [ 28.024250] ? lock_acquire+0x1d5/0x580 [ 28.024253] ? lock_acquire+0x1d5/0x580 [ 28.024257] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 28.024261] _raw_spin_lock_irqsave+0x96/0xc0 [ 28.024265] ? remove_wait_queue+0x81/0x350 [ 28.024268] remove_wait_queue+0x81/0x350 [ 28.024273] ? add_wait_queue+0x290/0x290 [ 28.024276] ? rcutorture_record_progress+0x10/0x10 [ 28.024282] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 28.024286] ? __kernel_text_address+0xd/0x40 [ 28.024291] ? clear_tfile_check_list+0x370/0x370 [ 28.024295] ? check_noncircular+0x20/0x20 [ 28.024300] ? locks_remove_file+0x3fa/0x5a0 [ 28.024305] ep_free+0x13f/0x320 [ 28.024308] ? ep_remove+0x800/0x800 [ 28.024311] ? fsnotify_first_mark+0x2b0/0x2b0 [ 28.024316] ? ep_free+0x320/0x320 [ 28.024319] ep_eventpoll_release+0x44/0x60 [ 28.024323] __fput+0x327/0x7e0 [ 28.024327] ? fput+0x140/0x140 [ 28.024331] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.024336] ____fput+0x15/0x20 [ 28.024340] task_work_run+0x199/0x270 [ 28.024344] ? task_work_cancel+0x210/0x210 [ 28.024348] ? _raw_spin_unlock+0x22/0x30 [ 28.024351] ? switch_task_namespaces+0x87/0xc0 [ 28.024356] do_exit+0x9bb/0x1ad0 [ 28.024360] ? binder_ioctl+0x491/0x1417 [ 28.024363] ? mm_update_next_owner+0x930/0x930 [ 28.024368] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 28.024372] ? avc_ss_reset+0x110/0x110 [ 28.024376] ? mutex_unlock+0xd/0x10 [ 28.024379] ? SyS_epoll_ctl+0x30a/0x1a80 [ 28.024394] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 28.024397] ? up_read+0x1a/0x40 [ 28.024401] ? rcu_note_context_switch+0x710/0x710 [ 28.024404] ? __fd_install+0x288/0x740 [ 28.024409] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 28.024412] ? do_vfs_ioctl+0x486/0x1520 [ 28.024415] ? _cond_resched+0x14/0x30 [ 28.024420] ? ioctl_preallocate+0x2b0/0x2b0 [ 28.024424] ? selinux_capable+0x40/0x40 [ 28.024427] ? __alloc_fd+0x750/0x750 [ 28.024432] do_group_exit+0x149/0x400 [ 28.024436] ? SyS_exit+0x30/0x30 [ 28.024440] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 28.024444] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 28.024449] SyS_exit_group+0x1d/0x20 [ 28.024452] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 28.024454] RIP: 0033:0x4429f8 [ 28.024456] RSP: 002b:00007ffe0ff6c6a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 28.024460] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 28.024462] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 28.024464] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 28.024466] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 28.024468] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 28.045251] Dumping ftrace buffer: [ 28.045253] (ftrace buffer empty) [ 28.045255] Kernel Offset: disabled [ 29.172982] Rebooting in 86400 seconds..