bisecting fixing commit since a844dc4c544291470aa69edbe2434b040794e269 building syzkaller on 2a752b7c5e39457c3c16ef91cf2192a42813c802 testing commit a844dc4c544291470aa69edbe2434b040794e269 with gcc (GCC) 8.1.0 kernel signature: de06076c19fc7aa721cff569b43f5ba19f25700119efb2ee78ab9c8d2b9c7c26 all runs: crashed: KASAN: slab-out-of-bounds Read in fbcon_get_font testing current HEAD 78d697fc93f98054e36a3ab76dca1a88802ba7be testing commit 78d697fc93f98054e36a3ab76dca1a88802ba7be with gcc (GCC) 8.1.0 kernel signature: e38919e8916d9e9a08d6e100dda3f47ab76853cf9c3b06b69f6b44250e99b11d all runs: crashed: KASAN: slab-out-of-bounds Read in fbcon_get_font revisions tested: 2, total time: 24m59.768022759s (build: 17m24.753750645s, test: 6m32.837886072s) the crash still happens on HEAD commit msg: Linux 4.14.172 crash: KASAN: slab-out-of-bounds Read in fbcon_get_font IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready 8021q: adding VLAN 0 to HW filter on device batadv0 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:347 [inline] BUG: KASAN: slab-out-of-bounds in fbcon_get_font+0x21c/0x570 drivers/video/fbdev/core/fbcon.c:2421 Read of size 5 at addr ffff8880928fed8c by task syz-executor.0/7293 CPU: 1 PID: 7293 Comm: syz-executor.0 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+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 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:347 [inline] fbcon_get_font+0x21c/0x570 drivers/video/fbdev/core/fbcon.c:2421 con_font_get drivers/tty/vt/vt.c:4078 [inline] con_font_op+0x75c/0x1020 drivers/tty/vt/vt.c:4229 do_fontx_ioctl drivers/tty/vt/vt_ioctl.c:244 [inline] vt_ioctl+0xd52/0x2090 drivers/tty/vt/vt_ioctl.c:935 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:00007fda9fc6fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a909 RDX: 0000000020000140 RSI: 0000000000004b60 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fda9fc706d4 R13: 00000000004c7019 R14: 00000000004dd688 R15: 00000000ffffffff Allocated by task 7303: 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] fbcon_set_font+0x2c9/0x840 drivers/video/fbdev/core/fbcon.c:2618 con_font_set drivers/tty/vt/vt.c:4162 [inline] con_font_op+0xb6f/0x1020 drivers/tty/vt/vt.c:4227 do_fontx_ioctl drivers/tty/vt/vt_ioctl.c:244 [inline] vt_ioctl+0xd52/0x2090 drivers/tty/vt/vt_ioctl.c:935 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 24: 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 free_tty_struct+0x86/0xb0 drivers/tty/tty_io.c:174 release_one_tty+0x262/0x330 drivers/tty/tty_io.c:1455 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2114 worker_thread+0xcc/0xee0 kernel/workqueue.c:2248 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8880928fe980 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1036 bytes inside of 2048-byte region [ffff8880928fe980, ffff8880928ff180) The buggy address belongs to the page: page:ffffea00024a3f80 count:1 mapcount:0 mapping:ffff8880928fe100 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff8880928fe100 0000000000000000 0000000100000003 raw: ffffea000209af20 ffffea00024a8b20 ffff8880aa800c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880928fec80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880928fed00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880928fed80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880928fee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880928fee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================