================================================================== 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:2274 Read of size 9 at addr ffff888049db53cf by task syz-executor.1/22723 CPU: 0 PID: 22723 Comm: syz-executor.1 Not tainted 4.19.149-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+0x22c/0x33e lib/dump_stack.c:118 print_address_description.cold+0x56/0x25c mm/kasan/report.c:256 kasan_report_error.cold+0x66/0xb9 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:2274 con_font_get drivers/tty/vt/vt.c:4445 [inline] con_font_op+0x1f7/0x1140 drivers/tty/vt/vt.c:4604 vt_ioctl+0x128c/0x2af0 drivers/tty/vt/vt_ioctl.c:938 tty_ioctl+0x5b0/0x1420 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/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45de29 Code: 0d b4 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 b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f5e3acf1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000000f200 RCX: 000000000045de29 RDX: 0000000020000000 RSI: 0000000000004b60 RDI: 0000000000000003 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffcbd9aa97f R14: 00007f5e3acf29c0 R15: 000000000118bf2c Allocated by task 20279: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x4f0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] fbcon_set_font+0x421/0xc60 drivers/video/fbdev/core/fbcon.c:2467 con_font_set drivers/tty/vt/vt.c:4537 [inline] con_font_op+0xd2b/0x1140 drivers/tty/vt/vt.c:4602 vt_ioctl+0x128c/0x2af0 drivers/tty/vt/vt_ioctl.c:938 tty_ioctl+0x5b0/0x1420 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/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6482: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x250 mm/slab.c:3822 skb_free_head net/core/skbuff.c:554 [inline] skb_release_data+0x6ea/0x930 net/core/skbuff.c:574 skb_release_all net/core/skbuff.c:631 [inline] __kfree_skb+0x46/0x60 net/core/skbuff.c:645 sk_wmem_free_skb include/net/sock.h:1466 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1764 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3154 [inline] tcp_ack+0x1c12/0x5080 net/ipv4/tcp_input.c:3689 tcp_rcv_established+0x12c2/0x1d10 net/ipv4/tcp_input.c:5586 tcp_v4_do_rcv+0x5d6/0x870 net/ipv4/tcp_ipv4.c:1544 tcp_v4_rcv+0x2c1d/0x3bd0 net/ipv4/tcp_ipv4.c:1829 ip_local_deliver_finish+0x4cb/0xc80 net/ipv4/ip_input.c:215 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x188/0x560 net/ipv4/ip_input.c:256 dst_input include/net/dst.h:461 [inline] ip_rcv_finish+0x1ca/0x2e0 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xca/0x420 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:4954 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5066 netif_receive_skb_internal+0x110/0x450 net/core/dev.c:5156 napi_skb_finish net/core/dev.c:5600 [inline] napi_gro_receive+0x303/0x460 net/core/dev.c:5631 receive_buf+0x1045/0x6250 drivers/net/virtio_net.c:1072 virtnet_receive drivers/net/virtio_net.c:1336 [inline] virtnet_poll+0x52f/0xda0 drivers/net/virtio_net.c:1441 napi_poll net/core/dev.c:6272 [inline] net_rx_action+0x4e5/0x10d0 net/core/dev.c:6338 __do_softirq+0x27d/0xad2 kernel/softirq.c:292 The buggy address belongs to the object at ffff888049db4cc0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1807 bytes inside of 2048-byte region [ffff888049db4cc0, ffff888049db54c0) The buggy address belongs to the page: page:ffffea0001276d00 count:1 mapcount:0 mapping:ffff88812c3f6c40 index:0xffff888049db4440 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0001362288 ffffea00024b6788 ffff88812c3f6c40 raw: ffff888049db4440 ffff888049db4440 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888049db5280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888049db5300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888049db5380: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff888049db5400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888049db5480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================