EXT4-fs (loop0): mounting ext2 file system using the ext4 subsystem EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3d09/0x5b20 kernel/locking/lockdep.c:4820 Read of size 8 at addr ffff88800adadf20 by task syz-executor.0/17196 CPU: 1 PID: 17196 Comm: syz-executor.0 Not tainted 5.10.56 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x210 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:562 __lock_acquire+0x3d09/0x5b20 kernel/locking/lockdep.c:4820 lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] chroot_fs_refs+0x11c/0x630 fs/fs_struct.c:70 __do_sys_pivot_root+0xee7/0x14b0 fs/namespace.c:3774 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007efe275ec188 EFLAGS: 00000246 ORIG_RAX: 000000000000009b RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 00000000200002c0 RDI: 0000000020000280 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffc1fcfa98f R14: 00007efe275ec300 R15: 0000000000022000 Allocated by task 4588: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:532 [inline] slab_alloc_node mm/slub.c:2889 [inline] slab_alloc mm/slub.c:2897 [inline] kmem_cache_alloc+0x13b/0x350 mm/slub.c:2902 copy_fs_struct+0x43/0x330 fs/fs_struct.c:114 copy_fs kernel/fork.c:1449 [inline] copy_process+0x452f/0x6650 kernel/fork.c:2095 kernel_clone+0xe7/0xa20 kernel/fork.c:2465 __do_sys_clone+0xc8/0x110 kernel/fork.c:2582 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 17174: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x110/0x150 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1542 [inline] slab_free_freelist_hook+0x64/0x150 mm/slub.c:1575 slab_free mm/slub.c:3140 [inline] kmem_cache_free+0x97/0x2f0 mm/slub.c:3156 free_fs_struct fs/fs_struct.c:92 [inline] exit_fs+0x123/0x170 fs/fs_struct.c:108 do_exit+0xbe9/0x2770 kernel/exit.c:807 do_group_exit+0x125/0x310 kernel/exit.c:908 get_signal+0x469/0x2200 kernel/signal.c:2758 arch_do_signal+0x88/0x1b70 arch/x86/kernel/signal.c:805 exit_to_user_mode_loop kernel/entry/common.c:161 [inline] exit_to_user_mode_prepare+0xf7/0x160 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x230 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88800adadf00 which belongs to the cache fs_cache of size 168 The buggy address is located 32 bytes inside of 168-byte region [ffff88800adadf00, ffff88800adadfa8) The buggy address belongs to the page: page:0000000025c85d9a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xadad flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00006493c0 0000000900000009 ffff888007fdc640 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800adade00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88800adade80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff88800adadf00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88800adadf80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88800adae000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ==================================================================