[?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. [ 19.067992] audit: type=1400 audit(1520453043.721:6): avc: denied { map } for pid=4221 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.45' (ECDSA) to the list of known hosts. syzkaller login: [ 25.360758] audit: type=1400 audit(1520453050.014:7): avc: denied { map } for pid=4235 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/07 20:04:10 parsed 1 programs 2018/03/07 20:04:10 executed programs: 0 [ 25.608285] audit: type=1400 audit(1520453050.262:8): avc: denied { map } for pid=4235 comm="syz-execprog" path="/root/syzkaller-shm041153321" 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 [ 25.621757] IPVS: ftp: loaded support on port[0] = 21 [ 25.665237] ================================================================== [ 25.672646] BUG: KASAN: use-after-free in ucma_close+0x2d7/0x2f0 [ 25.678766] Read of size 8 at addr ffff8801b1176780 by task syz-executor0/4243 [ 25.686091] [ 25.687693] CPU: 0 PID: 4243 Comm: syz-executor0 Not tainted 4.16.0-rc4+ #254 [ 25.694935] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.704257] Call Trace: [ 25.706815] dump_stack+0x194/0x24d [ 25.710415] ? arch_local_irq_restore+0x53/0x53 [ 25.715054] ? show_regs_print_info+0x18/0x18 [ 25.719517] ? save_stack+0xa3/0xd0 [ 25.723119] ? ucma_close+0x2d7/0x2f0 [ 25.726893] print_address_description+0x73/0x250 [ 25.731710] ? ucma_close+0x2d7/0x2f0 [ 25.735483] kasan_report+0x23c/0x360 [ 25.739257] __asan_report_load8_noabort+0x14/0x20 [ 25.744157] ucma_close+0x2d7/0x2f0 [ 25.747756] ? __might_sleep+0x95/0x190 [ 25.751702] ? ucma_free_ctx+0xd90/0xd90 [ 25.755735] __fput+0x327/0x7e0 [ 25.758994] ? fput+0x140/0x140 [ 25.762249] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.766723] ____fput+0x15/0x20 [ 25.769977] task_work_run+0x199/0x270 [ 25.773838] ? task_work_cancel+0x210/0x210 [ 25.778130] ? _raw_spin_unlock+0x22/0x30 [ 25.782255] ? switch_task_namespaces+0x87/0xc0 [ 25.786906] do_exit+0x9bb/0x1ad0 [ 25.790335] ? ucma_create_id+0x45b/0x620 [ 25.794460] ? mm_update_next_owner+0x930/0x930 [ 25.799103] ? ucma_create_id+0x17b/0x620 [ 25.803225] ? ucma_get_event+0xa90/0xa90 [ 25.807351] ? __might_sleep+0x95/0x190 [ 25.811306] ? kasan_check_write+0x14/0x20 [ 25.815513] ? _copy_from_user+0x99/0x110 [ 25.819636] ? ucma_write+0x11f/0x3d0 [ 25.823406] ? ucma_get_event+0xa90/0xa90 [ 25.827533] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.832014] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.836488] ? __vfs_write+0xf7/0x970 [ 25.840271] ? rcu_note_context_switch+0x710/0x710 [ 25.845179] ? kernel_read+0x120/0x120 [ 25.849049] ? __might_sleep+0x95/0x190 [ 25.853007] ? _cond_resched+0x14/0x30 [ 25.856868] ? __inode_security_revalidate+0xd9/0x130 [ 25.862029] ? avc_policy_seqno+0x9/0x20 [ 25.866066] ? security_file_permission+0x89/0x1e0 [ 25.870983] ? compat_SyS_futex+0x288/0x380 [ 25.875282] ? vfs_write+0x224/0x510 [ 25.878969] do_group_exit+0x149/0x400 [ 25.882830] ? compat_SyS_get_robust_list+0x300/0x300 [ 25.888001] ? SyS_write+0x184/0x220 [ 25.891692] ? __do_page_fault+0x3d6/0xc90 [ 25.895906] ? SyS_exit+0x30/0x30 [ 25.899333] ? SyS_read+0x220/0x220 [ 25.902942] ? do_fast_syscall_32+0x156/0xf9f [ 25.907413] ? do_group_exit+0x400/0x400 [ 25.911449] SyS_exit_group+0x1d/0x20 [ 25.915225] do_fast_syscall_32+0x3ec/0xf9f [ 25.919525] ? do_int80_syscall_32+0x9c0/0x9c0 [ 25.924082] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.928812] ? syscall_return_slowpath+0x2ac/0x550 [ 25.934064] ? prepare_exit_to_usermode+0x350/0x350 [ 25.939052] ? sysret32_from_system_call+0x5/0x3c [ 25.943869] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.948691] entry_SYSENTER_compat+0x70/0x7f [ 25.953069] RIP: 0023:0xf7fcac99 [ 25.956402] RSP: 002b:00000000ff91dbbc EFLAGS: 00000286 ORIG_RAX: 00000000000000fc [ 25.964082] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 25.971324] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 25.978569] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 25.985811] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 25.993054] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 26.000331] [ 26.001937] Allocated by task 4243: [ 26.005536] save_stack+0x43/0xd0 [ 26.008961] kasan_kmalloc+0xad/0xe0 [ 26.012647] kmem_cache_alloc_trace+0x136/0x740 [ 26.017285] ucma_alloc_ctx+0xce/0x610 [ 26.021144] ucma_create_id+0x205/0x620 [ 26.025095] ucma_write+0x2d6/0x3d0 [ 26.028690] __vfs_write+0xef/0x970 [ 26.032293] vfs_write+0x189/0x510 [ 26.035811] SyS_write+0xef/0x220 [ 26.039237] do_fast_syscall_32+0x3ec/0xf9f [ 26.043535] entry_SYSENTER_compat+0x70/0x7f [ 26.047912] [ 26.049509] Freed by task 4243: [ 26.052756] save_stack+0x43/0xd0 [ 26.056181] __kasan_slab_free+0x11a/0x170 [ 26.060393] kasan_slab_free+0xe/0x10 [ 26.064162] kfree+0xd9/0x260 [ 26.067237] ucma_create_id+0x45b/0x620 [ 26.071185] ucma_write+0x2d6/0x3d0 [ 26.074781] __vfs_write+0xef/0x970 [ 26.078379] vfs_write+0x189/0x510 [ 26.081891] SyS_write+0xef/0x220 [ 26.085315] do_fast_syscall_32+0x3ec/0xf9f [ 26.089614] entry_SYSENTER_compat+0x70/0x7f [ 26.093989] [ 26.095591] The buggy address belongs to the object at ffff8801b1176700 [ 26.095591] which belongs to the cache kmalloc-256 of size 256 [ 26.108218] The buggy address is located 128 bytes inside of [ 26.108218] 256-byte region [ffff8801b1176700, ffff8801b1176800) [ 26.120061] The buggy address belongs to the page: [ 26.124967] page:ffffea0006c45d80 count:1 mapcount:0 mapping:ffff8801b11760c0 index:0x0 [ 26.133079] flags: 0x2fffc0000000100(slab) [ 26.137284] raw: 02fffc0000000100 ffff8801b11760c0 0000000000000000 000000010000000c [ 26.145135] raw: ffffea0006c40ee0 ffffea0006bad860 ffff8801dac007c0 0000000000000000 [ 26.152985] page dumped because: kasan: bad access detected [ 26.158663] [ 26.160267] Memory state around the buggy address: [ 26.165173] ffff8801b1176680: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc [ 26.172503] ffff8801b1176700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.179832] >ffff8801b1176780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.187160] ^ [ 26.190495] ffff8801b1176800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 26.197825] ffff8801b1176880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.205153] ================================================================== [ 26.212480] Disabling lock debugging due to kernel taint [ 26.217953] Kernel panic - not syncing: panic_on_warn set ... [ 26.217953] [ 26.225297] CPU: 0 PID: 4243 Comm: syz-executor0 Tainted: G B 4.16.0-rc4+ #254 [ 26.233840] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.243160] Call Trace: [ 26.245719] dump_stack+0x194/0x24d [ 26.249315] ? arch_local_irq_restore+0x53/0x53 [ 26.253953] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.258677] ? vsnprintf+0x1ed/0x1900 [ 26.262451] ? ucma_close+0x1f0/0x2f0 [ 26.266220] panic+0x1e4/0x41c [ 26.269382] ? refcount_error_report+0x214/0x214 [ 26.274109] ? add_taint+0x1c/0x50 [ 26.277620] ? add_taint+0x1c/0x50 [ 26.281129] ? ucma_close+0x2d7/0x2f0 [ 26.284897] kasan_end_report+0x50/0x50 [ 26.288838] kasan_report+0x149/0x360 [ 26.292608] __asan_report_load8_noabort+0x14/0x20 [ 26.297508] ucma_close+0x2d7/0x2f0 [ 26.301106] ? __might_sleep+0x95/0x190 [ 26.305051] ? ucma_free_ctx+0xd90/0xd90 [ 26.309080] __fput+0x327/0x7e0 [ 26.312331] ? fput+0x140/0x140 [ 26.315595] ? _raw_spin_unlock_irq+0x27/0x70 [ 26.320061] ____fput+0x15/0x20 [ 26.323313] task_work_run+0x199/0x270 [ 26.327168] ? task_work_cancel+0x210/0x210 [ 26.331461] ? _raw_spin_unlock+0x22/0x30 [ 26.335577] ? switch_task_namespaces+0x87/0xc0 [ 26.340219] do_exit+0x9bb/0x1ad0 [ 26.343641] ? ucma_create_id+0x45b/0x620 [ 26.347760] ? mm_update_next_owner+0x930/0x930 [ 26.352399] ? ucma_create_id+0x17b/0x620 [ 26.356514] ? ucma_get_event+0xa90/0xa90 [ 26.360634] ? __might_sleep+0x95/0x190 [ 26.364577] ? kasan_check_write+0x14/0x20 [ 26.368780] ? _copy_from_user+0x99/0x110 [ 26.372911] ? ucma_write+0x11f/0x3d0 [ 26.376686] ? ucma_get_event+0xa90/0xa90 [ 26.380810] ? ucma_resolve_route+0x1a0/0x1a0 [ 26.385296] ? ucma_resolve_route+0x1a0/0x1a0 [ 26.389768] ? __vfs_write+0xf7/0x970 [ 26.393543] ? rcu_note_context_switch+0x710/0x710 [ 26.398449] ? kernel_read+0x120/0x120 [ 26.402308] ? __might_sleep+0x95/0x190 [ 26.406251] ? _cond_resched+0x14/0x30 [ 26.410108] ? __inode_security_revalidate+0xd9/0x130 [ 26.415267] ? avc_policy_seqno+0x9/0x20 [ 26.419299] ? security_file_permission+0x89/0x1e0 [ 26.424203] ? compat_SyS_futex+0x288/0x380 [ 26.428497] ? vfs_write+0x224/0x510 [ 26.432182] do_group_exit+0x149/0x400 [ 26.436040] ? compat_SyS_get_robust_list+0x300/0x300 [ 26.441197] ? SyS_write+0x184/0x220 [ 26.444882] ? __do_page_fault+0x3d6/0xc90 [ 26.449083] ? SyS_exit+0x30/0x30 [ 26.452503] ? SyS_read+0x220/0x220 [ 26.456097] ? do_fast_syscall_32+0x156/0xf9f [ 26.460560] ? do_group_exit+0x400/0x400 [ 26.464588] SyS_exit_group+0x1d/0x20 [ 26.468357] do_fast_syscall_32+0x3ec/0xf9f [ 26.472652] ? do_int80_syscall_32+0x9c0/0x9c0 [ 26.477201] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.481926] ? syscall_return_slowpath+0x2ac/0x550 [ 26.486821] ? prepare_exit_to_usermode+0x350/0x350 [ 26.491808] ? sysret32_from_system_call+0x5/0x3c [ 26.496632] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.501443] entry_SYSENTER_compat+0x70/0x7f [ 26.505819] RIP: 0023:0xf7fcac99 [ 26.509150] RSP: 002b:00000000ff91dbbc EFLAGS: 00000286 ORIG_RAX: 00000000000000fc [ 26.516832] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 26.524070] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 26.531310] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 26.538548] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 26.545785] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 26.553375] Dumping ftrace buffer: [ 26.556904] (ftrace buffer empty) [ 26.560586] Kernel Offset: disabled [ 26.564181] Rebooting in 86400 seconds..