RAX: ffffffffffffffda RBX: 00007f732e375fa0 RCX: 00007f732e185d29 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007f732ef09090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 00007f732e375fa0 R15: 00007ffe01a888d8 ================================================================== 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:323 [inline] BUG: KASAN: use-after-free in __put_unused_fd fs/file.c:599 [inline] BUG: KASAN: use-after-free in put_unused_fd+0xaa/0x1b0 fs/file.c:608 Write of size 8 at addr ffff88812cfeb478 by task syz.3.16/3552 CPU: 1 UID: 0 PID: 3552 Comm: syz.3.16 Not tainted 6.12.0-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+0x108/0x280 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:323 [inline] __put_unused_fd fs/file.c:599 [inline] put_unused_fd+0xaa/0x1b0 fs/file.c:608 __do_sys_fanotify_init fs/notify/fanotify/fanotify_user.c:1565 [inline] __se_sys_fanotify_init+0x5cb/0x700 fs/notify/fanotify/fanotify_user.c:1403 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8d/0x170 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f732e185d29 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:00007f732ef09038 EFLAGS: 00000246 ORIG_RAX: 000000000000012c RAX: ffffffffffffffda RBX: 00007f732e375fa0 RCX: 00007f732e185d29 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007f732ef09090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 00007f732e375fa0 R15: 00007ffe01a888d8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12cfeb flags: 0x100000000000000(node=0|zone=2) raw: 0100000000000000 ffffea0004b3fac8 ffffea0004b3fac8 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: ffff88812cfeb300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812cfeb380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88812cfeb400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88812cfeb480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812cfeb500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================