Leaked locks on dev=0x0:0x28 ino=0x3569: LEASE: fl_owner=ffff888024392fc0 fl_flags=0x20 fl_type=0x0 fl_pid=6572 ================================================================== BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:381 [inline] BUG: KASAN: slab-use-after-free in locks_remove_posix+0x10f/0x630 fs/locks.c:2667 Read of size 8 at addr ffff88803160b7e0 by task syz.0.202/6573 CPU: 0 UID: 0 PID: 6573 Comm: syz.0.202 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 list_empty include/linux/list.h:381 [inline] locks_remove_posix+0x10f/0x630 fs/locks.c:2667 filp_flush+0x113/0x190 fs/open.c:1537 filp_close+0x1d/0x40 fs/open.c:1546 __range_close fs/file.c:790 [inline] __do_sys_close_range fs/file.c:849 [inline] __se_sys_close_range+0x359/0x650 fs/file.c:813 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fead738f749 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:00007fead82e8038 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: ffffffffffffffda RBX: 00007fead75e5fa0 RCX: 00007fead738f749 RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 000000000000000a RBP: 00007fead7413f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fead75e6038 R14: 00007fead75e5fa0 R15: 00007fff59f01d88 Allocated by task 6573: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4948 [inline] slab_alloc_node mm/slub.c:5258 [inline] kmem_cache_alloc_noprof+0x37d/0x710 mm/slub.c:5265 locks_get_lock_context+0x134/0x3b0 fs/locks.c:186 generic_add_lease fs/locks.c:1811 [inline] generic_setlease+0x528/0x1280 fs/locks.c:1970 do_fcntl_add_lease+0x34d/0x460 fs/locks.c:2073 fcntl_setlease+0x123/0x180 fs/locks.c:2098 do_fcntl+0x867/0x1a50 fs/fcntl.c:535 __do_sys_fcntl fs/fcntl.c:602 [inline] __se_sys_fcntl+0xc8/0x150 fs/fcntl.c:587 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6573: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6663 [inline] kmem_cache_free+0x197/0x620 mm/slub.c:6774 __destroy_inode+0x2ea/0x670 fs/inode.c:373 destroy_inode fs/inode.c:394 [inline] evict+0x87d/0xae0 fs/inode.c:861 __do_sys_mq_unlink ipc/mqueue.c:972 [inline] __se_sys_mq_unlink+0x2c5/0x360 ipc/mqueue.c:944 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803160b790 which belongs to the cache file_lock_ctx of size 112 The buggy address is located 80 bytes inside of freed 112-byte region [ffff88803160b790, ffff88803160b800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3160b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff888140ed4280 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080170017 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5202, tgid 5202 (udevd), ts 44367761695, free_ts 44348627504 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4651 __slab_alloc+0x65/0x100 mm/slub.c:4774 __slab_alloc_node mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:5246 [inline] kmem_cache_alloc_noprof+0x40f/0x710 mm/slub.c:5265 locks_get_lock_context+0x134/0x3b0 fs/locks.c:186 flock_lock_inode+0xf2/0x1410 fs/locks.c:1083 flock_lock_inode_wait fs/locks.c:2134 [inline] locks_lock_inode_wait+0x107/0x410 fs/locks.c:2161 locks_lock_file_wait include/linux/filelock.h:446 [inline] __do_sys_flock fs/locks.c:2229 [inline] __se_sys_flock+0x467/0x5b0 fs/locks.c:2185 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 48 tgid 48 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857 handle_softirqs+0x27d/0x850 kernel/softirq.c:626 __do_softirq kernel/softirq.c:660 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727 irq_exit_rcu+0x9/0x30 kernel/softirq.c:743 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 Memory state around the buggy address: ffff88803160b680: 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 ffff88803160b700: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88803160b780: fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803160b800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803160b880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================