================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:348 [inline] BUG: KASAN: use-after-free in soft_cursor+0x439/0xa30 drivers/video/fbdev/core/softcursor.c:70 Read of size 31 at addr ffff88807b929670 by task kworker/0:0/25628 CPU: 0 PID: 25628 Comm: kworker/0:0 Not tainted 4.19.91-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_power_efficient fb_flashcursor Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x123/0x190 mm/kasan/kasan.c:267 memcpy+0x24/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:348 [inline] soft_cursor+0x439/0xa30 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x12fc/0x1a60 drivers/video/fbdev/core/bitblit.c:386 fb_flashcursor+0x3a6/0x450 drivers/video/fbdev/core/fbcon.c:399 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 7035: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x51/0x80 mm/slab.c:3703 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:137 __alloc_skb+0x10b/0x5f0 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] alloc_skb_with_frags+0x93/0x590 net/core/skbuff.c:5303 sock_alloc_send_pskb+0x72d/0x8a0 net/core/sock.c:2085 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2102 __ip6_append_data.isra.0+0x1c8e/0x2fb0 net/ipv6/ip6_output.c:1421 ip6_make_skb+0x32f/0x561 net/ipv6/ip6_output.c:1777 udpv6_sendmsg+0x225b/0x2a00 net/ipv6/udp.c:1402 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:632 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2115 __sys_sendmmsg+0x1bf/0x4e0 net/socket.c:2210 __do_sys_sendmmsg net/socket.c:2239 [inline] __se_sys_sendmmsg net/socket.c:2236 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2236 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7030: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 skb_free_head+0x99/0xc0 net/core/skbuff.c:554 skb_release_data+0x619/0x8d0 net/core/skbuff.c:574 __consume_stateless_skb+0x6e/0x2e0 net/core/skbuff.c:719 skb_consume_udp net/ipv4/udp.c:1500 [inline] skb_consume_udp+0x134/0x2a0 net/ipv4/udp.c:1483 udpv6_recvmsg+0xb2d/0x1ab0 net/ipv6/udp.c:445 inet_recvmsg+0x136/0x5f0 net/ipv4/af_inet.c:830 sock_recvmsg_nosec+0x89/0xb0 net/socket.c:795 ___sys_recvmsg+0x271/0x580 net/socket.c:2277 __sys_recvmmsg+0x27e/0x790 net/socket.c:2389 do_sys_recvmmsg net/socket.c:2465 [inline] do_sys_recvmmsg+0x181/0x1a0 net/socket.c:2454 __do_sys_recvmmsg net/socket.c:2483 [inline] __se_sys_recvmmsg net/socket.c:2479 [inline] __x64_sys_recvmmsg+0xbe/0x150 net/socket.c:2479 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88807b929500 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 368 bytes inside of 512-byte region [ffff88807b929500, ffff88807b929700) The buggy address belongs to the page: page:ffffea0001ee4a40 count:1 mapcount:0 mapping:ffff88812c31c940 index:0xffff88807b929a00 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea0001257588 ffffea0002a47a08 ffff88812c31c940 raw: ffff88807b929a00 ffff88807b929000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88807b929500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b929580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807b929600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807b929680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807b929700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================