================================================================== 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 ffff88803ae4ff7e by task syz-executor.5/25351 CPU: 1 PID: 25351 Comm: syz-executor.5 Not tainted 4.19.113-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 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+0x1230/0x1900 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x572/0x760 drivers/video/fbdev/core/fbcon.c:1369 hide_cursor+0x99/0x2f0 drivers/tty/vt/vt.c:895 redraw_screen+0x2ed/0x870 drivers/tty/vt/vt.c:999 vc_do_resize+0x109e/0x13a0 drivers/tty/vt/vt.c:1298 vt_ioctl+0x1dff/0x2310 drivers/tty/vt/vt_ioctl.c:891 tty_ioctl+0x7a1/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:0x45c849 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fab22658c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fab226596d4 RCX: 000000000045c849 RDX: 0000000020000040 RSI: 000000000000560a RDI: 0000000000000004 RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000066a R14: 00000000004c93e6 R15: 000000000076bf0c Allocated by task 24362: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15b/0x770 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] fbcon_set_font+0x331/0x870 drivers/video/fbdev/core/fbcon.c:2641 con_font_set drivers/tty/vt/vt.c:4501 [inline] con_font_op+0xd3e/0x1130 drivers/tty/vt/vt.c:4566 do_fontx_ioctl drivers/tty/vt/vt_ioctl.c:244 [inline] vt_ioctl+0x341/0x2310 drivers/tty/vt/vt_ioctl.c:935 tty_ioctl+0x7a1/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 8107: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __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+0x600/0x8c0 net/core/skbuff.c:574 skb_release_all+0x46/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] consume_skb net/core/skbuff.c:705 [inline] consume_skb+0xda/0x380 net/core/skbuff.c:699 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:2800 dev_consume_skb_any include/linux/netdevice.h:3538 [inline] napi_consume_skb+0x3e1/0x550 net/core/skbuff.c:769 free_old_xmit_skbs+0xdc/0x240 drivers/net/virtio_net.c:1377 start_xmit+0x14a/0x1690 drivers/net/virtio_net.c:1573 __netdev_start_xmit include/linux/netdevice.h:4314 [inline] netdev_start_xmit include/linux/netdevice.h:4323 [inline] xmit_one net/core/dev.c:3258 [inline] dev_hard_start_xmit+0x1a4/0x950 net/core/dev.c:3274 sch_direct_xmit+0x345/0xfc0 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4df/0x1720 net/sched/sch_generic.c:403 qdisc_run include/net/pkt_sched.h:120 [inline] qdisc_run include/net/pkt_sched.h:117 [inline] __dev_xmit_skb net/core/dev.c:3453 [inline] __dev_queue_xmit+0x229a/0x3040 net/core/dev.c:3812 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip_finish_output2+0x104d/0x1740 net/ipv4/ip_output.c:229 ip_finish_output+0x721/0xcd0 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x1fb/0x5f0 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:447 [inline] ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:124 __ip_queue_xmit+0x85a/0x1bc0 net/ipv4/ip_output.c:505 __tcp_transmit_skb+0x19d5/0x3750 net/ipv4/tcp_output.c:1146 tcp_transmit_skb net/ipv4/tcp_output.c:1162 [inline] tcp_write_xmit+0x1409/0x5230 net/ipv4/tcp_output.c:2387 __tcp_push_pending_frames+0xaa/0x260 net/ipv4/tcp_output.c:2563 tcp_push+0x4c2/0x6c0 net/ipv4/tcp.c:735 tcp_sendmsg_locked+0x271b/0x2ff0 net/ipv4/tcp.c:1422 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1452 inet_sendmsg+0x12e/0x590 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:632 sock_write_iter+0x283/0x3c0 net/socket.c:901 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x512/0x760 fs/read_write.c:487 vfs_write+0x206/0x550 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 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 ffff88803ae4f680 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 254 bytes to the right of 2048-byte region [ffff88803ae4f680, ffff88803ae4fe80) The buggy address belongs to the page: page:ffffea0000eb9380 count:1 mapcount:0 mapping:ffff88812c3dcc40 index:0xffff88803ae4ee00 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea00011ffa08 ffffea0002743808 ffff88812c3dcc40 raw: ffff88803ae4ee00 ffff88803ae4e580 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803ae4fe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803ae4fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803ae4ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803ae4ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803ae50000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================