RBP: 00007f2298665090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 00007f2297975fa0 R15: 00007fff9ed07738 ================================================================== BUG: KASAN: use-after-free in instrument_write include/linux/instrumented.h:40 [inline] BUG: KASAN: use-after-free in ___clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:44 [inline] BUG: KASAN: use-after-free in __clear_open_fd fs/file.c:324 [inline] BUG: KASAN: use-after-free in __put_unused_fd+0xdb/0x2a0 fs/file.c:600 Write of size 8 at addr ffff88809b9b8e78 by task syz.7.1342/13352 CPU: 0 UID: 0 PID: 13352 Comm: syz.7.1342 Not tainted 6.13.0-rc3-next-20241220-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 instrument_write include/linux/instrumented.h:40 [inline] ___clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:44 [inline] __clear_open_fd fs/file.c:324 [inline] __put_unused_fd+0xdb/0x2a0 fs/file.c:600 put_unused_fd+0x5c/0x70 fs/file.c:609 __do_sys_fanotify_init fs/notify/fanotify/fanotify_user.c:1628 [inline] __se_sys_fanotify_init+0x800/0x970 fs/notify/fanotify/fanotify_user.c:1466 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2297785d29 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2298665038 EFLAGS: 00000246 ORIG_RAX: 000000000000012c RAX: ffffffffffffffda RBX: 00007f2297975fa0 RCX: 00007f2297785d29 RDX: 0000000000000000 RSI: 0000000000101000 RDI: 0000000000000010 RBP: 00007f2298665090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 00007f2297975fa0 R15: 00007fff9ed07738 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9b9b8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea00026e6e08 ffffea00026e6e08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff88809b9b8d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88809b9b8d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88809b9b8e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88809b9b8e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88809b9b8f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================