================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:426 [inline] BUG: KASAN: use-after-free in soft_cursor+0x439/0xa30 drivers/video/fbdev/core/softcursor.c:70 Read of size 32 at addr ffff88808c121c10 by task syz-executor.3/32561 CPU: 1 PID: 32561 Comm: syz-executor.3 Not tainted 5.6.0-rc2-next-20200224-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/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 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:127 memcpy include/linux/string.h:426 [inline] soft_cursor+0x439/0xa30 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x12fc/0x1a60 drivers/video/fbdev/core/bitblit.c:386 fbcon_cursor+0x487/0x660 drivers/video/fbdev/core/fbcon.c:1408 hide_cursor+0x8c/0x280 drivers/tty/vt/vt.c:896 redraw_screen+0x60b/0x7d0 drivers/tty/vt/vt.c:1000 fbcon_do_set_font+0x829/0x960 drivers/video/fbdev/core/fbcon.c:2611 fbcon_copy_font+0x12c/0x190 drivers/video/fbdev/core/fbcon.c:2626 con_font_copy drivers/tty/vt/vt.c:4606 [inline] con_font_op+0x6b2/0x1270 drivers/tty/vt/vt.c:4621 vt_ioctl+0x1801/0x26a0 drivers/tty/vt/vt_ioctl.c:985 tty_ioctl+0xa37/0x14f0 drivers/tty/tty_io.c:2660 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0x123/0x180 fs/ioctl.c:763 __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl fs/ioctl.c:770 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:770 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c449 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:00007f3edc3fdc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3edc3fe6d4 RCX: 000000000045c449 RDX: 0000000020000000 RSI: 0000000000004b72 RDI: 0000000000000003 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000036d R14: 00000000004c59d1 R15: 000000000076bf2c Allocated by task 30439: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:142 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1081 [inline] __ip6_append_data.isra.0+0x2dfa/0x3b70 net/ipv6/ip6_output.c:1518 ip6_append_data+0x1ec/0x330 net/ipv6/ip6_output.c:1687 rawv6_sendmsg+0x14b6/0x38d0 net/ipv6/raw.c:949 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x358/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2487 __do_sys_sendmmsg net/socket.c:2516 [inline] __se_sys_sendmmsg net/socket.c:2513 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2513 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 30455: 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:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 skb_free_head+0x93/0xb0 net/core/skbuff.c:590 skb_release_data+0x62d/0x8a0 net/core/skbuff.c:610 skb_release_all+0x4d/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] kfree_skb net/core/skbuff.c:696 [inline] kfree_skb+0x101/0x420 net/core/skbuff.c:690 __neigh_event_send+0xb23/0x17a0 net/core/neighbour.c:1158 neigh_event_send include/net/neighbour.h:444 [inline] neigh_resolve_output+0x5ee/0x990 net/core/neighbour.c:1471 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x109a/0x25c0 net/ipv6/ip6_output.c:116 __ip6_finish_output+0x444/0xaa0 net/ipv6/ip6_output.c:142 ip6_finish_output+0x38/0x1f0 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x25e/0x880 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] ip6_local_out+0xbb/0x1b0 net/ipv6/output_core.c:179 ip6_send_skb+0xbb/0x350 net/ipv6/ip6_output.c:1795 ip6_push_pending_frames+0xc8/0xf0 net/ipv6/ip6_output.c:1815 rawv6_push_pending_frames net/ipv6/raw.c:613 [inline] rawv6_sendmsg+0x2af8/0x38d0 net/ipv6/raw.c:956 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x358/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2487 __do_sys_sendmmsg net/socket.c:2516 [inline] __se_sys_sendmmsg net/socket.c:2513 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2513 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808c121c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 16 bytes inside of 512-byte region [ffff88808c121c00, ffff88808c121e00) The buggy address belongs to the page: page:ffffea0002304840 refcount:1 mapcount:0 mapping:00000000207bad0e index:0xffff88808c121c00 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00024de988 ffffea00028534c8 ffff8880aa400a80 raw: ffff88808c121c00 ffff88808c121000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c121b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808c121b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808c121c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808c121c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c121d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================