RBP: 00000000009300a0 R08: 0000000020000740 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00000000004d2768 R14: 00000000004c7be5 R15: 0000000000000021 ================================================================== BUG: KASAN: double-free or invalid-free in fscache_free_cookie+0x230/0x280 fs/fscache/cookie.c:67 CPU: 0 PID: 29700 Comm: syz-executor1 Not tainted 4.18.0+ #206 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:1280 vfs_kern_mount.part.33+0xdc/0x4e0 fs/namespace.c:987 vfs_kern_mount fs/namespace.c:977 [inline] do_new_mount fs/namespace.c:2483 [inline] do_mount+0x581/0x30e0 fs/namespace.c:2813 ksys_mount+0x12d/0x140 fs/namespace.c:3029 __do_sys_mount fs/namespace.c:3043 [inline] __se_sys_mount fs/namespace.c:3040 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3040 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457089 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:00007f2a74c99c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2a74c9a6d4 RCX: 0000000000457089 RDX: 0000000020000380 RSI: 00000000200002c0 RDI: 0000000000000000 RBP: 00000000009300a0 R08: 0000000020000740 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00000000004d2768 R14: 00000000004c7be5 R15: 0000000000000021 Allocated by task 6547: 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] inotify_handle_event+0x1ff/0x5c0 fs/notify/inotify/inotify_fsnotify.c:104 inotify_ignored_and_remove_idr+0x10d/0x1b0 fs/notify/inotify/inotify_user.c:495 inotify_freeing_mark+0x1d/0x30 fs/notify/inotify/inotify_fsnotify.c:138 fsnotify_free_mark+0xf2/0x150 fs/notify/mark.c:409 fsnotify_destroy_mark+0x3e/0x50 fs/notify/mark.c:418 __do_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:782 [inline] __se_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:757 [inline] __x64_sys_inotify_rm_watch+0x121/0x1a0 fs/notify/inotify/inotify_user.c:757 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 2293: 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 inotify_free_event+0x15/0x20 fs/notify/inotify/inotify_fsnotify.c:187 fsnotify_destroy_event.part.1+0x1ad/0x280 fs/notify/notification.c:87 fsnotify_destroy_event+0x69/0x80 fs/notify/notification.c:74 inotify_read+0x5c2/0x9d0 fs/notify/inotify/inotify_user.c:247 __vfs_read+0x117/0x9b0 fs/read_write.c:416 vfs_read+0x17f/0x3c0 fs/read_write.c:452 ksys_read+0x101/0x260 fs/read_write.c:578 __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x73/0xb0 fs/read_write.c:586 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801840c5600 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8801840c5600, ffff8801840c5640) The buggy address belongs to the page: page:ffffea0006103140 count:1 mapcount:0 mapping:ffff8801dac00340 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006bedc08 ffffea00074d4208 ffff8801dac00340 raw: 0000000000000000 ffff8801840c5000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801840c5500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801840c5580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801840c5600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8801840c5680: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801840c5700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================