================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:348 [inline] BUG: KASAN: slab-out-of-bounds in soft_cursor+0x448/0xa20 drivers/video/fbdev/core/softcursor.c:70 Read of size 9 at addr ffff88805531d8b0 by task syz-executor.3/3969 CPU: 1 PID: 3969 Comm: syz-executor.3 Not tainted 4.19.128-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/0x222 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:348 [inline] soft_cursor+0x448/0xa20 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x1272/0x1890 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x54f/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+0x108e/0x1380 drivers/tty/vt/vt.c:1317 vt_ioctl+0x1fa2/0x2500 drivers/tty/vt/vt_ioctl.c:901 tty_ioctl+0x7a5/0x1420 drivers/tty/tty_io.c:2669 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcda/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:0x45ca59 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:00007f1e8553ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004f3120 RCX: 000000000045ca59 RDX: 0000000020000000 RSI: 000000000000560a RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000067a R14: 00000000004c973d R15: 00007f1e8553b6d4 Allocated by task 2356: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] fbcon_set_font+0x331/0x870 drivers/video/fbdev/core/fbcon.c:2644 con_font_set drivers/tty/vt/vt.c:4529 [inline] con_font_op+0xd3e/0x1130 drivers/tty/vt/vt.c:4594 vt_ioctl+0xcd0/0x2500 drivers/tty/vt/vt_ioctl.c:928 tty_ioctl+0x7a5/0x1420 drivers/tty/tty_io.c:2669 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcda/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 1378: __cache_free mm/slab.c:3503 [inline] kfree+0xce/0x220 mm/slab.c:3822 skb_free_head+0x91/0xb0 net/core/skbuff.c:554 skb_release_data+0x623/0x8e0 net/core/skbuff.c:574 skb_release_all+0x46/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0xe1/0x390 net/core/skbuff.c:663 kfree_skb_list+0x3f/0x60 net/core/skbuff.c:672 __dev_xmit_skb net/core/dev.c:3510 [inline] __dev_queue_xmit+0x2ac9/0x3010 net/core/dev.c:3814 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip6_finish_output2+0xf34/0x2570 net/ipv6/ip6_output.c:120 ip6_finish_output+0x7e8/0xc00 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x760 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:447 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1699 ip6_push_pending_frames+0xbd/0xe0 net/ipv6/ip6_output.c:1719 icmpv6_push_pending_frames+0x336/0x530 net/ipv6/icmp.c:288 icmp6_send+0x1bbc/0x2260 net/ipv6/icmp.c:584 icmpv6_send+0xde/0x210 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x26/0x4e0 net/ipv6/route.c:2297 dst_link_failure include/net/dst.h:430 [inline] ip6_tnl_xmit+0x46d/0x3650 net/ipv6/ip6_tunnel.c:1227 ip6ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1381 [inline] ip6_tnl_start_xmit+0x919/0x1d90 net/ipv6/ip6_tunnel.c:1407 __netdev_start_xmit include/linux/netdevice.h:4314 [inline] netdev_start_xmit include/linux/netdevice.h:4323 [inline] xmit_one net/core/dev.c:3260 [inline] dev_hard_start_xmit+0x1a4/0x940 net/core/dev.c:3276 __dev_queue_xmit+0x26a0/0x3010 net/core/dev.c:3846 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x130c/0x2570 net/ipv6/ip6_output.c:120 ip6_finish_output+0x7e8/0xc00 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x760 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:447 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1699 udp_v6_send_skb.isra.0+0x7e9/0x1620 net/ipv6/udp.c:1111 udpv6_sendmsg+0x22ae/0x2a00 net/ipv6/udp.c:1408 inet_sendmsg+0x12e/0x590 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:632 ___sys_sendmsg+0x3e2/0x920 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 ffff88805531d780 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 304 bytes inside of 512-byte region [ffff88805531d780, ffff88805531d980) The buggy address belongs to the page: page:ffffea000154c740 count:1 mapcount:0 mapping:ffff88812c3dc940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000174d508 ffffea00024efc48 ffff88812c3dc940 raw: 0000000000000000 ffff88805531d000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805531d780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805531d800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805531d880: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805531d900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805531d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================