[?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. [ 18.297054] audit: type=1400 audit(1520638705.255:6): avc: denied { map } for pid=4200 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.28' (ECDSA) to the list of known hosts. syzkaller login: [ 24.614579] audit: type=1400 audit(1520638711.573:7): avc: denied { map } for pid=4214 comm="syz-execprog" path="/root/syz-execprog" dev="sda1" ino=16479 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 2018/03/09 23:38:31 parsed 1 programs 2018/03/09 23:38:31 executed programs: 0 [ 24.860846] audit: type=1400 audit(1520638711.819:8): avc: denied { map } for pid=4214 comm="syz-execprog" path="/root/syzkaller-shm360927752" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file permissive=1 [ 24.875232] IPVS: ftp: loaded support on port[0] = 21 [ 24.918994] ================================================================== [ 24.926444] BUG: KASAN: use-after-free in ucma_close+0x2d7/0x2f0 [ 24.932561] Read of size 8 at addr ffff8801b3965440 by task syz-executor0/4222 [ 24.939915] [ 24.941517] CPU: 0 PID: 4222 Comm: syz-executor0 Not tainted 4.16.0-rc4+ #257 [ 24.948760] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.958091] Call Trace: [ 24.960656] dump_stack+0x194/0x24d [ 24.964263] ? arch_local_irq_restore+0x53/0x53 [ 24.968905] ? show_regs_print_info+0x18/0x18 [ 24.973372] ? save_stack+0xa3/0xd0 [ 24.976989] ? ucma_close+0x2d7/0x2f0 [ 24.980785] print_address_description+0x73/0x250 [ 24.985608] ? ucma_close+0x2d7/0x2f0 [ 24.989388] kasan_report+0x23c/0x360 [ 24.993166] __asan_report_load8_noabort+0x14/0x20 [ 24.998071] ucma_close+0x2d7/0x2f0 [ 25.001691] ? __might_sleep+0x95/0x190 [ 25.005640] ? ucma_free_ctx+0xd90/0xd90 [ 25.009678] __fput+0x327/0x7e0 [ 25.012934] ? fput+0x140/0x140 [ 25.016190] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.020662] ____fput+0x15/0x20 [ 25.023913] task_work_run+0x199/0x270 [ 25.027775] ? task_work_cancel+0x210/0x210 [ 25.032078] ? _raw_spin_unlock+0x22/0x30 [ 25.036205] ? switch_task_namespaces+0x87/0xc0 [ 25.040850] do_exit+0x9bb/0x1ad0 [ 25.044276] ? ucma_create_id+0x45b/0x620 [ 25.048400] ? mm_update_next_owner+0x930/0x930 [ 25.053057] ? ucma_create_id+0x17b/0x620 [ 25.057186] ? ucma_get_event+0xa90/0xa90 [ 25.061314] ? __might_sleep+0x95/0x190 [ 25.065268] ? kasan_check_write+0x14/0x20 [ 25.069475] ? _copy_from_user+0x99/0x110 [ 25.073600] ? ucma_write+0x11f/0x3d0 [ 25.077373] ? ucma_get_event+0xa90/0xa90 [ 25.081494] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.085970] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.090440] ? __vfs_write+0xf7/0x970 [ 25.094217] ? rcu_note_context_switch+0x710/0x710 [ 25.099118] ? kernel_read+0x120/0x120 [ 25.102981] ? __might_sleep+0x95/0x190 [ 25.106944] ? _cond_resched+0x14/0x30 [ 25.110804] ? __inode_security_revalidate+0xd9/0x130 [ 25.115964] ? avc_policy_seqno+0x9/0x20 [ 25.120004] ? security_file_permission+0x89/0x1e0 [ 25.124924] ? compat_SyS_futex+0x288/0x380 [ 25.129215] ? vfs_write+0x224/0x510 [ 25.132904] do_group_exit+0x149/0x400 [ 25.136766] ? compat_SyS_get_robust_list+0x300/0x300 [ 25.141926] ? SyS_write+0x184/0x220 [ 25.145613] ? __do_page_fault+0x3d6/0xc90 [ 25.149820] ? SyS_exit+0x30/0x30 [ 25.153245] ? SyS_read+0x220/0x220 [ 25.156846] ? do_fast_syscall_32+0x156/0xf9f [ 25.161318] ? do_group_exit+0x400/0x400 [ 25.165352] SyS_exit_group+0x1d/0x20 [ 25.169126] do_fast_syscall_32+0x3ec/0xf9f [ 25.173428] ? do_int80_syscall_32+0x9c0/0x9c0 [ 25.177985] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.182720] ? syscall_return_slowpath+0x2ac/0x550 [ 25.187645] ? prepare_exit_to_usermode+0x350/0x350 [ 25.192663] ? sysret32_from_system_call+0x5/0x3c [ 25.197498] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.202323] entry_SYSENTER_compat+0x70/0x7f [ 25.206701] RIP: 0023:0xf7f55c99 [ 25.210040] RSP: 002b:00000000ffa4efdc EFLAGS: 00000282 ORIG_RAX: 00000000000000fc [ 25.217717] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 25.224959] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 25.232199] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 25.239443] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 25.246692] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 25.253950] [ 25.255552] Allocated by task 4222: [ 25.259156] save_stack+0x43/0xd0 [ 25.262578] kasan_kmalloc+0xad/0xe0 [ 25.266261] kmem_cache_alloc_trace+0x136/0x740 [ 25.270912] ucma_alloc_ctx+0xce/0x610 [ 25.274781] ucma_create_id+0x205/0x620 [ 25.278729] ucma_write+0x2d6/0x3d0 [ 25.282328] __vfs_write+0xef/0x970 [ 25.285921] vfs_write+0x189/0x510 [ 25.289434] SyS_write+0xef/0x220 [ 25.292862] do_fast_syscall_32+0x3ec/0xf9f [ 25.297155] entry_SYSENTER_compat+0x70/0x7f [ 25.301530] [ 25.303129] Freed by task 4222: [ 25.306380] save_stack+0x43/0xd0 [ 25.309807] __kasan_slab_free+0x11a/0x170 [ 25.314015] kasan_slab_free+0xe/0x10 [ 25.317806] kfree+0xd9/0x260 [ 25.320883] ucma_create_id+0x45b/0x620 [ 25.324827] ucma_write+0x2d6/0x3d0 [ 25.328423] __vfs_write+0xef/0x970 [ 25.332023] vfs_write+0x189/0x510 [ 25.335540] SyS_write+0xef/0x220 [ 25.338965] do_fast_syscall_32+0x3ec/0xf9f [ 25.343256] entry_SYSENTER_compat+0x70/0x7f [ 25.347633] [ 25.349232] The buggy address belongs to the object at ffff8801b39653c0 [ 25.349232] which belongs to the cache kmalloc-256 of size 256 [ 25.361858] The buggy address is located 128 bytes inside of [ 25.361858] 256-byte region [ffff8801b39653c0, ffff8801b39654c0) [ 25.373699] The buggy address belongs to the page: [ 25.378600] page:ffffea0006ce5940 count:1 mapcount:0 mapping:ffff8801b3965000 index:0x0 [ 25.386721] flags: 0x2fffc0000000100(slab) [ 25.390927] raw: 02fffc0000000100 ffff8801b3965000 0000000000000000 000000010000000c [ 25.398780] raw: ffffea00072aad20 ffffea0006d11da0 ffff8801dac007c0 0000000000000000 [ 25.406629] page dumped because: kasan: bad access detected [ 25.412318] [ 25.413917] Memory state around the buggy address: [ 25.418816] ffff8801b3965300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.426146] ffff8801b3965380: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 25.433477] >ffff8801b3965400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.440805] ^ [ 25.446225] ffff8801b3965480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.453551] ffff8801b3965500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 25.460878] ================================================================== [ 25.468207] Disabling lock debugging due to kernel taint [ 25.473665] Kernel panic - not syncing: panic_on_warn set ... [ 25.473665] [ 25.481008] CPU: 0 PID: 4222 Comm: syz-executor0 Tainted: G B 4.16.0-rc4+ #257 [ 25.489557] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.498882] Call Trace: [ 25.501443] dump_stack+0x194/0x24d [ 25.505044] ? arch_local_irq_restore+0x53/0x53 [ 25.509684] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.514410] ? vsnprintf+0x1ed/0x1900 [ 25.518186] ? ucma_close+0x230/0x2f0 [ 25.521958] panic+0x1e4/0x41c [ 25.525120] ? refcount_error_report+0x214/0x214 [ 25.529845] ? add_taint+0x1c/0x50 [ 25.533353] ? add_taint+0x1c/0x50 [ 25.536869] ? ucma_close+0x2d7/0x2f0 [ 25.540642] kasan_end_report+0x50/0x50 [ 25.544586] kasan_report+0x149/0x360 [ 25.548356] __asan_report_load8_noabort+0x14/0x20 [ 25.553259] ucma_close+0x2d7/0x2f0 [ 25.556859] ? __might_sleep+0x95/0x190 [ 25.560802] ? ucma_free_ctx+0xd90/0xd90 [ 25.564835] __fput+0x327/0x7e0 [ 25.568087] ? fput+0x140/0x140 [ 25.571336] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.575804] ____fput+0x15/0x20 [ 25.579065] task_work_run+0x199/0x270 [ 25.582926] ? task_work_cancel+0x210/0x210 [ 25.587219] ? _raw_spin_unlock+0x22/0x30 [ 25.591335] ? switch_task_namespaces+0x87/0xc0 [ 25.595975] do_exit+0x9bb/0x1ad0 [ 25.599398] ? ucma_create_id+0x45b/0x620 [ 25.603516] ? mm_update_next_owner+0x930/0x930 [ 25.608156] ? ucma_create_id+0x17b/0x620 [ 25.612274] ? ucma_get_event+0xa90/0xa90 [ 25.616397] ? __might_sleep+0x95/0x190 [ 25.620344] ? kasan_check_write+0x14/0x20 [ 25.624549] ? _copy_from_user+0x99/0x110 [ 25.628674] ? ucma_write+0x11f/0x3d0 [ 25.632443] ? ucma_get_event+0xa90/0xa90 [ 25.636561] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.641038] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.645507] ? __vfs_write+0xf7/0x970 [ 25.649279] ? rcu_note_context_switch+0x710/0x710 [ 25.654189] ? kernel_read+0x120/0x120 [ 25.658046] ? __might_sleep+0x95/0x190 [ 25.661990] ? _cond_resched+0x14/0x30 [ 25.665852] ? __inode_security_revalidate+0xd9/0x130 [ 25.671014] ? avc_policy_seqno+0x9/0x20 [ 25.675054] ? security_file_permission+0x89/0x1e0 [ 25.679959] ? compat_SyS_futex+0x288/0x380 [ 25.684250] ? vfs_write+0x224/0x510 [ 25.687938] do_group_exit+0x149/0x400 [ 25.691796] ? compat_SyS_get_robust_list+0x300/0x300 [ 25.696954] ? SyS_write+0x184/0x220 [ 25.700641] ? __do_page_fault+0x3d6/0xc90 [ 25.704844] ? SyS_exit+0x30/0x30 [ 25.708264] ? SyS_read+0x220/0x220 [ 25.711876] ? do_fast_syscall_32+0x156/0xf9f [ 25.716342] ? do_group_exit+0x400/0x400 [ 25.720382] SyS_exit_group+0x1d/0x20 [ 25.724152] do_fast_syscall_32+0x3ec/0xf9f [ 25.728459] ? do_int80_syscall_32+0x9c0/0x9c0 [ 25.733013] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.737744] ? syscall_return_slowpath+0x2ac/0x550 [ 25.742645] ? prepare_exit_to_usermode+0x350/0x350 [ 25.747636] ? sysret32_from_system_call+0x5/0x3c [ 25.752451] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.757266] entry_SYSENTER_compat+0x70/0x7f [ 25.761643] RIP: 0023:0xf7f55c99 [ 25.764975] RSP: 002b:00000000ffa4efdc EFLAGS: 00000282 ORIG_RAX: 00000000000000fc [ 25.772652] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 25.779891] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 25.787128] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 25.794366] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 25.801607] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 25.809272] Dumping ftrace buffer: [ 25.812781] (ftrace buffer empty) [ 25.816459] Kernel Offset: disabled [ 25.820054] Rebooting in 86400 seconds..