[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [ 17.605259] mcstransd (4126) used greatest stack depth: 16488 bytes left 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: [ 19.256940] audit: type=1400 audit(1521077386.756:6): avc: denied { map } for pid=4212 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.49' (ECDSA) to the list of known hosts. [ 25.670434] audit: type=1400 audit(1521077393.170:7): avc: denied { map } for pid=4226 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/15 01:29:53 parsed 1 programs 2018/03/15 01:29:53 executed programs: 0 [ 25.926215] audit: type=1400 audit(1521077393.425:8): avc: denied { map } for pid=4226 comm="syz-execprog" path="/root/syzkaller-shm129790817" 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.942641] IPVS: ftp: loaded support on port[0] = 21 [ 25.984304] ================================================================== [ 25.991738] BUG: KASAN: use-after-free in ucma_close+0x2d7/0x2f0 [ 25.997856] Read of size 8 at addr ffff8801ceb4fdc0 by task syz-executor0/4235 [ 26.005194] [ 26.006800] CPU: 1 PID: 4235 Comm: syz-executor0 Not tainted 4.16.0-rc5+ #263 [ 26.014047] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.023384] Call Trace: [ 26.025950] dump_stack+0x194/0x24d [ 26.029559] ? arch_local_irq_restore+0x53/0x53 [ 26.034203] ? show_regs_print_info+0x18/0x18 [ 26.038671] ? save_stack+0xa3/0xd0 [ 26.042277] ? ucma_close+0x2d7/0x2f0 [ 26.046059] print_address_description+0x73/0x250 [ 26.050901] ? ucma_close+0x2d7/0x2f0 [ 26.054685] kasan_report+0x23c/0x360 [ 26.058474] __asan_report_load8_noabort+0x14/0x20 [ 26.063380] ucma_close+0x2d7/0x2f0 [ 26.066983] ? __might_sleep+0x95/0x190 [ 26.070944] ? ucma_free_ctx+0xd90/0xd90 [ 26.074977] __fput+0x327/0x7e0 [ 26.078235] ? fput+0x140/0x140 [ 26.081491] ? _raw_spin_unlock_irq+0x27/0x70 [ 26.085967] ____fput+0x15/0x20 [ 26.089222] task_work_run+0x199/0x270 [ 26.093085] ? task_work_cancel+0x210/0x210 [ 26.097382] ? _raw_spin_unlock+0x22/0x30 [ 26.101503] ? switch_task_namespaces+0x87/0xc0 [ 26.106153] do_exit+0x9bb/0x1ad0 [ 26.109582] ? ucma_create_id+0x45b/0x620 [ 26.113707] ? mm_update_next_owner+0x930/0x930 [ 26.118350] ? ucma_create_id+0x17b/0x620 [ 26.122483] ? ucma_get_event+0xa90/0xa90 [ 26.126612] ? __might_sleep+0x95/0x190 [ 26.130565] ? kasan_check_write+0x14/0x20 [ 26.134780] ? _copy_from_user+0x99/0x110 [ 26.138906] ? ucma_write+0x11f/0x3d0 [ 26.142678] ? ucma_get_event+0xa90/0xa90 [ 26.146799] ? ucma_resolve_route+0x1a0/0x1a0 [ 26.151276] ? ucma_resolve_route+0x1a0/0x1a0 [ 26.155746] ? __vfs_write+0xf7/0x970 [ 26.159519] ? rcu_note_context_switch+0x710/0x710 [ 26.164422] ? kernel_read+0x120/0x120 [ 26.168283] ? __might_sleep+0x95/0x190 [ 26.172234] ? _cond_resched+0x14/0x30 [ 26.176096] ? __inode_security_revalidate+0xd9/0x130 [ 26.181258] ? avc_policy_seqno+0x9/0x20 [ 26.185306] ? security_file_permission+0x89/0x1e0 [ 26.190227] ? compat_SyS_futex+0x288/0x380 [ 26.194523] ? vfs_write+0x224/0x510 [ 26.198216] do_group_exit+0x149/0x400 [ 26.202095] ? compat_SyS_get_robust_list+0x300/0x300 [ 26.207264] ? SyS_write+0x184/0x220 [ 26.210950] ? __do_page_fault+0x3d6/0xc90 [ 26.215167] ? SyS_exit+0x30/0x30 [ 26.218593] ? SyS_read+0x220/0x220 [ 26.222195] ? do_fast_syscall_32+0x156/0xf9f [ 26.226664] ? do_group_exit+0x400/0x400 [ 26.230699] SyS_exit_group+0x1d/0x20 [ 26.234474] do_fast_syscall_32+0x3ec/0xf9f [ 26.238774] ? do_int80_syscall_32+0x9c0/0x9c0 [ 26.243329] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.248061] ? syscall_return_slowpath+0x2ac/0x550 [ 26.252966] ? prepare_exit_to_usermode+0x350/0x350 [ 26.257961] ? sysret32_from_system_call+0x5/0x3c [ 26.262793] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.267635] entry_SYSENTER_compat+0x70/0x7f [ 26.272023] RIP: 0023:0xf7fd8c99 [ 26.275363] RSP: 002b:00000000ffae107c EFLAGS: 00000282 ORIG_RAX: 00000000000000fc [ 26.283047] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 26.290289] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 26.297537] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 26.304779] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 26.312026] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 26.319308] [ 26.320916] Allocated by task 4235: [ 26.324516] save_stack+0x43/0xd0 [ 26.327943] kasan_kmalloc+0xad/0xe0 [ 26.331638] kmem_cache_alloc_trace+0x136/0x740 [ 26.336278] ucma_alloc_ctx+0xce/0x610 [ 26.340138] ucma_create_id+0x205/0x620 [ 26.344083] ucma_write+0x2d6/0x3d0 [ 26.347681] __vfs_write+0xef/0x970 [ 26.351280] vfs_write+0x189/0x510 [ 26.354791] SyS_write+0xef/0x220 [ 26.358218] do_fast_syscall_32+0x3ec/0xf9f [ 26.362513] entry_SYSENTER_compat+0x70/0x7f [ 26.366887] [ 26.368485] Freed by task 4235: [ 26.371734] save_stack+0x43/0xd0 [ 26.375161] __kasan_slab_free+0x11a/0x170 [ 26.379367] kasan_slab_free+0xe/0x10 [ 26.383139] kfree+0xd9/0x260 [ 26.386217] ucma_create_id+0x45b/0x620 [ 26.390164] ucma_write+0x2d6/0x3d0 [ 26.393761] __vfs_write+0xef/0x970 [ 26.397362] vfs_write+0x189/0x510 [ 26.400871] SyS_write+0xef/0x220 [ 26.404297] do_fast_syscall_32+0x3ec/0xf9f [ 26.408589] entry_SYSENTER_compat+0x70/0x7f [ 26.412972] [ 26.414572] The buggy address belongs to the object at ffff8801ceb4fd40 [ 26.414572] which belongs to the cache kmalloc-256 of size 256 [ 26.427208] The buggy address is located 128 bytes inside of [ 26.427208] 256-byte region [ffff8801ceb4fd40, ffff8801ceb4fe40) [ 26.439054] The buggy address belongs to the page: [ 26.443958] page:ffffea00073ad3c0 count:1 mapcount:0 mapping:ffff8801ceb4f0c0 index:0x0 [ 26.452073] flags: 0x2fffc0000000100(slab) [ 26.456279] raw: 02fffc0000000100 ffff8801ceb4f0c0 0000000000000000 000000010000000c [ 26.464133] raw: ffffea00073ad3a0 ffffea00073ad420 ffff8801dac007c0 0000000000000000 [ 26.471982] page dumped because: kasan: bad access detected [ 26.477662] [ 26.479259] Memory state around the buggy address: [ 26.484161] ffff8801ceb4fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.491492] ffff8801ceb4fd00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 26.498821] >ffff8801ceb4fd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.506153] ^ [ 26.511571] ffff8801ceb4fe00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 26.518901] ffff8801ceb4fe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 26.526228] ================================================================== [ 26.533554] Disabling lock debugging due to kernel taint [ 26.539050] Kernel panic - not syncing: panic_on_warn set ... [ 26.539050] [ 26.546395] CPU: 1 PID: 4235 Comm: syz-executor0 Tainted: G B 4.16.0-rc5+ #263 [ 26.554938] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.564261] Call Trace: [ 26.566823] dump_stack+0x194/0x24d [ 26.570424] ? arch_local_irq_restore+0x53/0x53 [ 26.575064] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.579789] ? vsnprintf+0x1ed/0x1900 [ 26.583571] ? ucma_close+0x210/0x2f0 [ 26.587341] panic+0x1e4/0x41c [ 26.590504] ? refcount_error_report+0x214/0x214 [ 26.595230] ? add_taint+0x1c/0x50 [ 26.598740] ? add_taint+0x1c/0x50 [ 26.602252] ? ucma_close+0x2d7/0x2f0 [ 26.606031] kasan_end_report+0x50/0x50 [ 26.609980] kasan_report+0x149/0x360 [ 26.613751] __asan_report_load8_noabort+0x14/0x20 [ 26.618648] ucma_close+0x2d7/0x2f0 [ 26.622245] ? __might_sleep+0x95/0x190 [ 26.626190] ? ucma_free_ctx+0xd90/0xd90 [ 26.630220] __fput+0x327/0x7e0 [ 26.633470] ? fput+0x140/0x140 [ 26.636729] ? _raw_spin_unlock_irq+0x27/0x70 [ 26.641202] ____fput+0x15/0x20 [ 26.644456] task_work_run+0x199/0x270 [ 26.648315] ? task_work_cancel+0x210/0x210 [ 26.652610] ? _raw_spin_unlock+0x22/0x30 [ 26.656728] ? switch_task_namespaces+0x87/0xc0 [ 26.661367] do_exit+0x9bb/0x1ad0 [ 26.664788] ? ucma_create_id+0x45b/0x620 [ 26.668909] ? mm_update_next_owner+0x930/0x930 [ 26.673546] ? ucma_create_id+0x17b/0x620 [ 26.677664] ? ucma_get_event+0xa90/0xa90 [ 26.681785] ? __might_sleep+0x95/0x190 [ 26.685734] ? kasan_check_write+0x14/0x20 [ 26.689945] ? _copy_from_user+0x99/0x110 [ 26.694065] ? ucma_write+0x11f/0x3d0 [ 26.697833] ? ucma_get_event+0xa90/0xa90 [ 26.702041] ? ucma_resolve_route+0x1a0/0x1a0 [ 26.706516] ? ucma_resolve_route+0x1a0/0x1a0 [ 26.710987] ? __vfs_write+0xf7/0x970 [ 26.714760] ? rcu_note_context_switch+0x710/0x710 [ 26.719660] ? kernel_read+0x120/0x120 [ 26.723527] ? __might_sleep+0x95/0x190 [ 26.727473] ? _cond_resched+0x14/0x30 [ 26.731331] ? __inode_security_revalidate+0xd9/0x130 [ 26.736491] ? avc_policy_seqno+0x9/0x20 [ 26.740526] ? security_file_permission+0x89/0x1e0 [ 26.745432] ? compat_SyS_futex+0x288/0x380 [ 26.749722] ? vfs_write+0x224/0x510 [ 26.753407] do_group_exit+0x149/0x400 [ 26.757263] ? compat_SyS_get_robust_list+0x300/0x300 [ 26.762422] ? SyS_write+0x184/0x220 [ 26.766108] ? __do_page_fault+0x3d6/0xc90 [ 26.770314] ? SyS_exit+0x30/0x30 [ 26.773736] ? SyS_read+0x220/0x220 [ 26.777339] ? do_fast_syscall_32+0x156/0xf9f [ 26.781804] ? do_group_exit+0x400/0x400 [ 26.785839] SyS_exit_group+0x1d/0x20 [ 26.789610] do_fast_syscall_32+0x3ec/0xf9f [ 26.793909] ? do_int80_syscall_32+0x9c0/0x9c0 [ 26.798469] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.803197] ? syscall_return_slowpath+0x2ac/0x550 [ 26.808096] ? prepare_exit_to_usermode+0x350/0x350 [ 26.813090] ? sysret32_from_system_call+0x5/0x3c [ 26.817910] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.822729] entry_SYSENTER_compat+0x70/0x7f [ 26.827207] RIP: 0023:0xf7fd8c99 [ 26.830545] RSP: 002b:00000000ffae107c EFLAGS: 00000282 ORIG_RAX: 00000000000000fc [ 26.838220] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 26.845466] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 26.852705] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 26.859942] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 26.867185] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 26.874899] Dumping ftrace buffer: [ 26.878411] (ftrace buffer empty) [ 26.882089] Kernel Offset: disabled [ 26.885687] Rebooting in 86400 seconds..