audit: type=1400 audit(1583331744.297:36): avc: denied { map } for pid=7446 comm="syz-executor006" path="/root/syz-executor006956602" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 ================================================================== BUG: KASAN: use-after-free in con_shutdown+0x7f/0x90 drivers/tty/vt/vt.c:2930 Write of size 8 at addr ffff88809355ee08 by task syz-executor006/7454 CPU: 0 PID: 7454 Comm: syz-executor006 Not tainted 4.14.172-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 con_shutdown+0x7f/0x90 drivers/tty/vt/vt.c:2930 release_tty+0xb6/0x7a0 drivers/tty/tty_io.c:1501 tty_release_struct+0x37/0x50 drivers/tty/tty_io.c:1616 tty_release+0xaa6/0xd60 drivers/tty/tty_io.c:1776 __fput+0x25f/0x790 fs/file_table.c:210 task_work_run+0x113/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9f2/0x2b00 kernel/exit.c:858 do_group_exit+0x100/0x310 kernel/exit.c:955 SYSC_exit_group kernel/exit.c:966 [inline] SyS_exit_group+0x19/0x20 kernel/exit.c:964 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x43ff38 RSP: 002b:00007ffe182eee58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ff38 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004bf950 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7454: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] vc_allocate drivers/tty/vt/vt.c:772 [inline] vc_allocate+0x142/0x550 drivers/tty/vt/vt.c:753 con_install+0x4f/0x3e0 drivers/tty/vt/vt.c:2881 tty_driver_install_tty drivers/tty/tty_io.c:1225 [inline] tty_init_dev drivers/tty/tty_io.c:1338 [inline] tty_init_dev+0xe1/0x3a0 drivers/tty/tty_io.c:1315 tty_open_by_driver drivers/tty/tty_io.c:1973 [inline] tty_open+0x410/0x9c0 drivers/tty/tty_io.c:2021 chrdev_open+0x1fc/0x540 fs/char_dev.c:423 do_dentry_open+0x732/0xe90 fs/open.c:777 vfs_open+0x105/0x220 fs/open.c:891 do_last fs/namei.c:3428 [inline] path_openat+0x8ca/0x3c50 fs/namei.c:3569 do_filp_open+0x18e/0x250 fs/namei.c:3603 do_sys_open+0x29d/0x3f0 fs/open.c:1084 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7456: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 vt_disallocate_all+0x25c/0x340 drivers/tty/vt/vt_ioctl.c:323 vt_ioctl+0x6e3/0x1f00 drivers/tty/vt/vt_ioctl.c:816 tty_ioctl+0x6c5/0x1220 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88809355ed00 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 264 bytes inside of 2048-byte region [ffff88809355ed00, ffff88809355f500) The buggy address belongs to the page: page:ffffea00024d5780 count:1 mapcount:0 mapping:ffff88809355e480 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88809355e480 0000000000000000 0000000100000003 raw: ffffea00024b54a0 ffffea0002584720 ffff88812fe56c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809355ed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809355ed80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809355ee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809355ee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809355ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================