================================================================== BUG: KASAN: use-after-free in soft_cursor+0x62c/0xdb0 drivers/video/fbdev/core/softcursor.c:61 Read of size 1 at addr ffff88809e2d3810 by task kworker/1:137/3218 CPU: 1 PID: 3218 Comm: kworker/1:137 Not tainted 5.6.0-rc5-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+0x1e9/0x30e lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:374 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506 kasan_report+0x25/0x50 mm/kasan/common.c:641 soft_cursor+0x62c/0xdb0 drivers/video/fbdev/core/softcursor.c:61 bit_cursor+0x178a/0x2180 drivers/video/fbdev/core/bitblit.c:386 fb_flashcursor+0x73e/0xa10 drivers/video/fbdev/core/fbcon.c:417 process_one_work+0x76e/0xfd0 kernel/workqueue.c:2266 worker_thread+0xa7f/0x1450 kernel/workqueue.c:2412 kthread+0x317/0x340 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 10920: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:515 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xde/0x4f0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1081 [inline] alloc_skb_with_frags+0xb6/0x590 net/core/skbuff.c:5764 sock_alloc_send_pskb+0x7a0/0x890 net/core/sock.c:2245 __ip_append_data+0x20a2/0x33b0 net/ipv4/ip_output.c:1089 ip_make_skb+0x1a5/0x440 net/ipv4/ip_output.c:1626 udp_sendmsg+0x218f/0x2fb0 net/ipv4/udp.c:1173 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f9/0x7c0 net/socket.c:2343 ___sys_sendmsg net/socket.c:2397 [inline] __sys_sendmmsg+0x2a9/0x5b0 net/socket.c:2487 __do_sys_sendmmsg net/socket.c:2516 [inline] __se_sys_sendmmsg net/socket.c:2513 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2513 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 11201: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:476 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x220 mm/slab.c:3757 skb_release_all net/core/skbuff.c:664 [inline] __kfree_skb+0x56/0x1c0 net/core/skbuff.c:678 tun_do_read+0xc9f/0x1450 drivers/net/tun.c:2236 tun_chr_read_iter+0xc6/0x190 drivers/net/tun.c:2251 call_read_iter include/linux/fs.h:1895 [inline] new_sync_read fs/read_write.c:414 [inline] __vfs_read+0x546/0x6f0 fs/read_write.c:427 vfs_read+0x1c0/0x3f0 fs/read_write.c:461 ksys_read+0x115/0x220 fs/read_write.c:587 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809e2d3800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 16 bytes inside of 512-byte region [ffff88809e2d3800, ffff88809e2d3a00) The buggy address belongs to the page: page:ffffea000278b4c0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0xffff88809e2d3c00 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002841f08 ffffea00014a8248 ffff8880aa400a80 raw: ffff88809e2d3c00 ffff88809e2d3000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e2d3700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809e2d3780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809e2d3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809e2d3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809e2d3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================