(kworker/u4:4,76,0):ocfs2_read_blocks_sync:112 ERROR: status = -12 (kworker/u4:4,76,0):ocfs2_read_locked_inode:521 ERROR: status = -12 ================================================================== BUG: KASAN: use-after-free in ocfs2_check_dir_entry fs/ocfs2/dir.c:305 [inline] BUG: KASAN: use-after-free in ocfs2_dir_foreach_blk_id fs/ocfs2/dir.c:1784 [inline] BUG: KASAN: use-after-free in ocfs2_dir_foreach_blk+0x1704/0x1b20 fs/ocfs2/dir.c:1912 Read of size 2 at addr ffff8880008e4780 by task kworker/u4:4/76 CPU: 0 UID: 0 PID: 76 Comm: kworker/u4:4 Not tainted 6.12.0-rc7-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: ocfs2_wq ocfs2_complete_recovery Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ocfs2_check_dir_entry fs/ocfs2/dir.c:305 [inline] ocfs2_dir_foreach_blk_id fs/ocfs2/dir.c:1784 [inline] ocfs2_dir_foreach_blk+0x1704/0x1b20 fs/ocfs2/dir.c:1912 ocfs2_dir_foreach+0xb4/0x100 fs/ocfs2/dir.c:1923 ocfs2_queue_orphans fs/ocfs2/journal.c:2186 [inline] ocfs2_recover_orphans fs/ocfs2/journal.c:2270 [inline] ocfs2_complete_recovery+0xcf1/0x25c0 fs/ocfs2/journal.c:1351 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8e4 flags: 0x7ff00000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 007ff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 7171686807, free_ts 8413057761 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1541 prep_new_page mm/page_alloc.c:1549 [inline] get_page_from_freelist+0x3649/0x3790 mm/page_alloc.c:3459 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4735 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x140 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] __kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4290 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] kobject_uevent_env+0x28b/0x8e0 lib/kobject_uevent.c:540 tty_register_device_attr+0x583/0x960 drivers/tty/tty_io.c:3296 tty_register_device drivers/tty/tty_io.c:3210 [inline] tty_register_driver+0x5f6/0xc30 drivers/tty/tty_io.c:3473 legacy_pty_init+0x3ac/0x610 drivers/tty/pty.c:579 pty_init+0xe/0x20 drivers/tty/pty.c:943 do_one_initcall+0x248/0x880 init/main.c:1269 do_initcall_level+0x157/0x210 init/main.c:1331 page last free pid 9 tgid 9 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1112 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2642 discard_slab mm/slub.c:2677 [inline] __put_partials+0xeb/0x130 mm/slub.c:3145 put_cpu_partial+0x17c/0x250 mm/slub.c:3220 __slab_free+0x2ea/0x3d0 mm/slub.c:4449 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] __kmalloc_cache_noprof+0x132/0x2c0 mm/slub.c:4290 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] drm_atomic_state_alloc+0xa6/0x100 drivers/gpu/drm/drm_atomic.c:173 drm_atomic_helper_dirtyfb+0xf3/0xe70 drivers/gpu/drm/drm_damage_helper.c:126 drm_fbdev_shmem_helper_fb_dirty+0x151/0x2c0 drivers/gpu/drm/drm_fbdev_shmem.c:197 drm_fb_helper_fb_dirty drivers/gpu/drm/drm_fb_helper.c:376 [inline] drm_fb_helper_damage_work+0x275/0x880 drivers/gpu/drm/drm_fb_helper.c:399 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 Memory state around the buggy address: ffff8880008e4680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880008e4700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880008e4780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880008e4800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880008e4880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================