================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:425 [inline] BUG: KASAN: slab-out-of-bounds in fbcon_get_font+0x2b2/0x5e0 drivers/video/fbdev/core/fbcon.c:2465 Read of size 2 at addr ffff8880a44f8d10 by task syz-executor248/9399 CPU: 0 PID: 9399 Comm: syz-executor248 Not tainted 5.5.0-rc2-next-20191220-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 memcpy+0x24/0x50 mm/kasan/common.c:125 memcpy include/linux/string.h:425 [inline] fbcon_get_font+0x2b2/0x5e0 drivers/video/fbdev/core/fbcon.c:2465 con_font_get drivers/tty/vt/vt.c:4446 [inline] con_font_op+0x20b/0x1270 drivers/tty/vt/vt.c:4605 do_fontx_ioctl drivers/tty/vt/vt_ioctl.c:252 [inline] vt_ioctl+0x1d29/0x26d0 drivers/tty/vt/vt_ioctl.c:930 tty_ioctl+0xa37/0x14f0 drivers/tty/tty_io.c:2660 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0x123/0x180 fs/ioctl.c:747 __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x440299 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc79647818 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440299 RDX: 0000000020000040 RSI: 0000000000004b6b RDI: 0000000000000005 RBP: 00000000006ca018 R08: 000000000000000d R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b80 R13: 0000000000401c10 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 9399: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] fbcon_set_font+0x32d/0x860 drivers/video/fbdev/core/fbcon.c:2663 con_font_set drivers/tty/vt/vt.c:4538 [inline] con_font_op+0xe30/0x1270 drivers/tty/vt/vt.c:4603 vt_ioctl+0xd2e/0x26d0 drivers/tty/vt/vt_ioctl.c:913 tty_ioctl+0xa37/0x14f0 drivers/tty/tty_io.c:2660 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0x123/0x180 fs/ioctl.c:747 __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9137: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 skb_free_head+0x93/0xb0 net/core/skbuff.c:591 skb_release_data+0x613/0x8c0 net/core/skbuff.c:611 skb_release_all+0x4d/0x60 net/core/skbuff.c:665 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb net/core/skbuff.c:838 [inline] consume_skb+0xfb/0x410 net/core/skbuff.c:832 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x594/0x7d0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:663 ____sys_sendmsg+0x753/0x880 net/socket.c:2342 ___sys_sendmsg+0x100/0x170 net/socket.c:2396 __sys_sendmsg+0x105/0x1d0 net/socket.c:2429 __do_sys_sendmsg net/socket.c:2438 [inline] __se_sys_sendmsg net/socket.c:2436 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2436 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a44f8c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 272 bytes inside of 512-byte region [ffff8880a44f8c00, ffff8880a44f8e00) The buggy address belongs to the page: page:ffffea0002913e00 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0xffff8880a44f8800 raw: 00fffe0000000200 ffffea0002827c08 ffffea00029f0588 ffff8880aa400a80 raw: ffff8880a44f8800 ffff8880a44f8000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a44f8c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a44f8c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a44f8d00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a44f8d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a44f8e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================