[....] Starting enhanced syslogd: rsyslogd[ 17.487782] audit: type=1400 audit(1521074098.326:5): avc: denied { syslog } for pid=4092 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: [ 23.780476] audit: type=1400 audit(1521074104.619:6): avc: denied { map } for pid=4230 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.21' (ECDSA) to the list of known hosts. executing program [ 30.104588] audit: type=1400 audit(1521074110.943:7): avc: denied { map } for pid=4244 comm="syzkaller680245" path="/root/syzkaller680245787" 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 [ 30.132212] ================================================================== [ 30.139614] BUG: KASAN: use-after-free in ucma_close+0x2d7/0x2f0 [ 30.145733] Read of size 8 at addr ffff8801ace82940 by task syzkaller680245/4244 [ 30.153232] [ 30.154836] CPU: 1 PID: 4244 Comm: syzkaller680245 Not tainted 4.16.0-rc5+ #353 [ 30.162250] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.171571] Call Trace: [ 30.174133] dump_stack+0x194/0x24d [ 30.177734] ? arch_local_irq_restore+0x53/0x53 [ 30.182374] ? show_regs_print_info+0x18/0x18 [ 30.186937] ? ucma_close+0x2d7/0x2f0 [ 30.190712] print_address_description+0x73/0x250 [ 30.195524] ? ucma_close+0x2d7/0x2f0 [ 30.199296] kasan_report+0x23c/0x360 [ 30.203070] __asan_report_load8_noabort+0x14/0x20 [ 30.207972] ucma_close+0x2d7/0x2f0 [ 30.211571] ? __might_sleep+0x95/0x190 [ 30.215520] ? ucma_free_ctx+0xd90/0xd90 [ 30.219552] __fput+0x327/0x7e0 [ 30.222810] ? fput+0x140/0x140 [ 30.226075] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.230548] ____fput+0x15/0x20 [ 30.233800] task_work_run+0x199/0x270 [ 30.237666] ? task_work_cancel+0x210/0x210 [ 30.241960] ? _raw_spin_unlock+0x22/0x30 [ 30.246080] ? switch_task_namespaces+0x87/0xc0 [ 30.250724] do_exit+0x9bb/0x1ad0 [ 30.254150] ? ucma_create_id+0x45b/0x620 [ 30.258276] ? mm_update_next_owner+0x930/0x930 [ 30.262921] ? ucma_create_id+0x17b/0x620 [ 30.267049] ? ucma_get_event+0xa90/0xa90 [ 30.271177] ? __might_sleep+0x95/0x190 [ 30.275129] ? kasan_check_write+0x14/0x20 [ 30.279342] ? _copy_from_user+0x99/0x110 [ 30.283462] ? ucma_write+0x11f/0x3d0 [ 30.287235] ? ucma_get_event+0xa90/0xa90 [ 30.291355] ? ucma_resolve_route+0x1a0/0x1a0 [ 30.295830] ? ucma_resolve_route+0x1a0/0x1a0 [ 30.300298] ? __vfs_write+0xf7/0x970 [ 30.304071] ? rcu_note_context_switch+0x710/0x710 [ 30.308975] ? kernel_read+0x120/0x120 [ 30.312834] ? __might_sleep+0x95/0x190 [ 30.316783] ? _cond_resched+0x14/0x30 [ 30.320643] ? __inode_security_revalidate+0xd9/0x130 [ 30.325805] ? avc_policy_seqno+0x9/0x20 [ 30.329846] ? security_file_permission+0x89/0x1e0 [ 30.334747] ? rw_verify_area+0xe5/0x2b0 [ 30.338779] ? __fdget_raw+0x20/0x20 [ 30.342464] ? vfs_write+0x224/0x510 [ 30.346157] do_group_exit+0x149/0x400 [ 30.350019] ? SyS_write+0x184/0x220 [ 30.353707] ? filp_open+0x70/0x70 [ 30.357216] ? SyS_exit+0x30/0x30 [ 30.360639] ? SyS_read+0x220/0x220 [ 30.364245] ? do_syscall_64+0xb7/0x940 [ 30.368191] ? do_group_exit+0x400/0x400 [ 30.372224] SyS_exit_group+0x1d/0x20 [ 30.375995] do_syscall_64+0x281/0x940 [ 30.379857] ? __do_page_fault+0xc90/0xc90 [ 30.384065] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.388795] ? syscall_return_slowpath+0x550/0x550 [ 30.393695] ? syscall_return_slowpath+0x2ac/0x550 [ 30.398606] ? prepare_exit_to_usermode+0x350/0x350 [ 30.403602] ? entry_SYSCALL_64_after_hwframe+0x52/0xb7 [ 30.408951] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.413775] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 30.418933] RIP: 0033:0x43e918 [ 30.422092] RSP: 002b:00007ffe4456a6b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 30.429772] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043e918 [ 30.437015] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 30.444260] RBP: 00000000004be2c0 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 30.451501] R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000000001 [ 30.458742] R13: 00000000006cc160 R14: 0000000000000000 R15: 0000000000000000 [ 30.465996] [ 30.467598] Allocated by task 4244: [ 30.471196] save_stack+0x43/0xd0 [ 30.474621] kasan_kmalloc+0xad/0xe0 [ 30.478304] kmem_cache_alloc_trace+0x136/0x740 [ 30.482943] ucma_alloc_ctx+0xce/0x610 [ 30.486799] ucma_create_id+0x205/0x620 [ 30.490742] ucma_write+0x2d6/0x3d0 [ 30.494337] __vfs_write+0xef/0x970 [ 30.497931] vfs_write+0x189/0x510 [ 30.501437] SyS_write+0xef/0x220 [ 30.504860] do_syscall_64+0x281/0x940 [ 30.508718] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 30.513875] [ 30.515470] Freed by task 4244: [ 30.518719] save_stack+0x43/0xd0 [ 30.522142] __kasan_slab_free+0x11a/0x170 [ 30.526349] kasan_slab_free+0xe/0x10 [ 30.530121] kfree+0xd9/0x260 [ 30.533719] ucma_create_id+0x45b/0x620 [ 30.537663] ucma_write+0x2d6/0x3d0 [ 30.541261] __vfs_write+0xef/0x970 [ 30.544856] vfs_write+0x189/0x510 [ 30.548364] SyS_write+0xef/0x220 [ 30.551787] do_syscall_64+0x281/0x940 [ 30.555658] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 30.560818] [ 30.562419] The buggy address belongs to the object at ffff8801ace828c0 [ 30.562419] which belongs to the cache kmalloc-256 of size 256 [ 30.575042] The buggy address is located 128 bytes inside of [ 30.575042] 256-byte region [ffff8801ace828c0, ffff8801ace829c0) [ 30.586889] The buggy address belongs to the page: [ 30.591787] page:ffffea0006b3a080 count:1 mapcount:0 mapping:ffff8801ace82000 index:0xffff8801ace82b40 [ 30.601201] flags: 0x2fffc0000000100(slab) [ 30.605418] raw: 02fffc0000000100 ffff8801ace82000 ffff8801ace82b40 000000010000000b [ 30.613269] raw: ffffea0006b001e0 ffffea0006b25f20 ffff8801dac007c0 0000000000000000 [ 30.621117] page dumped because: kasan: bad access detected [ 30.626794] [ 30.628390] Memory state around the buggy address: [ 30.633286] ffff8801ace82800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.640613] ffff8801ace82880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 30.647940] >ffff8801ace82900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.655266] ^ [ 30.660686] ffff8801ace82980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 30.668022] ffff8801ace82a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.675357] ================================================================== [ 30.682684] Disabling lock debugging due to kernel taint [ 30.688337] Kernel panic - not syncing: panic_on_warn set ... [ 30.688337] [ 30.695687] CPU: 1 PID: 4244 Comm: syzkaller680245 Tainted: G B 4.16.0-rc5+ #353 [ 30.704419] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.713741] Call Trace: [ 30.716299] dump_stack+0x194/0x24d [ 30.719905] ? arch_local_irq_restore+0x53/0x53 [ 30.724550] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.729281] ? vsnprintf+0x1ed/0x1900 [ 30.733051] ? ucma_close+0x210/0x2f0 [ 30.736820] panic+0x1e4/0x41c [ 30.739983] ? refcount_error_report+0x214/0x214 [ 30.744712] ? add_taint+0x1c/0x50 [ 30.748220] ? add_taint+0x1c/0x50 [ 30.751732] ? ucma_close+0x2d7/0x2f0 [ 30.755505] kasan_end_report+0x50/0x50 [ 30.759449] kasan_report+0x149/0x360 [ 30.763224] __asan_report_load8_noabort+0x14/0x20 [ 30.768122] ucma_close+0x2d7/0x2f0 [ 30.771721] ? __might_sleep+0x95/0x190 [ 30.775664] ? ucma_free_ctx+0xd90/0xd90 [ 30.779694] __fput+0x327/0x7e0 [ 30.782947] ? fput+0x140/0x140 [ 30.786195] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.790662] ____fput+0x15/0x20 [ 30.793914] task_work_run+0x199/0x270 [ 30.797774] ? task_work_cancel+0x210/0x210 [ 30.802070] ? _raw_spin_unlock+0x22/0x30 [ 30.806193] ? switch_task_namespaces+0x87/0xc0 [ 30.810832] do_exit+0x9bb/0x1ad0 [ 30.814252] ? ucma_create_id+0x45b/0x620 [ 30.818369] ? mm_update_next_owner+0x930/0x930 [ 30.823009] ? ucma_create_id+0x17b/0x620 [ 30.827132] ? ucma_get_event+0xa90/0xa90 [ 30.831250] ? __might_sleep+0x95/0x190 [ 30.835196] ? kasan_check_write+0x14/0x20 [ 30.839403] ? _copy_from_user+0x99/0x110 [ 30.843521] ? ucma_write+0x11f/0x3d0 [ 30.847290] ? ucma_get_event+0xa90/0xa90 [ 30.851405] ? ucma_resolve_route+0x1a0/0x1a0 [ 30.855871] ? ucma_resolve_route+0x1a0/0x1a0 [ 30.860333] ? __vfs_write+0xf7/0x970 [ 30.864103] ? rcu_note_context_switch+0x710/0x710 [ 30.869000] ? kernel_read+0x120/0x120 [ 30.872862] ? __might_sleep+0x95/0x190 [ 30.876808] ? _cond_resched+0x14/0x30 [ 30.880666] ? __inode_security_revalidate+0xd9/0x130 [ 30.885826] ? avc_policy_seqno+0x9/0x20 [ 30.889860] ? security_file_permission+0x89/0x1e0 [ 30.894762] ? rw_verify_area+0xe5/0x2b0 [ 30.898793] ? __fdget_raw+0x20/0x20 [ 30.902474] ? vfs_write+0x224/0x510 [ 30.906160] do_group_exit+0x149/0x400 [ 30.910019] ? SyS_write+0x184/0x220 [ 30.913704] ? filp_open+0x70/0x70 [ 30.917214] ? SyS_exit+0x30/0x30 [ 30.920635] ? SyS_read+0x220/0x220 [ 30.924235] ? do_syscall_64+0xb7/0x940 [ 30.928178] ? do_group_exit+0x400/0x400 [ 30.932209] SyS_exit_group+0x1d/0x20 [ 30.935979] do_syscall_64+0x281/0x940 [ 30.939843] ? __do_page_fault+0xc90/0xc90 [ 30.944045] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.948770] ? syscall_return_slowpath+0x550/0x550 [ 30.953667] ? syscall_return_slowpath+0x2ac/0x550 [ 30.958563] ? prepare_exit_to_usermode+0x350/0x350 [ 30.963552] ? entry_SYSCALL_64_after_hwframe+0x52/0xb7 [ 30.968885] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.973698] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 30.978855] RIP: 0033:0x43e918 [ 30.982019] RSP: 002b:00007ffe4456a6b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 30.989697] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043e918 [ 30.996937] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 31.004175] RBP: 00000000004be2c0 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 31.011414] R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000000001 [ 31.018654] R13: 00000000006cc160 R14: 0000000000000000 R15: 0000000000000000 [ 31.026357] Dumping ftrace buffer: [ 31.029868] (ftrace buffer empty) [ 31.033546] Kernel Offset: disabled [ 31.037145] Rebooting in 86400 seconds..