[?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.395570] audit: type=1400 audit(1520816255.058: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.11' (ECDSA) to the list of known hosts. syzkaller login: [ 24.725159] audit: type=1400 audit(1520816261.387: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/12 00:57:41 parsed 1 programs 2018/03/12 00:57:41 executed programs: 0 [ 24.976476] audit: type=1400 audit(1520816261.639:8): avc: denied { map } for pid=4235 comm="syz-execprog" path="/root/syzkaller-shm389214188" 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.990972] IPVS: ftp: loaded support on port[0] = 21 [ 25.034435] ================================================================== [ 25.041852] BUG: KASAN: use-after-free in ucma_close+0x2d7/0x2f0 [ 25.047981] Read of size 8 at addr ffff8801b01e9880 by task syz-executor0/4243 [ 25.055308] [ 25.056909] CPU: 1 PID: 4243 Comm: syz-executor0 Not tainted 4.16.0-rc4+ #260 [ 25.064149] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.073478] Call Trace: [ 25.076048] dump_stack+0x194/0x24d [ 25.079654] ? arch_local_irq_restore+0x53/0x53 [ 25.084307] ? show_regs_print_info+0x18/0x18 [ 25.088772] ? save_stack+0xa3/0xd0 [ 25.092384] ? ucma_close+0x2d7/0x2f0 [ 25.096157] print_address_description+0x73/0x250 [ 25.100974] ? ucma_close+0x2d7/0x2f0 [ 25.104751] kasan_report+0x23c/0x360 [ 25.108531] __asan_report_load8_noabort+0x14/0x20 [ 25.113432] ucma_close+0x2d7/0x2f0 [ 25.117034] ? __might_sleep+0x95/0x190 [ 25.120992] ? ucma_free_ctx+0xd90/0xd90 [ 25.125047] __fput+0x327/0x7e0 [ 25.128330] ? fput+0x140/0x140 [ 25.131607] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.136096] ____fput+0x15/0x20 [ 25.139350] task_work_run+0x199/0x270 [ 25.143215] ? task_work_cancel+0x210/0x210 [ 25.147511] ? _raw_spin_unlock+0x22/0x30 [ 25.151634] ? switch_task_namespaces+0x87/0xc0 [ 25.156284] do_exit+0x9bb/0x1ad0 [ 25.159710] ? ucma_create_id+0x45b/0x620 [ 25.163835] ? mm_update_next_owner+0x930/0x930 [ 25.168485] ? ucma_create_id+0x17b/0x620 [ 25.172614] ? ucma_get_event+0xa90/0xa90 [ 25.176748] ? __might_sleep+0x95/0x190 [ 25.180701] ? kasan_check_write+0x14/0x20 [ 25.184919] ? _copy_from_user+0x99/0x110 [ 25.189049] ? ucma_write+0x11f/0x3d0 [ 25.192821] ? ucma_get_event+0xa90/0xa90 [ 25.196942] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.201422] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.205891] ? __vfs_write+0xf7/0x970 [ 25.209666] ? rcu_note_context_switch+0x710/0x710 [ 25.214570] ? kernel_read+0x120/0x120 [ 25.218431] ? __might_sleep+0x95/0x190 [ 25.222383] ? _cond_resched+0x14/0x30 [ 25.226254] ? __inode_security_revalidate+0xd9/0x130 [ 25.231420] ? avc_policy_seqno+0x9/0x20 [ 25.235460] ? security_file_permission+0x89/0x1e0 [ 25.240373] ? compat_SyS_futex+0x288/0x380 [ 25.244667] ? vfs_write+0x224/0x510 [ 25.248355] do_group_exit+0x149/0x400 [ 25.252218] ? compat_SyS_get_robust_list+0x300/0x300 [ 25.257383] ? SyS_write+0x184/0x220 [ 25.261066] ? __do_page_fault+0x3d6/0xc90 [ 25.265277] ? SyS_exit+0x30/0x30 [ 25.268704] ? SyS_read+0x220/0x220 [ 25.272307] ? do_fast_syscall_32+0x156/0xf9f [ 25.276783] ? do_group_exit+0x400/0x400 [ 25.280825] SyS_exit_group+0x1d/0x20 [ 25.284601] do_fast_syscall_32+0x3ec/0xf9f [ 25.288903] ? do_int80_syscall_32+0x9c0/0x9c0 [ 25.293459] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.298592] ? syscall_return_slowpath+0x2ac/0x550 [ 25.303495] ? prepare_exit_to_usermode+0x350/0x350 [ 25.308493] ? sysret32_from_system_call+0x5/0x3c [ 25.313316] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.318136] entry_SYSENTER_compat+0x70/0x7f [ 25.322514] RIP: 0023:0xf7f58c99 [ 25.325854] RSP: 002b:00000000ffc6df3c EFLAGS: 00000282 ORIG_RAX: 00000000000000fc [ 25.333533] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 25.340772] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 25.348018] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 25.355266] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 25.362510] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 25.369768] [ 25.371369] Allocated by task 4243: [ 25.374971] save_stack+0x43/0xd0 [ 25.378397] kasan_kmalloc+0xad/0xe0 [ 25.382091] kmem_cache_alloc_trace+0x136/0x740 [ 25.386742] ucma_alloc_ctx+0xce/0x610 [ 25.390606] ucma_create_id+0x205/0x620 [ 25.394551] ucma_write+0x2d6/0x3d0 [ 25.398149] __vfs_write+0xef/0x970 [ 25.401746] vfs_write+0x189/0x510 [ 25.405256] SyS_write+0xef/0x220 [ 25.408683] do_fast_syscall_32+0x3ec/0xf9f [ 25.412975] entry_SYSENTER_compat+0x70/0x7f [ 25.417353] [ 25.418952] Freed by task 4243: [ 25.422202] save_stack+0x43/0xd0 [ 25.425629] __kasan_slab_free+0x11a/0x170 [ 25.429833] kasan_slab_free+0xe/0x10 [ 25.433608] kfree+0xd9/0x260 [ 25.436684] ucma_create_id+0x45b/0x620 [ 25.440633] ucma_write+0x2d6/0x3d0 [ 25.444233] __vfs_write+0xef/0x970 [ 25.447831] vfs_write+0x189/0x510 [ 25.451341] SyS_write+0xef/0x220 [ 25.454765] do_fast_syscall_32+0x3ec/0xf9f [ 25.459065] entry_SYSENTER_compat+0x70/0x7f [ 25.463444] [ 25.465049] The buggy address belongs to the object at ffff8801b01e9800 [ 25.465049] which belongs to the cache kmalloc-256 of size 256 [ 25.477763] The buggy address is located 128 bytes inside of [ 25.477763] 256-byte region [ffff8801b01e9800, ffff8801b01e9900) [ 25.489606] The buggy address belongs to the page: [ 25.494505] page:ffffea0006c07a40 count:1 mapcount:0 mapping:ffff8801b01e9080 index:0x0 [ 25.502621] flags: 0x2fffc0000000100(slab) [ 25.506825] raw: 02fffc0000000100 ffff8801b01e9080 0000000000000000 000000010000000c [ 25.514677] raw: ffffea0006e49020 ffffea0006bf0320 ffff8801dac007c0 0000000000000000 [ 25.522524] page dumped because: kasan: bad access detected [ 25.528200] [ 25.529797] Memory state around the buggy address: [ 25.534697] ffff8801b01e9780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.542030] ffff8801b01e9800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.549362] >ffff8801b01e9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.556691] ^ [ 25.560030] ffff8801b01e9900: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 [ 25.567368] ffff8801b01e9980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 25.574695] ================================================================== [ 25.582023] Disabling lock debugging due to kernel taint [ 25.587488] Kernel panic - not syncing: panic_on_warn set ... [ 25.587488] [ 25.594829] CPU: 1 PID: 4243 Comm: syz-executor0 Tainted: G B 4.16.0-rc4+ #260 [ 25.603371] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.612693] Call Trace: [ 25.615254] dump_stack+0x194/0x24d [ 25.618855] ? arch_local_irq_restore+0x53/0x53 [ 25.623496] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.628220] ? vsnprintf+0x1ed/0x1900 [ 25.631993] ? ucma_close+0x280/0x2f0 [ 25.635771] panic+0x1e4/0x41c [ 25.638934] ? refcount_error_report+0x214/0x214 [ 25.643662] ? add_taint+0x1c/0x50 [ 25.647169] ? add_taint+0x1c/0x50 [ 25.650679] ? ucma_close+0x2d7/0x2f0 [ 25.654449] kasan_end_report+0x50/0x50 [ 25.658393] kasan_report+0x149/0x360 [ 25.662176] __asan_report_load8_noabort+0x14/0x20 [ 25.667076] ucma_close+0x2d7/0x2f0 [ 25.670675] ? __might_sleep+0x95/0x190 [ 25.674616] ? ucma_free_ctx+0xd90/0xd90 [ 25.678645] __fput+0x327/0x7e0 [ 25.681896] ? fput+0x140/0x140 [ 25.685146] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.689613] ____fput+0x15/0x20 [ 25.692873] task_work_run+0x199/0x270 [ 25.696729] ? task_work_cancel+0x210/0x210 [ 25.701023] ? _raw_spin_unlock+0x22/0x30 [ 25.705142] ? switch_task_namespaces+0x87/0xc0 [ 25.709781] do_exit+0x9bb/0x1ad0 [ 25.713200] ? ucma_create_id+0x45b/0x620 [ 25.717318] ? mm_update_next_owner+0x930/0x930 [ 25.721963] ? ucma_create_id+0x17b/0x620 [ 25.726081] ? ucma_get_event+0xa90/0xa90 [ 25.730203] ? __might_sleep+0x95/0x190 [ 25.734152] ? kasan_check_write+0x14/0x20 [ 25.738357] ? _copy_from_user+0x99/0x110 [ 25.742478] ? ucma_write+0x11f/0x3d0 [ 25.746247] ? ucma_get_event+0xa90/0xa90 [ 25.750366] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.754836] ? ucma_resolve_route+0x1a0/0x1a0 [ 25.759302] ? __vfs_write+0xf7/0x970 [ 25.763073] ? rcu_note_context_switch+0x710/0x710 [ 25.767969] ? kernel_read+0x120/0x120 [ 25.771827] ? __might_sleep+0x95/0x190 [ 25.775772] ? _cond_resched+0x14/0x30 [ 25.779629] ? __inode_security_revalidate+0xd9/0x130 [ 25.784788] ? avc_policy_seqno+0x9/0x20 [ 25.788825] ? security_file_permission+0x89/0x1e0 [ 25.793729] ? compat_SyS_futex+0x288/0x380 [ 25.798025] ? vfs_write+0x224/0x510 [ 25.801713] do_group_exit+0x149/0x400 [ 25.805567] ? compat_SyS_get_robust_list+0x300/0x300 [ 25.810724] ? SyS_write+0x184/0x220 [ 25.814409] ? __do_page_fault+0x3d6/0xc90 [ 25.818618] ? SyS_exit+0x30/0x30 [ 25.822052] ? SyS_read+0x220/0x220 [ 25.825663] ? do_fast_syscall_32+0x156/0xf9f [ 25.830129] ? do_group_exit+0x400/0x400 [ 25.834159] SyS_exit_group+0x1d/0x20 [ 25.837932] do_fast_syscall_32+0x3ec/0xf9f [ 25.842224] ? do_int80_syscall_32+0x9c0/0x9c0 [ 25.846774] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.851501] ? syscall_return_slowpath+0x2ac/0x550 [ 25.856400] ? prepare_exit_to_usermode+0x350/0x350 [ 25.861389] ? sysret32_from_system_call+0x5/0x3c [ 25.866203] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.871026] entry_SYSENTER_compat+0x70/0x7f [ 25.875404] RIP: 0023:0xf7f58c99 [ 25.878736] RSP: 002b:00000000ffc6df3c EFLAGS: 00000282 ORIG_RAX: 00000000000000fc [ 25.886413] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 [ 25.893652] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 25.900891] RBP: 00000000080a2c25 R08: 0000000000000000 R09: 0000000000000000 [ 25.908128] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 25.915367] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 25.923043] Dumping ftrace buffer: [ 25.926553] (ftrace buffer empty) [ 25.930230] Kernel Offset: disabled [ 25.933837] Rebooting in 86400 seconds..