[....] Starting enhanced syslogd: rsyslogd[ 11.772889] audit: type=1400 audit(1514351630.014:5): avc: denied { syslog } for pid=3001 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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: [ 18.337245] audit: type=1400 audit(1514351636.579: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-kasan-gce-1,10.128.0.112' (ECDSA) to the list of known hosts. executing program [ 24.528494] audit: type=1400 audit(1514351642.770:7): avc: denied { map } for pid=3154 comm="syzkaller277997" path="/root/syzkaller277997596" 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 [ 24.533162] ================================================================== [ 24.533175] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 24.533178] Read of size 8 at addr ffff8801c91e6130 by task syzkaller277997/3154 [ 24.533179] [ 24.533184] CPU: 1 PID: 3154 Comm: syzkaller277997 Not tainted 4.15.0-rc5+ #238 [ 24.533186] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.533188] Call Trace: [ 24.533196] dump_stack+0x194/0x257 [ 24.533200] ? arch_local_irq_restore+0x53/0x53 [ 24.533207] ? show_regs_print_info+0x18/0x18 [ 24.533210] ? print_irqtrace_events+0x270/0x270 [ 24.533214] ? __lock_acquire+0x664/0x3e00 [ 24.533218] ? __lock_acquire+0x3d4d/0x3e00 [ 24.533224] print_address_description+0x73/0x250 [ 24.533227] ? __lock_acquire+0x3d4d/0x3e00 [ 24.533231] kasan_report+0x25b/0x340 [ 24.533236] __asan_report_load8_noabort+0x14/0x20 [ 24.533239] __lock_acquire+0x3d4d/0x3e00 [ 24.533242] ? __lock_acquire+0x664/0x3e00 [ 24.533246] ? lock_downgrade+0x980/0x980 [ 24.533249] ? lock_downgrade+0x980/0x980 [ 24.533255] ? remove_wait_queue+0x81/0x350 [ 24.533260] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.533264] ? __lock_acquire+0x664/0x3e00 [ 24.533267] ? check_noncircular+0x20/0x20 [ 24.533274] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.533279] ? lock_acquire+0x1d5/0x580 [ 24.533282] ? lock_acquire+0x1d5/0x580 [ 24.533286] ? ep_free+0xf4/0x320 [ 24.533291] ? lock_release+0xa40/0xa40 [ 24.533296] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.533299] ? print_irqtrace_events+0x270/0x270 [ 24.533305] ? rcu_note_context_switch+0x710/0x710 [ 24.533309] ? __might_sleep+0x95/0x190 [ 24.533312] ? ep_free+0xf4/0x320 [ 24.533316] ? __mutex_lock+0x16f/0x1a80 [ 24.533319] ? ep_free+0xf4/0x320 [ 24.533323] ? print_irqtrace_events+0x270/0x270 [ 24.533326] ? ep_free+0xf4/0x320 [ 24.533331] lock_acquire+0x1d5/0x580 [ 24.533333] ? lock_acquire+0x1d5/0x580 [ 24.533337] ? remove_wait_queue+0x81/0x350 [ 24.533340] ? __lock_acquire+0x664/0x3e00 [ 24.533345] ? lock_release+0xa40/0xa40 [ 24.533350] ? lock_acquire+0x1d5/0x580 [ 24.533353] ? lock_acquire+0x1d5/0x580 [ 24.533356] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.533362] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.533365] ? remove_wait_queue+0x81/0x350 [ 24.533369] remove_wait_queue+0x81/0x350 [ 24.533373] ? add_wait_queue+0x290/0x290 [ 24.533377] ? rcutorture_record_progress+0x10/0x10 [ 24.533383] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.533389] ? __kernel_text_address+0xd/0x40 [ 24.533393] ? clear_tfile_check_list+0x370/0x370 [ 24.533398] ? check_noncircular+0x20/0x20 [ 24.533403] ? locks_remove_file+0x3fa/0x5a0 [ 24.533408] ep_free+0x13f/0x320 [ 24.533412] ? ep_remove+0x800/0x800 [ 24.533416] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.533421] ? ep_free+0x320/0x320 [ 24.533424] ep_eventpoll_release+0x44/0x60 [ 24.533428] __fput+0x327/0x7e0 [ 24.533433] ? fput+0x140/0x140 [ 24.533437] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.533442] ____fput+0x15/0x20 [ 24.533445] task_work_run+0x199/0x270 [ 24.533450] ? task_work_cancel+0x210/0x210 [ 24.533454] ? _raw_spin_unlock+0x22/0x30 [ 24.533457] ? switch_task_namespaces+0x87/0xc0 [ 24.533467] do_exit+0x9bb/0x1ad0 [ 24.533474] ? binder_ioctl+0x4a1/0x1417 [ 24.533478] ? mm_update_next_owner+0x930/0x930 [ 24.533483] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.533490] ? avc_ss_reset+0x110/0x110 [ 24.533493] ? mutex_unlock+0xd/0x10 [ 24.533496] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.533509] ? vmacache_update+0xfe/0x130 [ 24.533513] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.533516] ? up_read+0x1a/0x40 [ 24.533520] ? rcu_note_context_switch+0x710/0x710 [ 24.533526] ? __fd_install+0x288/0x740 [ 24.533531] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.533536] ? do_vfs_ioctl+0x486/0x1520 [ 24.533541] ? _cond_resched+0x14/0x30 [ 24.533545] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.533550] ? selinux_capable+0x40/0x40 [ 24.533554] ? __alloc_fd+0x750/0x750 [ 24.533559] do_group_exit+0x149/0x400 [ 24.533563] ? SyS_exit+0x30/0x30 [ 24.533567] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.533573] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.533577] SyS_exit_group+0x1d/0x20 [ 24.533581] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.533584] RIP: 0033:0x4429f8 [ 24.533586] RSP: 002b:00007ffe9af490c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.533590] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.533592] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.533594] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.533596] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.533598] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.533603] [ 24.533605] Allocated by task 3154: [ 24.533608] save_stack+0x43/0xd0 [ 24.533611] kasan_kmalloc+0xad/0xe0 [ 24.533615] kmem_cache_alloc_trace+0x136/0x750 [ 24.533619] binder_get_thread+0x1cf/0x870 [ 24.533622] binder_poll+0x8c/0x390 [ 24.533624] ep_item_poll.isra.10+0xec/0x320 [ 24.533627] ep_insert+0x6a3/0x1b10 [ 24.533629] SyS_epoll_ctl+0x12e4/0x1ab0 [ 24.533633] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.533633] [ 24.533635] Freed by task 3154: [ 24.533637] save_stack+0x43/0xd0 [ 24.533640] kasan_slab_free+0x71/0xc0 [ 24.533642] kfree+0xd6/0x260 [ 24.533645] binder_thread_dec_tmpref+0x27f/0x310 [ 24.533648] binder_thread_release+0x27d/0x540 [ 24.533650] binder_ioctl+0xc02/0x1417 [ 24.533653] do_vfs_ioctl+0x1b1/0x1520 [ 24.533656] SyS_ioctl+0x8f/0xc0 [ 24.533659] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.533660] [ 24.533663] The buggy address belongs to the object at ffff8801c91e6080 [ 24.533663] which belongs to the cache kmalloc-512 of size 512 [ 24.533666] The buggy address is located 176 bytes inside of [ 24.533666] 512-byte region [ffff8801c91e6080, ffff8801c91e6280) [ 24.533667] The buggy address belongs to the page: [ 24.533671] page:00000000d81d3132 count:1 mapcount:0 mapping:000000001251c688 index:0x0 [ 24.533675] flags: 0x2fffc0000000100(slab) [ 24.533680] raw: 02fffc0000000100 ffff8801c91e6080 0000000000000000 0000000100000006 [ 24.533684] raw: ffffea000728a6e0 ffffea0007272be0 ffff8801db000940 0000000000000000 [ 24.533685] page dumped because: kasan: bad access detected [ 24.533686] [ 24.533687] Memory state around the buggy address: [ 24.533690] ffff8801c91e6000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.533692] ffff8801c91e6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.533695] >ffff8801c91e6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.533696] ^ [ 24.533699] ffff8801c91e6180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.533701] ffff8801c91e6200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.533702] ================================================================== [ 24.533703] Disabling lock debugging due to kernel taint [ 24.533706] Kernel panic - not syncing: panic_on_warn set ... [ 24.533706] [ 24.533709] CPU: 1 PID: 3154 Comm: syzkaller277997 Tainted: G B 4.15.0-rc5+ #238 [ 24.533711] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.533712] Call Trace: [ 24.533716] dump_stack+0x194/0x257 [ 24.533720] ? arch_local_irq_restore+0x53/0x53 [ 24.533723] ? kasan_end_report+0x32/0x50 [ 24.533727] ? lock_downgrade+0x980/0x980 [ 24.533730] ? vsnprintf+0x1ed/0x1900 [ 24.533734] ? __lock_acquire+0x3cd0/0x3e00 [ 24.533737] panic+0x1e4/0x41c [ 24.533740] ? refcount_error_report+0x214/0x214 [ 24.533744] ? add_taint+0x40/0x50 [ 24.533747] ? add_taint+0x1c/0x50 [ 24.533751] ? __lock_acquire+0x3d4d/0x3e00 [ 24.533754] kasan_end_report+0x50/0x50 [ 24.533757] kasan_report+0x144/0x340 [ 24.533762] __asan_report_load8_noabort+0x14/0x20 [ 24.533765] __lock_acquire+0x3d4d/0x3e00 [ 24.533768] ? __lock_acquire+0x664/0x3e00 [ 24.533771] ? lock_downgrade+0x980/0x980 [ 24.533774] ? lock_downgrade+0x980/0x980 [ 24.533778] ? remove_wait_queue+0x81/0x350 [ 24.533783] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.533787] ? __lock_acquire+0x664/0x3e00 [ 24.533790] ? check_noncircular+0x20/0x20 [ 24.533797] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.533800] ? lock_acquire+0x1d5/0x580 [ 24.533804] ? lock_acquire+0x1d5/0x580 [ 24.533806] ? ep_free+0xf4/0x320 [ 24.533811] ? lock_release+0xa40/0xa40 [ 24.533814] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.533818] ? print_irqtrace_events+0x270/0x270 [ 24.533821] ? rcu_note_context_switch+0x710/0x710 [ 24.533825] ? __might_sleep+0x95/0x190 [ 24.533828] ? ep_free+0xf4/0x320 [ 24.533831] ? __mutex_lock+0x16f/0x1a80 [ 24.533834] ? ep_free+0xf4/0x320 [ 24.533838] ? print_irqtrace_events+0x270/0x270 [ 24.533840] ? ep_free+0xf4/0x320 [ 24.533845] lock_acquire+0x1d5/0x580 [ 24.533848] ? lock_acquire+0x1d5/0x580 [ 24.533851] ? remove_wait_queue+0x81/0x350 [ 24.533854] ? __lock_acquire+0x664/0x3e00 [ 24.533859] ? lock_release+0xa40/0xa40 [ 24.533863] ? lock_acquire+0x1d5/0x580 [ 24.533866] ? lock_acquire+0x1d5/0x580 [ 24.533870] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 24.533874] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.533877] ? remove_wait_queue+0x81/0x350 [ 24.533881] remove_wait_queue+0x81/0x350 [ 24.533885] ? add_wait_queue+0x290/0x290 [ 24.533888] ? rcutorture_record_progress+0x10/0x10 [ 24.533893] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 24.533897] ? __kernel_text_address+0xd/0x40 [ 24.533902] ? clear_tfile_check_list+0x370/0x370 [ 24.533906] ? check_noncircular+0x20/0x20 [ 24.533910] ? locks_remove_file+0x3fa/0x5a0 [ 24.533915] ep_free+0x13f/0x320 [ 24.533918] ? ep_remove+0x800/0x800 [ 24.533921] ? fsnotify_first_mark+0x2b0/0x2b0 [ 24.533925] ? ep_free+0x320/0x320 [ 24.533929] ep_eventpoll_release+0x44/0x60 [ 24.533932] __fput+0x327/0x7e0 [ 24.533936] ? fput+0x140/0x140 [ 24.533940] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.533944] ____fput+0x15/0x20 [ 24.533948] task_work_run+0x199/0x270 [ 24.533952] ? task_work_cancel+0x210/0x210 [ 24.533956] ? _raw_spin_unlock+0x22/0x30 [ 24.533959] ? switch_task_namespaces+0x87/0xc0 [ 24.533963] do_exit+0x9bb/0x1ad0 [ 24.533968] ? binder_ioctl+0x4a1/0x1417 [ 24.533971] ? mm_update_next_owner+0x930/0x930 [ 24.533976] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.533981] ? avc_ss_reset+0x110/0x110 [ 24.533983] ? mutex_unlock+0xd/0x10 [ 24.533986] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 24.533995] ? vmacache_update+0xfe/0x130 [ 24.534000] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.534005] ? up_read+0x1a/0x40 [ 24.534009] ? rcu_note_context_switch+0x710/0x710 [ 24.534012] ? __fd_install+0x288/0x740 [ 24.534018] ? binder_ioctl_write_read.isra.41+0xcb0/0xcb0 [ 24.534021] ? do_vfs_ioctl+0x486/0x1520 [ 24.534024] ? _cond_resched+0x14/0x30 [ 24.534029] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.534033] ? selinux_capable+0x40/0x40 [ 24.534037] ? __alloc_fd+0x750/0x750 [ 24.534042] do_group_exit+0x149/0x400 [ 24.534045] ? SyS_exit+0x30/0x30 [ 24.534049] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.534053] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.534057] SyS_exit_group+0x1d/0x20 [ 24.534061] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.534063] RIP: 0033:0x4429f8 [ 24.534065] RSP: 002b:00007ffe9af490c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.534068] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 24.534070] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.534072] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.534074] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 24.534076] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 24.554383] Dumping ftrace buffer: [ 24.554386] (ftrace buffer empty) [ 24.554388] Kernel Offset: disabled [ 25.684981] Rebooting in 86400 seconds..