================================================================== BUG: KASAN: use-after-free in soft_cursor+0x95a/0xa20 drivers/video/fbdev/core/softcursor.c:61 Read of size 1 at addr ffff88804d52b470 by task kworker/0:3/7448 CPU: 0 PID: 7448 Comm: kworker/0:3 Not tainted 4.19.118-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 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+0x88/0x2b9 mm/kasan/report.c:396 soft_cursor+0x95a/0xa20 drivers/video/fbdev/core/softcursor.c:61 bit_cursor+0x1230/0x1900 drivers/video/fbdev/core/bitblit.c:386 fb_flashcursor+0x396/0x440 drivers/video/fbdev/core/fbcon.c:399 process_one_work+0x91f/0x1640 kernel/workqueue.c:2155 worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x34a/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 25555: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kzalloc_node include/linux/slab.h:720 [inline] qdisc_alloc+0xb6/0xa40 net/sched/sch_generic.c:836 qdisc_create_dflt+0x70/0x1d0 net/sched/sch_generic.c:910 mq_init+0x363/0x4b0 net/sched/sch_mq.c:95 qdisc_create_dflt+0xff/0x1d0 net/sched/sch_generic.c:917 attach_default_qdiscs net/sched/sch_generic.c:1056 [inline] dev_activate+0x8c1/0xb30 net/sched/sch_generic.c:1095 __dev_open+0x265/0x390 net/core/dev.c:1415 __dev_change_flags+0x4dd/0x620 net/core/dev.c:7666 dev_change_flags+0x7e/0x140 net/core/dev.c:7735 dev_ifsioc+0x286/0x8d0 net/core/dev_ioctl.c:237 dev_ioctl+0x1ab/0xc58 net/core/dev_ioctl.c:488 sock_do_ioctl+0x1b7/0x2f0 net/socket.c:973 sock_ioctl+0x325/0x610 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcda/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 25543: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __cache_free mm/slab.c:3503 [inline] kfree+0xce/0x220 mm/slab.c:3822 qdisc_destroy+0x4aa/0x6b0 net/sched/sch_generic.c:997 shutdown_scheduler_queue net/sched/sch_generic.c:1291 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2107 [inline] dev_shutdown+0x11e/0x47a net/sched/sch_generic.c:1297 rollback_registered_many+0x64a/0xc40 net/core/dev.c:8176 rollback_registered+0xf2/0x1c0 net/core/dev.c:8225 unregister_netdevice_queue net/core/dev.c:9278 [inline] unregister_netdevice_queue+0x1d7/0x2b0 net/core/dev.c:9271 unregister_netdevice include/linux/netdevice.h:2614 [inline] __tun_detach+0xd86/0x1020 drivers/net/tun.c:737 tun_detach drivers/net/tun.c:754 [inline] tun_chr_close+0xd9/0x180 drivers/net/tun.c:3261 __fput+0x2cd/0x890 fs/file_table.c:278 task_work_run+0x13f/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x25a/0x2b0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88804d52ae80 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1520 bytes inside of 2048-byte region [ffff88804d52ae80, ffff88804d52b680) The buggy address belongs to the page: page:ffffea0001354a80 count:1 mapcount:0 mapping:ffff88812c39cc40 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea00021a2888 ffffea000073e688 ffff88812c39cc40 raw: 0000000000000000 ffff88804d52a600 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804d52b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804d52b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804d52b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804d52b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804d52b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================