================================================================== BUG: KASAN: use-after-free in __lock_acquire+0xf7/0x7c50 kernel/locking/lockdep.c:4919 Read of size 8 at addr ffff888072830bb0 by task gfs2_quotad/6417 CPU: 1 PID: 6417 Comm: gfs2_quotad Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 __lock_acquire+0xf7/0x7c50 kernel/locking/lockdep.c:4919 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162 finish_wait+0xb8/0x1d0 kernel/sched/wait.c:410 gfs2_quotad+0x4e6/0x670 fs/gfs2/quota.c:1579 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 6405: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] init_sbd fs/gfs2/ops_fstype.c:77 [inline] gfs2_fill_super+0x117/0x1f80 fs/gfs2/ops_fstype.c:1148 get_tree_bdev+0x3f1/0x610 fs/super.c:1366 gfs2_get_tree+0x4d/0x1e0 fs/gfs2/ops_fstype.c:1327 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3069 do_mount fs/namespace.c:3412 [inline] __do_sys_mount fs/namespace.c:3620 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3597 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xba3/0xfb0 kernel/workqueue.c:1520 queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] macvlan_broadcast_enqueue drivers/net/macvlan.c:364 [inline] macvlan_handle_frame+0xe9c/0x1250 drivers/net/macvlan.c:480 __netif_receive_skb_core+0xfc5/0x3840 net/core/dev.c:5475 __netif_receive_skb_one_core net/core/dev.c:5579 [inline] __netif_receive_skb+0x74/0x290 net/core/dev.c:5695 process_backlog+0x37c/0x6e0 net/core/dev.c:6023 __napi_poll+0xc0/0x460 net/core/dev.c:6590 napi_poll net/core/dev.c:6657 [inline] net_rx_action+0x5b1/0xad0 net/core/dev.c:6771 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xba3/0xfb0 kernel/workqueue.c:1520 queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] macvlan_broadcast_enqueue drivers/net/macvlan.c:364 [inline] macvlan_handle_frame+0xe9c/0x1250 drivers/net/macvlan.c:480 __netif_receive_skb_core+0xfc5/0x3840 net/core/dev.c:5475 __netif_receive_skb_one_core net/core/dev.c:5579 [inline] __netif_receive_skb+0x74/0x290 net/core/dev.c:5695 process_backlog+0x37c/0x6e0 net/core/dev.c:6023 __napi_poll+0xc0/0x460 net/core/dev.c:6590 napi_poll net/core/dev.c:6657 [inline] net_rx_action+0x5b1/0xad0 net/core/dev.c:6771 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 run_ksoftirqd+0x98/0xf0 kernel/softirq.c:963 smpboot_thread_fn+0x64a/0xa40 kernel/smpboot.c:164 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888072830000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 2992 bytes inside of 8192-byte region [ffff888072830000, ffff888072832000) The buggy address belongs to the physical page: page:ffffea0001ca0c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888072830000 pfn:0x72830 head:ffffea0001ca0c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00015ef400 dead000000000002 ffff888017442280 raw: ffff888072830000 0000000080020001 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4004, tgid 4004 (rcS), ts 52173740839, free_ts 52097608307 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 alloc_slab_page+0x5d/0x160 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2c0 mm/slub.c:1997 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0x1081/0x1f50 security/tomoyo/audit.c:264 tomoyo_supervisor+0x326/0x10b0 security/tomoyo/common.c:2088 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x146/0x1e0 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x157a/0x1a40 security/tomoyo/domain.c:882 tomoyo_bprm_check_security+0x100/0x150 security/tomoyo/tomoyo.c:101 security_bprm_check+0x5e/0x90 security/security.c:869 search_binary_handler fs/exec.c:1752 [inline] exec_binprm fs/exec.c:1805 [inline] bprm_execve+0xa77/0x18a0 fs/exec.c:1874 do_execveat_common+0x51b/0x6c0 fs/exec.c:1979 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 free_slab mm/slub.c:2036 [inline] discard_slab mm/slub.c:2042 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2591 put_cpu_partial+0x17c/0x250 mm/slub.c:2667 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3359 [inline] __kmem_cache_alloc_node+0x140/0x260 mm/slub.c:3398 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc+0xa0/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] load_elf_phdrs fs/binfmt_elf.c:507 [inline] load_elf_binary+0x2c9/0x26d0 fs/binfmt_elf.c:887 search_binary_handler fs/exec.c:1764 [inline] exec_binprm fs/exec.c:1805 [inline] bprm_execve+0xb10/0x18a0 fs/exec.c:1874 do_execveat_common+0x51b/0x6c0 fs/exec.c:1979 do_execve fs/exec.c:2053 [inline] __do_sys_execve fs/exec.c:2129 [inline] __se_sys_execve fs/exec.c:2124 [inline] __x64_sys_execve+0x8e/0xa0 fs/exec.c:2124 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888072830a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888072830b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888072830b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888072830c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888072830c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================