================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:373 [inline] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x44b/0xa30 drivers/video/fbdev/core/softcursor.c:70 Read of size 3 at addr ffff88808c8a5d9b by task syz-executor.2/16982 CPU: 1 PID: 16982 Comm: syz-executor.2 Not tainted 4.19.130-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report+0x8f/0x96 mm/kasan/report.c:412 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:373 [inline] soft_cursor+0x44b/0xa30 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x1239/0x1820 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x555/0x760 drivers/video/fbdev/core/fbcon.c:1372 hide_cursor+0x85/0x2c0 drivers/tty/vt/vt.c:902 redraw_screen+0x2ed/0x870 drivers/tty/vt/vt.c:1006 vc_do_resize+0x1132/0x1440 drivers/tty/vt/vt.c:1317 vt_ioctl+0x1f74/0x24d0 drivers/tty/vt/vt_ioctl.c:901 tty_ioctl+0x5b0/0x15c0 drivers/tty/tty_io.c:2669 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45cb09 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f949d098c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004f3560 RCX: 000000000045cb09 RDX: 0000000020000000 RSI: 000000000000560a RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000067e R14: 00000000004c9836 R15: 00007f949d0996d4 Allocated by task 15411: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] fbcon_set_font+0x34f/0x8a0 drivers/video/fbdev/core/fbcon.c:2644 con_font_set drivers/tty/vt/vt.c:4529 [inline] con_font_op+0xd02/0x10e0 drivers/tty/vt/vt.c:4594 vt_ioctl+0x116d/0x24d0 drivers/tty/vt/vt_ioctl.c:928 tty_ioctl+0x5b0/0x15c0 drivers/tty/tty_io.c:2669 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 13128: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:554 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:574 skb_release_all net/core/skbuff.c:631 [inline] __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0x11a/0x3d0 net/core/skbuff.c:663 kfree_skb_list+0x3f/0x60 net/core/skbuff.c:672 __dev_xmit_skb net/core/dev.c:3506 [inline] __dev_queue_xmit+0x296f/0x2df0 net/core/dev.c:3810 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip_finish_output2+0xb6d/0x1540 net/ipv4/ip_output.c:229 ip_finish_output+0x84d/0xcd0 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_mc_output+0x268/0xec0 net/ipv4/ip_output.c:390 dst_output include/net/dst.h:447 [inline] ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:124 ip_send_skb+0x3e/0xe0 net/ipv4/ip_output.c:1446 udp_send_skb+0x6a4/0x1170 net/ipv4/udp.c:845 udp_sendmsg+0x1cb4/0x24f0 net/ipv4/udp.c:1132 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2115 __sys_sendmmsg+0x195/0x470 net/socket.c:2210 __do_sys_sendmmsg net/socket.c:2239 [inline] __se_sys_sendmmsg net/socket.c:2236 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808c8a5c80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 283 bytes inside of 512-byte region [ffff88808c8a5c80, ffff88808c8a5e80) The buggy address belongs to the page: page:ffffea0002322940 count:1 mapcount:0 mapping:ffff88812c39c940 index:0xffff88808c8a5780 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000295ac48 ffffea00023d3e88 ffff88812c39c940 raw: ffff88808c8a5780 ffff88808c8a5000 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c8a5c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808c8a5d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808c8a5d80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808c8a5e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808c8a5e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================