netlink: 40 bytes leftover after parsing attributes in process `syz.4.45'. netlink: 40 bytes leftover after parsing attributes in process `syz.4.45'. ================================================================== BUG: KASAN: slab-use-after-free in ocfs2_lock_global_qf fs/ocfs2/quota_global.c:303 [inline] BUG: KASAN: slab-use-after-free in ocfs2_get_next_id+0x244/0x8e4 fs/ocfs2/quota_global.c:900 Read of size 8 at addr ffff0000dbe55028 by task syz.4.45/6702 CPU: 1 UID: 0 PID: 6702 Comm: syz.4.45 Not tainted 6.13.0-rc3-syzkaller-g573067a5a685 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 ocfs2_lock_global_qf fs/ocfs2/quota_global.c:303 [inline] ocfs2_get_next_id+0x244/0x8e4 fs/ocfs2/quota_global.c:900 dquot_get_next_dqblk+0x7c/0x348 fs/quota/dquot.c:2702 quota_getnextquota+0x264/0x650 fs/quota/quota.c:250 do_quotactl+0x52c/0x698 fs/quota/quota.c:800 __do_sys_quotactl fs/quota/quota.c:961 [inline] __se_sys_quotactl fs/quota/quota.c:917 [inline] __arm64_sys_quotactl+0x2c0/0xc9c fs/quota/quota.c:917 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 6702: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x2cc/0x428 mm/slub.c:4329 kmalloc_noprof include/linux/slab.h:901 [inline] ocfs2_local_read_info+0x1b8/0x15bc fs/ocfs2/quota_local.c:699 dquot_load_quota_sb+0x6e4/0xb24 fs/quota/dquot.c:2459 dquot_load_quota_inode+0x280/0x4f4 fs/quota/dquot.c:2496 ocfs2_enable_quotas+0x17c/0x3cc fs/ocfs2/super.c:926 ocfs2_fill_super+0x3e30/0x48d0 fs/ocfs2/super.c:1141 mount_bdev+0x1d4/0x2a0 fs/super.c:1693 ocfs2_mount+0x44/0x58 fs/ocfs2/super.c:1188 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662 vfs_get_tree+0x90/0x28c fs/super.c:1814 do_new_mount+0x278/0x900 fs/namespace.c:3507 path_mount+0x590/0xe04 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount fs/namespace.c:4034 [inline] __arm64_sys_mount+0x4d4/0x5ac fs/namespace.c:4034 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Freed by task 6702: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x64/0x8c mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4613 [inline] kfree+0x180/0x478 mm/slub.c:4761 ocfs2_local_free_info+0x724/0x890 fs/ocfs2/quota_local.c:869 dquot_disable+0xef0/0x1814 fs/quota/dquot.c:2304 dquot_suspend include/linux/quotaops.h:85 [inline] ocfs2_susp_quotas+0x190/0x2d4 fs/ocfs2/super.c:892 ocfs2_remount+0x464/0x9cc fs/ocfs2/super.c:647 legacy_reconfigure+0xfc/0x114 fs/fs_context.c:685 reconfigure_super+0x1d0/0x6e8 fs/super.c:1083 do_remount fs/namespace.c:3047 [inline] path_mount+0xc0c/0xe04 fs/namespace.c:3826 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount fs/namespace.c:4034 [inline] __arm64_sys_mount+0x4d4/0x5ac fs/namespace.c:4034 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000dbe55000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 40 bytes inside of freed 1024-byte region [ffff0000dbe55000, ffff0000dbe55400) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11be50 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0001dc0 fffffdffc341c200 dead000000000002 raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0001dc0 fffffdffc341c200 dead000000000002 head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc36f9401 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000dbe54f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000dbe54f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000dbe55000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000dbe55080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000dbe55100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== (syz.4.45,6702,1):ocfs2_block_check_validate:402 ERROR: CRC32 failed: stored: 0x2c7b5077, computed 0x28030c75. Applying ECC. (syz.4.45,6702,1):ocfs2_block_check_validate:416 ERROR: Fixed CRC32 failed: stored: 0x2c7b5077, computed 0x28d1d8ae (syz.4.45,6702,1):ocfs2_read_quota_phys_block:160 ERROR: status = -5 (syz.4.45,6702,1):ocfs2_quota_read:201 ERROR: status = -5 Quota error (device loop4): find_next_id: Can't read quota tree block 5 (syz.4.45,6702,1):ocfs2_get_next_id:916 ERROR: status = -5 ocfs2: Unmounting device (7,4) on (node local)