================================================================== BUG: KASAN: slab-out-of-bounds in soft_cursor+0x458/0xa10 drivers/video/fbdev/core/softcursor.c:70 Read of size 16 at addr ffff888032c54960 by task syz.0.731/8935 CPU: 2 UID: 0 PID: 8935 Comm: syz.0.731 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:186 [inline] kasan_check_range+0x10f/0x1e0 mm/kasan/generic.c:200 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 soft_cursor+0x458/0xa10 drivers/video/fbdev/core/softcursor.c:70 ccw_cursor+0xd2c/0x1550 drivers/video/fbdev/core/fbcon_ccw.c:340 fbcon_cursor+0x472/0x660 drivers/video/fbdev/core/fbcon.c:1439 hide_cursor+0x87/0x230 drivers/tty/vt/vt.c:997 con_font_default drivers/tty/vt/vt.c:5135 [inline] con_font_op+0x4ce/0x1020 drivers/tty/vt/vt.c:5158 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline] vt_ioctl+0xe00/0x3170 drivers/tty/vt/vt_ioctl.c:747 tty_ioctl+0x26a/0x1870 drivers/tty/tty_io.c:2782 vfs_ioctl fs/ioctl.c:52 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff494da9559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff495c36028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff495026090 RCX: 00007ff494da9559 RDX: 0000200000000280 RSI: 0000000000004b72 RDI: 000000000000000a RBP: 00007ff494e38136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff495026128 R14: 00007ff495026090 R15: 00007ffe4e595558 Allocated by task 1: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x40 mm/kasan/common.c:79 poison_kmalloc_redzone mm/kasan/common.c:412 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:429 kasan_kmalloc include/linux/kasan.h:267 [inline] __kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5680 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] device_private_init drivers/base/core.c:3608 [inline] device_add+0xd3f/0x1970 drivers/base/core.c:3659 __video_register_device+0x1da5/0x5960 drivers/media/v4l2-core/v4l2-dev.c:1076 video_register_device include/media/v4l2-dev.h:390 [inline] vivid_create_devnodes drivers/media/test-drivers/vivid/vivid-core.c:1472 [inline] vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:2043 [inline] vivid_probe.cold+0x8cea/0x921e drivers/media/test-drivers/vivid/vivid-core.c:2096 platform_probe+0x106/0x1d0 drivers/base/platform.c:1508 call_driver_probe drivers/base/dd.c:629 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:707 __driver_probe_device+0x210/0x460 drivers/base/dd.c:869 driver_probe_device+0x4a/0x140 drivers/base/dd.c:899 __driver_attach+0x231/0x5b0 drivers/base/dd.c:1300 bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383 bus_add_driver+0x4bf/0x620 drivers/base/bus.c:782 driver_register+0x1e2/0x360 drivers/base/driver.c:174 vivid_init+0x527/0x6a0 drivers/media/test-drivers/vivid/vivid-core.c:2297 do_one_initcall+0x11c/0x6f0 init/main.c:1419 do_initcall_level init/main.c:1481 [inline] do_initcalls init/main.c:1497 [inline] do_basic_setup init/main.c:1517 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1732 kernel_init+0x21/0x1e0 init/main.c:1622 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888032c54800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 80 bytes to the right of allocated 272-byte region [ffff888032c54800, ffff888032c54910) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32c54 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801d442c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801d442c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 39, tgid 39 (kdevtmpfs), ts 8061574709 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1873 prep_new_page mm/page_alloc.c:1881 [inline] get_page_from_freelist+0xdae/0x2c80 mm/page_alloc.c:3963 __alloc_frozen_pages_noprof+0x2ad/0x31e0 mm/page_alloc.c:5505 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab mm/slub.c:3499 [inline] new_slab+0xb1/0x6d0 mm/slub.c:3550 refill_objects+0xe3/0x410 mm/slub.c:7546 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] __do_kmalloc_node mm/slub.c:5530 [inline] __kmalloc_noprof+0x677/0x840 mm/slub.c:5556 _kmalloc_noprof include/linux/slab.h:995 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] security_inode_init_security+0x113/0x370 security/security.c:1361 shmem_mknod+0x2ce/0x480 mm/shmem.c:4095 vfs_mknod+0x3ae/0x840 fs/namei.c:5287 handle_create drivers/base/devtmpfs.c:283 [inline] handle drivers/base/devtmpfs.c:435 [inline] devtmpfs_work_loop+0x4a3/0xaed drivers/base/devtmpfs.c:450 devtmpfsd+0x3f/0x50 drivers/base/devtmpfs.c:492 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page_owner free stack trace missing Memory state around the buggy address: ffff888032c54800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888032c54880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888032c54900: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888032c54980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888032c54a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================