bisecting fixing commit since a844dc4c544291470aa69edbe2434b040794e269 building syzkaller on eef6e5808d6507716d331b9eff67fdd991be891a testing commit a844dc4c544291470aa69edbe2434b040794e269 with gcc (GCC) 8.1.0 kernel signature: 6a87e6dbf62a99c7fd703a4baf4cc4d453afb79494f26f9ab06466dc6fe75865 all runs: crashed: KASAN: use-after-free Read in fbcon_cursor testing current HEAD e0f8b8a65a473a8baa439cf865a694bbeb83fe90 testing commit e0f8b8a65a473a8baa439cf865a694bbeb83fe90 with gcc (GCC) 8.1.0 kernel signature: ab1df693fe97e0c7cf1fbea25517ee708cbae7f815d21f24c27b4e14156ddae3 all runs: crashed: KASAN: use-after-free Read in fbcon_cursor revisions tested: 2, total time: 24m29.366036731s (build: 16m33.413786313s, test: 7m22.789900353s) the crash still happens on HEAD commit msg: Linux 4.14.170 crash: KASAN: use-after-free Read in fbcon_cursor ================================================================== BUG: KASAN: use-after-free in fbcon_cursor+0x583/0x6c0 drivers/video/fbdev/core/fbcon.c:1325 Read of size 2 at addr ffff8880a8a315cc by task syz-executor.0/13841 CPU: 0 PID: 13841 Comm: syz-executor.0 Not tainted 4.14.170-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:00007f7c12a91c78 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: 00007f7c12a926d4 R13: 00000000004c7009 R14: 00000000004dd670 R15: 00000000ffffffff Allocated by task 13821: 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 13841: 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 ffff8880a8a315c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 12 bytes inside of 32-byte region [ffff8880a8a315c0, ffff8880a8a315e0) The buggy address belongs to the page: page:ffffea0002a28c40 count:1 mapcount:0 mapping:ffff8880a8a31000 index:0xffff8880a8a31fc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a8a31000 ffff8880a8a31fc1 000000010000003f raw: ffffea0002637720 ffffea0002a16c20 ffff8880aa8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8a31480: fb fb fb fb fc fc fc fc 00 00 02 fc fc fc fc fc ffff8880a8a31500: 00 00 03 fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a8a31580: 00 06 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880a8a31600: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc ffff8880a8a31680: 00 00 01 fc fc fc fc fc 00 05 fc fc fc fc fc fc ==================================================================