================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:406 [inline] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x44b/0xa30 drivers/video/fbdev/core/softcursor.c:70 Read of size 9 at addr ffff888027bd9530 by task syz-executor.2/5838 CPU: 2 PID: 5838 Comm: syz-executor.2 Not tainted 5.8.0-rc7-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 memcpy+0x20/0x60 mm/kasan/common.c:105 memcpy include/linux/string.h:406 [inline] soft_cursor+0x44b/0xa30 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x1166/0x17d0 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x52b/0x650 drivers/video/fbdev/core/fbcon.c:1411 hide_cursor+0x85/0x280 drivers/tty/vt/vt.c:902 redraw_screen+0x5e1/0x770 drivers/tty/vt/vt.c:1006 vc_do_resize+0x1111/0x13f0 drivers/tty/vt/vt.c:1320 vt_ioctl+0x2037/0x2670 drivers/tty/vt/vt_ioctl.c:901 vt_compat_ioctl+0x1c9/0x6b0 drivers/tty/vt/vt_ioctl.c:1242 tty_compat_ioctl+0x19c/0x410 drivers/tty/tty_io.c:2847 __do_compat_sys_ioctl+0x1d3/0x230 fs/ioctl.c:847 do_syscall_32_irqs_on+0x3f/0x60 arch/x86/entry/common.c:428 __do_fast_syscall_32 arch/x86/entry/common.c:475 [inline] do_fast_syscall_32+0x7f/0x120 arch/x86/entry/common.c:503 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7fb2569 Code: c4 01 10 03 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f55ac0bc EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000000560a RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 12946: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x17a/0x340 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] fbcon_set_font+0x34f/0x8b0 drivers/video/fbdev/core/fbcon.c:2673 con_font_set drivers/tty/vt/vt.c:4578 [inline] con_font_op+0xd25/0x1110 drivers/tty/vt/vt.c:4643 vt_ioctl+0x1180/0x2670 drivers/tty/vt/vt_ioctl.c:928 vt_compat_ioctl+0x168/0x6b0 drivers/tty/vt/vt_ioctl.c:1249 tty_compat_ioctl+0x19c/0x410 drivers/tty/tty_io.c:2847 __do_compat_sys_ioctl+0x1d3/0x230 fs/ioctl.c:847 do_syscall_32_irqs_on+0x3f/0x60 arch/x86/entry/common.c:428 __do_fast_syscall_32 arch/x86/entry/common.c:475 [inline] do_fast_syscall_32+0x7f/0x120 arch/x86/entry/common.c:503 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Freed by task 8284: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 ep_eventpoll_release+0x41/0x60 fs/eventpoll.c:864 __fput+0x33c/0x880 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:135 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:239 [inline] __prepare_exit_to_usermode+0x1e9/0x1f0 arch/x86/entry/common.c:269 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888027bd9400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 304 bytes inside of 512-byte region [ffff888027bd9400, ffff888027bd9600) The buggy address belongs to the page: page:ffffea00009ef640 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000088eb48 ffffea0000b42f08 ffff88802c800a80 raw: 0000000000000000 ffff888027bd9000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888027bd9400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888027bd9480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888027bd9500: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888027bd9580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888027bd9600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================