================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3f2f/0x56c0 kernel/locking/lockdep.c:4897 Read of size 8 at addr ffff8881099041f8 by task syz-executor.4/8556 CPU: 0 PID: 8556 Comm: syz-executor.4 Not tainted 5.17.0-rc6-syzkaller-00100-g98d107b84614 #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+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x336 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 __lock_acquire+0x3f2f/0x56c0 kernel/locking/lockdep.c:4897 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __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+0x221/0x2b0 fs/jbd2/transaction.c:861 jbd2_journal_lock_updates+0x183/0x350 fs/jbd2/transaction.c:896 ext4_ioctl_checkpoint fs/ext4/ioctl.c:1085 [inline] __ext4_ioctl+0xfe8/0x49b0 fs/ext4/ioctl.c:1562 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f9a8d4c5049 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:00007f9a8c61a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f9a8d5d8030 RCX: 00007f9a8d4c5049 RDX: 0000000020000040 RSI: 000000004004662b RDI: 0000000000000004 RBP: 00007f9a8d51f08d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe636849ff R14: 00007f9a8c61a300 R15: 0000000000022000 Allocated by task 8533: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x66/0x80 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+0x241/0x480 mm/slub.c:3243 kmem_cache_zalloc include/linux/slab.h:704 [inline] start_this_handle+0x66e/0x1380 fs/jbd2/transaction.c:375 jbd2__journal_start+0x386/0x6b0 fs/jbd2/transaction.c:525 __ext4_journal_start_sb+0x3a8/0x4a0 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_handle_inode_extension fs/ext4/file.c:323 [inline] ext4_dio_write_iter fs/ext4/file.c:571 [inline] ext4_file_write_iter+0x11a9/0x1970 fs/ext4/file.c:675 call_write_iter include/linux/fs.h:2074 [inline] new_sync_write+0x431/0x660 fs/read_write.c:503 vfs_write+0x7cd/0xae0 fs/read_write.c:590 ksys_write+0x12d/0x250 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 8557: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x102/0x150 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:236 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook mm/slub.c:1754 [inline] slab_free mm/slub.c:3509 [inline] kmem_cache_free+0xd5/0x400 mm/slub.c:3526 jbd2_journal_free_transaction+0x30/0x40 fs/jbd2/transaction.c:62 __jbd2_journal_remove_checkpoint+0x438/0x840 fs/jbd2/checkpoint.c:735 jbd2_log_do_checkpoint+0x494/0xf70 fs/jbd2/checkpoint.c:354 jbd2_journal_flush+0x1a5/0xc70 fs/jbd2/journal.c:2465 ext4_ioctl_checkpoint fs/ext4/ioctl.c:1086 [inline] __ext4_ioctl+0x103b/0x49b0 fs/ext4/ioctl.c:1562 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888109904180 which belongs to the cache jbd2_transaction_s of size 280 The buggy address is located 120 bytes inside of 280-byte region [ffff888109904180, ffff888109904298) The buggy address belongs to the page: page:ffffea0004264100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109904 head:ffffea0004264100 order:1 compound_mapcount:0 flags: 0x200000000010200(slab|head|node=0|zone=2) raw: 0200000000010200 ffffea0004da2d00 dead000000000004 ffff88810a5acc80 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 6591960592, free_ts 0 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0x122d/0x2940 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2271 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x27f/0x3e0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0xc12/0x1450 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x3bb/0x480 mm/slub.c:3243 kmem_cache_zalloc include/linux/slab.h:704 [inline] start_this_handle+0x66e/0x1380 fs/jbd2/transaction.c:375 jbd2__journal_start+0x386/0x6b0 fs/jbd2/transaction.c:525 __ext4_journal_start_sb+0x3a8/0x4a0 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x9d/0x110 fs/ext4/inode.c:5899 __mark_inode_dirty+0x3f8/0xf30 fs/fs-writeback.c:2409 generic_update_time fs/inode.c:1856 [inline] inode_update_time fs/inode.c:1869 [inline] touch_atime+0x63d/0x700 fs/inode.c:1941 pick_link fs/namei.c:1796 [inline] step_into+0x89e/0x1d80 fs/namei.c:1876 walk_component+0x171/0x6a0 fs/namei.c:2026 link_path_walk.part.0+0x7ef/0xf70 fs/namei.c:2347 page_owner free stack trace missing Memory state around the buggy address: ffff888109904080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888109904100: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888109904180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888109904200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888109904280: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================