RDX: 0000000020000380 RSI: 00000000200002c0 RDI: 0000000000000000 RBP: 00000000009300a0 R08: 0000000020000740 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00000000004d3228 R14: 00000000004c81cc R15: 0000000000000021 ================================================================== BUG: KASAN: double-free or invalid-free in fscache_free_cookie+0x230/0x280 fs/fscache/cookie.c:67 CPU: 0 PID: 13248 Comm: syz-executor0 Not tainted 4.19.0-rc2+ #222 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:336 __kasan_slab_free+0x150/0x170 mm/kasan/kasan.c:501 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x210 mm/slab.c:3813 fscache_free_cookie+0x230/0x280 fs/fscache/cookie.c:67 fscache_alloc_cookie+0x74c/0x880 fs/fscache/cookie.c:202 __fscache_acquire_cookie+0x230/0xa50 fs/fscache/cookie.c:303 fscache_acquire_cookie include/linux/fscache.h:338 [inline] v9fs_cache_session_get_cookie+0xc4/0x270 fs/9p/cache.c:73 v9fs_session_init+0x1013/0x1a80 fs/9p/v9fs.c:464 v9fs_mount+0x7c/0x900 fs/9p/vfs_super.c:135 mount_fs+0xae/0x328 fs/super.c:1261 vfs_kern_mount.part.35+0xdc/0x4f0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2457 [inline] do_mount+0x581/0x30e0 fs/namespace.c:2787 ksys_mount+0x12d/0x140 fs/namespace.c:3003 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3014 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457099 Code: fd b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0d41e42c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f0d41e436d4 RCX: 0000000000457099 RDX: 0000000020000380 RSI: 00000000200002c0 RDI: 0000000000000000 RBP: 00000000009300a0 R08: 0000000020000740 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00000000004d3228 R14: 00000000004c81cc R15: 0000000000000021 Allocated by task 4686: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x14e/0x720 mm/slab.c:3727 kmalloc include/linux/slab.h:518 [inline] kzalloc include/linux/slab.h:707 [inline] ext4_htree_store_dirent+0x8b/0x5a0 fs/ext4/dir.c:454 htree_dirblock_to_tree+0x56b/0xae0 fs/ext4/namei.c:1020 ext4_htree_fill_tree+0x40c/0xd60 fs/ext4/namei.c:1097 ext4_dx_readdir fs/ext4/dir.c:578 [inline] ext4_readdir+0x1ca9/0x3bd0 fs/ext4/dir.c:123 iterate_dir+0x48b/0x5d0 fs/readdir.c:51 __do_sys_getdents fs/readdir.c:231 [inline] __se_sys_getdents fs/readdir.c:212 [inline] __x64_sys_getdents+0x29f/0x510 fs/readdir.c:212 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4686: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x210 mm/slab.c:3813 free_rb_tree_fname+0x85/0xe0 fs/ext4/dir.c:406 ext4_htree_free_dir_info fs/ext4/dir.c:428 [inline] ext4_release_dir+0x44/0x60 fs/ext4/dir.c:626 __fput+0x38a/0xa40 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801d7f5c200 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8801d7f5c200, ffff8801d7f5c240) The buggy address belongs to the page: page:ffffea00075fd700 count:1 mapcount:0 mapping:ffff8801dac00340 index:0xffff8801d7f5c500 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006d46488 ffffea00071600c8 ffff8801dac00340 raw: ffff8801d7f5c500 ffff8801d7f5c000 000000010000001e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d7f5c100: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8801d7f5c180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801d7f5c200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8801d7f5c280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801d7f5c300: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ==================================================================