================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:373 [inline] BUG: KASAN: slab-out-of-bounds in fbcon_get_font+0x2f4/0x6f0 drivers/video/fbdev/core/fbcon.c:2446 Read of size 8 at addr ffff888083cd5b10 by task syz-executor.1/25642 CPU: 0 PID: 25642 Comm: syz-executor.1 Not tainted 4.19.138-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] fbcon_get_font+0x2f4/0x6f0 drivers/video/fbdev/core/fbcon.c:2446 con_font_get drivers/tty/vt/vt.c:4444 [inline] con_font_op+0x1f7/0x10e0 drivers/tty/vt/vt.c:4603 vt_ioctl+0x167e/0x24d0 drivers/tty/vt/vt_ioctl.c:980 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:0x45ce79 Code: 2d 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 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe55d685c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000000f600 RCX: 000000000045ce79 RDX: 0000000020000000 RSI: 0000000000004b72 RDI: 0000000000000005 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007fff3ee5608f R14: 00007fe55d6869c0 R15: 000000000118bf2c Allocated by task 1112: __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:4536 [inline] con_font_op+0xd02/0x10e0 drivers/tty/vt/vt.c:4601 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 6466: __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] consume_skb+0x113/0x3d0 net/core/skbuff.c:705 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:2796 dev_consume_skb_any include/linux/netdevice.h:3557 [inline] napi_consume_skb+0x45d/0x5e0 net/core/skbuff.c:769 free_old_xmit_skbs+0xdb/0x240 drivers/net/virtio_net.c:1379 start_xmit+0x15a/0x16e0 drivers/net/virtio_net.c:1575 __netdev_start_xmit include/linux/netdevice.h:4333 [inline] netdev_start_xmit include/linux/netdevice.h:4347 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 sch_direct_xmit+0x2d6/0xf50 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d0/0x1630 net/sched/sch_generic.c:403 qdisc_run include/net/pkt_sched.h:120 [inline] __dev_xmit_skb net/core/dev.c:3451 [inline] __dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807 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_output+0x203/0x5f0 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:455 [inline] ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:124 __ip_queue_xmit+0x866/0x1b50 net/ipv4/ip_output.c:505 __tcp_transmit_skb+0x1bb2/0x33f0 net/ipv4/tcp_output.c:1148 tcp_transmit_skb net/ipv4/tcp_output.c:1164 [inline] tcp_write_xmit+0x968/0x4fb0 net/ipv4/tcp_output.c:2389 __tcp_push_pending_frames+0xae/0x280 net/ipv4/tcp_output.c:2568 tcp_push+0x4b7/0x6b0 net/ipv4/tcp.c:743 tcp_sendmsg_locked+0x26a9/0x2f60 net/ipv4/tcp.c:1430 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1460 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 sock_write_iter+0x287/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+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 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 ffff888083cd5600 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1296 bytes inside of 2048-byte region [ffff888083cd5600, ffff888083cd5e00) The buggy address belongs to the page: page:ffffea00020f3500 count:1 mapcount:0 mapping:ffff88812c39cc40 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002433708 ffffea0001621788 ffff88812c39cc40 raw: 0000000000000000 ffff888083cd4500 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888083cd5a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888083cd5a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888083cd5b00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888083cd5b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888083cd5c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================