================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:372 [inline] BUG: KASAN: slab-out-of-bounds in fbcon_get_font+0x2b8/0x660 drivers/video/fbdev/core/fbcon.c:2445 Read of size 16 at addr ffff888087cd9ad0 by task syz-executor.1/30072 CPU: 0 PID: 30072 Comm: syz-executor.1 Not tainted 4.14.198-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report+0x6f/0x7b mm/kasan/report.c:409 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:372 [inline] fbcon_get_font+0x2b8/0x660 drivers/video/fbdev/core/fbcon.c:2445 con_font_get drivers/tty/vt/vt.c:4106 [inline] con_font_op+0x1c6/0xf60 drivers/tty/vt/vt.c:4257 vt_ioctl+0xd91/0x1f50 drivers/tty/vt/vt_ioctl.c:938 tty_ioctl+0x50f/0x13c0 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e179 RSP: 002b:00007fb3b9372c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000000f200 RCX: 000000000045e179 RDX: 00000000200013c0 RSI: 0000000000004b60 RDI: 0000000000000005 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007fffa8b38cdf R14: 00007fb3b93739c0 R15: 000000000118cf4c Allocated by task 13703: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] fbcon_set_font+0x2fb/0x7c0 drivers/video/fbdev/core/fbcon.c:2642 con_font_set drivers/tty/vt/vt.c:4190 [inline] con_font_op+0xb69/0xf60 drivers/tty/vt/vt.c:4255 vt_ioctl+0xd91/0x1f50 drivers/tty/vt/vt_ioctl.c:938 tty_ioctl+0x50f/0x13c0 drivers/tty/tty_io.c:2661 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 6355: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:554 [inline] skb_release_data+0x5f6/0x820 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:1425 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3186 [inline] tcp_ack+0x1872/0x43c0 net/ipv4/tcp_input.c:3686 tcp_rcv_established+0x4fe/0x17a0 net/ipv4/tcp_input.c:5568 tcp_v4_do_rcv+0x541/0x7d0 net/ipv4/tcp_ipv4.c:1476 tcp_v4_rcv+0x275c/0x3560 net/ipv4/tcp_ipv4.c:1750 ip_local_deliver_finish+0x3f2/0xab0 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:250 [inline] ip_local_deliver+0x167/0x460 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:476 [inline] ip_rcv_finish+0x6e3/0x19f0 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:250 [inline] ip_rcv+0x8a7/0xf01 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x15ee/0x2a30 net/core/dev.c:4474 __netif_receive_skb+0x27/0x1a0 net/core/dev.c:4512 netif_receive_skb_internal+0xd7/0x580 net/core/dev.c:4585 napi_skb_finish net/core/dev.c:4946 [inline] napi_gro_receive+0x2e2/0x400 net/core/dev.c:4977 receive_buf+0x101e/0x4660 drivers/net/virtio_net.c:852 virtnet_receive drivers/net/virtio_net.c:1098 [inline] virtnet_poll+0x4b7/0x960 drivers/net/virtio_net.c:1189 napi_poll net/core/dev.c:5596 [inline] net_rx_action+0x466/0xfd0 net/core/dev.c:5662 __do_softirq+0x254/0xa1d kernel/softirq.c:288 The buggy address belongs to the object at ffff888087cd96c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1040 bytes inside of 2048-byte region [ffff888087cd96c0, ffff888087cd9ec0) The buggy address belongs to the page: page:ffffea00021f3600 count:1 mapcount:0 mapping:ffff888087cd85c0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff888087cd85c0 0000000000000000 0000000100000003 raw: ffffea0001371da0 ffffea00014d97a0 ffff88812fe50c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888087cd9980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888087cd9a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888087cd9a80: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff888087cd9b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888087cd9b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================