ci starts bisection 2023-05-06 03:14:11.234694322 +0000 UTC m=+37075.728501565 bisecting fixing commit since e1c04510f521e853019afeca2a5991a5ef8d6a5b building syzkaller on 6be0f1f57faa36df4b215edbe2fcfdbbb6de9f6d ensuring issue is reproducible on original commit e1c04510f521e853019afeca2a5991a5ef8d6a5b testing commit e1c04510f521e853019afeca2a5991a5ef8d6a5b gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7d30b501e47ac97c0d0d79cf8e7fcbe90af1424420d15962a3b3ec7ca19d8ccd all runs: crashed: INFO: trying to register non-static key in net_free testing current HEAD 2e1e1337881b0e9844d687982aa54b31b1269b11 testing commit 2e1e1337881b0e9844d687982aa54b31b1269b11 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 82c93f4dbd936508e8f2ae87ea251bbaad2a961a0c51980207c0d2c814e0e855 all runs: crashed: KASAN: slab-use-after-free Read in qd_unlock revisions tested: 2, total time: 26m22.535554187s (build: 17m42.189233141s, test: 7m45.744526808s) the crash still happens on HEAD commit msg: Merge tag '6.4-rc-ksmbd-server-fixes-part2' of git://git.samba.org/ksmbd crash: KASAN: slab-use-after-free Read in qd_unlock RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fb37a08d567 RDX: 00007ffcc5f01319 RSI: 000000000000000a RDI: 00007ffcc5f01310 RBP: 00007ffcc5f01310 R08: 00000000ffffffff R09: 00007ffcc5f010e0 R10: 00005555562c2893 R11: 0000000000000246 R12: 00007fb37a0e6b24 R13: 00007ffcc5f023d0 R14: 00005555562c2810 R15: 00007ffcc5f02410 ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-use-after-free in qd_unlock+0x1b/0x160 fs/gfs2/quota.c:490 Read of size 8 at addr ffff888074932090 by task syz-executor.0/5279 CPU: 1 PID: 5279 Comm: syz-executor.0 Not tainted 6.3.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x64/0xb0 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 check_region_inline mm/kasan/generic.c:181 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:187 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] qd_unlock+0x1b/0x160 fs/gfs2/quota.c:490 gfs2_quota_sync+0x2f5/0x540 fs/gfs2/quota.c:1325 gfs2_sync_fs+0x3f/0xa0 fs/gfs2/super.c:665 sync_filesystem.part.0+0x63/0x170 fs/sync.c:56 generic_shutdown_super+0x68/0x420 fs/super.c:473 kill_block_super+0x9a/0xe0 fs/super.c:1407 deactivate_locked_super+0x7f/0x130 fs/super.c:331 cleanup_mnt+0x253/0x360 fs/namespace.c:1177 task_work_run+0x12f/0x220 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fb37a08d567 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcc5f01248 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fb37a08d567 RDX: 00007ffcc5f01319 RSI: 000000000000000a RDI: 00007ffcc5f01310 RBP: 00007ffcc5f01310 R08: 00000000ffffffff R09: 00007ffcc5f010e0 R10: 00005555562c2893 R11: 0000000000000246 R12: 00007fb37a0e6b24 R13: 00007ffcc5f023d0 R14: 00005555562c2810 R15: 00007ffcc5f02410 Allocated by task 5410: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] qd_alloc+0x48/0x2d0 fs/gfs2/quota.c:216 gfs2_quota_init+0x58d/0xcd0 fs/gfs2/quota.c:1415 gfs2_make_fs_rw+0x332/0x500 fs/gfs2/super.c:155 gfs2_fill_super+0x1cf7/0x2660 fs/gfs2/ops_fstype.c:1277 get_tree_bdev+0x3a2/0x690 fs/super.c:1303 gfs2_get_tree+0x49/0x240 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x83/0x320 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x836/0x1a30 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x1f9/0x270 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 15: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3786 [inline] kmem_cache_free+0xe9/0x480 mm/slub.c:3808 rcu_do_batch kernel/rcu/tree.c:2115 [inline] rcu_core+0x806/0x1ad0 kernel/rcu/tree.c:2377 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2627 gfs2_quota_cleanup+0x3bb/0x740 fs/gfs2/quota.c:1479 gfs2_make_fs_ro+0x1f1/0x610 fs/gfs2/super.c:575 signal_our_withdraw fs/gfs2/util.c:166 [inline] gfs2_withdraw+0xcb5/0x1200 fs/gfs2/util.c:351 gfs2_dinode_in fs/gfs2/glops.c:469 [inline] gfs2_inode_refresh+0xbf3/0x1180 fs/gfs2/glops.c:489 gfs2_instantiate+0x120/0x1e0 fs/gfs2/glock.c:454 gfs2_glock_holder_ready fs/gfs2/glock.c:1319 [inline] gfs2_glock_holder_ready fs/gfs2/glock.c:1315 [inline] gfs2_glock_wait+0x137/0x280 fs/gfs2/glock.c:1339 gfs2_glock_nq_init fs/gfs2/glock.h:261 [inline] do_sync+0x535/0xae0 fs/gfs2/quota.c:916 gfs2_quota_sync+0x24e/0x540 fs/gfs2/quota.c:1318 gfs2_sync_fs+0x3f/0xa0 fs/gfs2/super.c:665 sync_filesystem.part.0+0x63/0x170 fs/sync.c:56 generic_shutdown_super+0x68/0x420 fs/super.c:473 kill_block_super+0x9a/0xe0 fs/super.c:1407 deactivate_locked_super+0x7f/0x130 fs/super.c:331 cleanup_mnt+0x253/0x360 fs/namespace.c:1177 task_work_run+0x12f/0x220 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888074932000 which belongs to the cache gfs2_quotad of size 272 The buggy address is located 144 bytes inside of freed 272-byte region [ffff888074932000, ffff888074932110) The buggy address belongs to the physical page: page:ffffea0001d24c80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74932 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff88801ab5b500 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 5410, tgid 5409 (syz-executor.0), ts 48789300093, free_ts 6330417925 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x38e/0x3b0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] qd_alloc+0x48/0x2d0 fs/gfs2/quota.c:216 gfs2_quota_init+0x58d/0xcd0 fs/gfs2/quota.c:1415 gfs2_make_fs_rw+0x332/0x500 fs/gfs2/super.c:155 gfs2_fill_super+0x1cf7/0x2660 fs/gfs2/ops_fstype.c:1277 get_tree_bdev+0x3a2/0x690 fs/super.c:1303 gfs2_get_tree+0x49/0x240 fs/gfs2/ops_fstype.c:1335 vfs_get_tree+0x83/0x320 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x836/0x1a30 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x1f9/0x270 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x629/0xca0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 free_contig_range+0xb5/0x180 mm/page_alloc.c:6994 destroy_args+0x50a/0x700 mm/debug_vm_pgtable.c:1023 debug_vm_pgtable+0x18fd/0x31a0 mm/debug_vm_pgtable.c:1403 do_one_initcall+0xc2/0x3c0 init/main.c:1246 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x541/0x950 init/main.c:1571 kernel_init+0x1a/0x1c0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff888074931f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074932000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888074932080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888074932100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074932180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================