warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0xda/0x2b00 kernel/locking/lockdep.c:4897 Read of size 8 at addr ffff88801b9e4678 by task syz-executor.2/14074 CPU: 1 PID: 14074 Comm: syz-executor.2 Not tainted 5.17.0-rc7-syzkaller-00205-g79b00034e9dc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x3a0 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 __lock_acquire+0xda/0x2b00 kernel/locking/lockdep.c:4897 lock_acquire+0x19f/0x4d0 kernel/locking/lockdep.c:5639 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] jbd2_journal_wait_updates+0x2cb/0x400 fs/jbd2/transaction.c:861 jbd2_journal_lock_updates+0x33b/0x420 fs/jbd2/transaction.c:896 ext4_ioctl_checkpoint fs/ext4/ioctl.c:1085 [inline] __ext4_ioctl fs/ext4/ioctl.c:1562 [inline] ext4_ioctl+0x34c7/0x65d0 fs/ext4/ioctl.c:1578 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fc4c6705049 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc4c507a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc4c6817f60 RCX: 00007fc4c6705049 RDX: 0000000020000000 RSI: 000000004004662b RDI: 0000000000000005 RBP: 00007fc4c675f08d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffc0a2862f R14: 00007fc4c507a300 R15: 0000000000022000 Allocated by task 3628: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:260 [inline] slab_post_alloc_hook mm/slab.h:732 [inline] slab_alloc_node mm/slub.c:3230 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x1c9/0x310 mm/slub.c:3243 kmem_cache_zalloc include/linux/slab.h:704 [inline] start_this_handle+0x328/0x1630 fs/jbd2/transaction.c:375 jbd2__journal_start+0x2ca/0x5b0 fs/jbd2/transaction.c:525 __ext4_journal_start_sb+0x111/0x1e0 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x8a/0x100 fs/ext4/inode.c:5899 __mark_inode_dirty+0xb6/0x8f0 fs/fs-writeback.c:2409 generic_update_time fs/inode.c:1856 [inline] inode_update_time fs/inode.c:1869 [inline] touch_atime+0x3ef/0x650 fs/inode.c:1941 file_accessed include/linux/fs.h:2421 [inline] iterate_dir+0x552/0x640 fs/readdir.c:70 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x1ea/0x4e0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 14080: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x126/0x180 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:236 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1754 slab_free mm/slub.c:3509 [inline] kmem_cache_free+0xb6/0x1c0 mm/slub.c:3526 __jbd2_journal_remove_checkpoint+0x529/0x5c0 fs/jbd2/checkpoint.c:735 jbd2_log_do_checkpoint+0x1086/0x1550 fs/jbd2/checkpoint.c:354 jbd2_journal_flush+0x298/0xd70 fs/jbd2/journal.c:2465 ext4_ioctl_checkpoint fs/ext4/ioctl.c:1086 [inline] __ext4_ioctl fs/ext4/ioctl.c:1562 [inline] ext4_ioctl+0x3512/0x65d0 fs/ext4/ioctl.c:1578 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88801b9e4600 which belongs to the cache jbd2_transaction_s of size 280 The buggy address is located 120 bytes inside of 280-byte region [ffff88801b9e4600, ffff88801b9e4718) The buggy address belongs to the page: page:ffffea00006e7900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b9e4 head:ffffea00006e7900 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff8880180e5640 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Reclaimable, gfp_mask 0xd2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 1, ts 12448736875, free_ts 0 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4165 __alloc_pages+0x255/0x580 mm/page_alloc.c:5389 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0xce/0x3f0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x3fe/0xc30 mm/slub.c:3018 __slab_alloc mm/slub.c:3105 [inline] slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x276/0x310 mm/slub.c:3243 kmem_cache_zalloc include/linux/slab.h:704 [inline] start_this_handle+0x328/0x1630 fs/jbd2/transaction.c:375 jbd2__journal_start+0x2ca/0x5b0 fs/jbd2/transaction.c:525 __ext4_journal_start_sb+0x111/0x1e0 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x8a/0x100 fs/ext4/inode.c:5899 __mark_inode_dirty+0xb6/0x8f0 fs/fs-writeback.c:2409 generic_update_time fs/inode.c:1856 [inline] inode_update_time fs/inode.c:1869 [inline] touch_atime+0x3ef/0x650 fs/inode.c:1941 pick_link fs/namei.c:1796 [inline] step_into+0x10cc/0x2050 fs/namei.c:1876 walk_component+0x33a/0x790 fs/namei.c:2026 link_path_walk+0x675/0xde0 path_lookupat+0xab/0x6c0 fs/namei.c:2498 filename_lookup+0x270/0x640 fs/namei.c:2528 page_owner free stack trace missing Memory state around the buggy address: ffff88801b9e4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801b9e4580: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801b9e4600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801b9e4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801b9e4700: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================