bisecting fixing commit since a844dc4c544291470aa69edbe2434b040794e269 building syzkaller on eef6e5808d6507716d331b9eff67fdd991be891a testing commit a844dc4c544291470aa69edbe2434b040794e269 with gcc (GCC) 8.1.0 kernel signature: 1a38e8628095e3a010bc01e24ddbcb975ae9a9b6 all runs: crashed: KASAN: use-after-free Read in fbcon_cursor testing current HEAD 6d0c334a400db31751c787c411e7187ab59a3f1d testing commit 6d0c334a400db31751c787c411e7187ab59a3f1d with gcc (GCC) 8.1.0 kernel signature: f2cf4a44e636c727abce4dadf33b4730fde691a2 all runs: crashed: KASAN: use-after-free Read in fbcon_cursor revisions tested: 2, total time: 26m40.759668065s (build: 16m56.692932594s, test: 9m18.152762471s) the crash still happens on HEAD commit msg: Linux 4.14.164 crash: KASAN: use-after-free Read in fbcon_cursor IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready 8021q: adding VLAN 0 to HW filter on device batadv0 ================================================================== BUG: KASAN: use-after-free in fbcon_cursor+0x583/0x6c0 drivers/video/fbdev/core/fbcon.c:1325 Read of size 2 at addr ffff88809f283ecc by task syz-executor.5/9507 CPU: 1 PID: 9507 Comm: syz-executor.5 Not tainted 4.14.164-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+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:428 fbcon_cursor+0x583/0x6c0 drivers/video/fbdev/core/fbcon.c:1325 fbcon_scrolldelta+0x521/0xff0 drivers/video/fbdev/core/fbcon.c:2832 fbcon_set_origin+0x16/0x20 drivers/video/fbdev/core/fbcon.c:2883 set_origin+0x2b7/0x390 drivers/tty/vt/vt.c:613 vc_do_resize+0x68f/0x1010 drivers/tty/vt/vt.c:934 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:974 vt_ioctl+0x34c/0x21d0 drivers/tty/vt/vt_ioctl.c:840 tty_ioctl+0x434/0x1260 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45a909 RSP: 002b:00007f7c64eadc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a909 RDX: 0000000020000000 RSI: 0000000000005609 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7c64eae6d4 R13: 00000000004c7009 R14: 00000000004dd670 R15: 00000000ffffffff Allocated by task 9524: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15b/0x7b0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] vc_do_resize+0x1bb/0x1010 drivers/tty/vt/vt.c:872 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:974 vt_ioctl+0x34c/0x21d0 drivers/tty/vt/vt_ioctl.c:840 tty_ioctl+0x434/0x1260 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 9507: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 vc_do_resize+0x62a/0x1010 drivers/tty/vt/vt.c:931 vc_resize+0x3d/0x60 drivers/tty/vt/vt.c:974 vt_ioctl+0x34c/0x21d0 drivers/tty/vt/vt_ioctl.c:840 tty_ioctl+0x434/0x1260 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88809f283ec0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 12 bytes inside of 32-byte region [ffff88809f283ec0, ffff88809f283ee0) The buggy address belongs to the page: page:ffffea00027ca0c0 count:1 mapcount:0 mapping:ffff88809f283000 index:0xffff88809f283fc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809f283000 ffff88809f283fc1 000000010000003d raw: ffffea0002aa5960 ffffea00026e4ea0 ffff8880aa8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f283d80: fb fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc ffff88809f283e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88809f283e80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff88809f283f00: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ffff88809f283f80: 00 05 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================