ci starts bisection 2023-04-05 20:08:39.555307864 +0000 UTC m=+21477.179788639 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: 901720e40a0254ea8d6ce299652a70f7c23a8ea915b43618709273ae38ddfa88 all runs: crashed: INFO: trying to register non-static key in net_free testing current HEAD 99ddf2254febae9eab7fb0bcc02c5322243f5c49 testing commit 99ddf2254febae9eab7fb0bcc02c5322243f5c49 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: ad741c0107b387adbae10c1c40416f536abde8ba9af106bf1d958d9e41813da6 all runs: crashed: KASAN: slab-use-after-free Read in qd_unlock revisions tested: 2, total time: 33m59.457100033s (build: 24m41.06476186s, test: 7m55.833113005s) the crash still happens on HEAD commit msg: Merge tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace crash: KASAN: slab-use-after-free Read in qd_unlock RSP: 002b:00007ffc1cbba1d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f306468d567 RDX: 00007ffc1cbba2a9 RSI: 000000000000000a RDI: 00007ffc1cbba2a0 RBP: 00007ffc1cbba2a0 R08: 00000000ffffffff R09: 00007ffc1cbba070 R10: 00005555563b08b3 R11: 0000000000000246 R12: 00007f30646e6b24 R13: 00007ffc1cbbb360 R14: 00005555563b0810 R15: 00007ffc1cbbb3a0 ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [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 ffff888070c9d090 by task syz-executor.0/5425 CPU: 0 PID: 5425 Comm: syz-executor.0 Not tainted 6.3.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/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:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 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:72 [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:656 sync_filesystem.part.0+0x63/0x170 fs/sync.c:56 generic_shutdown_super+0x68/0x420 fs/super.c:473 kill_block_super+0x94/0xd0 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:0x7f306468d567 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:00007ffc1cbba1d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f306468d567 RDX: 00007ffc1cbba2a9 RSI: 000000000000000a RDI: 00007ffc1cbba2a0 RBP: 00007ffc1cbba2a0 R08: 00000000ffffffff R09: 00007ffc1cbba070 R10: 00005555563b08b3 R11: 0000000000000246 R12: 00007f30646e6b24 R13: 00007ffc1cbbb360 R14: 00005555563b0810 R15: 00007ffc1cbbb3a0 Allocated by task 5548: 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:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [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+0x1cf1/0x2650 fs/gfs2/ops_fstype.c:1280 get_tree_bdev+0x39c/0x680 fs/super.c:1303 gfs2_get_tree+0x49/0x240 fs/gfs2/ops_fstype.c:1338 vfs_get_tree+0x83/0x320 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x82d/0x1a30 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x1f9/0x270 fs/namespace.c:3571 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 21: 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:3787 [inline] kmem_cache_free+0xe9/0x480 mm/slub.c:3809 rcu_do_batch kernel/rcu/tree.c:2112 [inline] rcu_core+0x814/0x1960 kernel/rcu/tree.c:2372 __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:2622 gfs2_quota_cleanup+0x3bb/0x740 fs/gfs2/quota.c:1479 gfs2_make_fs_ro+0x1f1/0x600 fs/gfs2/super.c:566 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:463 [inline] gfs2_inode_refresh+0xb6f/0xfb0 fs/gfs2/glops.c:483 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:656 sync_filesystem.part.0+0x63/0x170 fs/sync.c:56 generic_shutdown_super+0x68/0x420 fs/super.c:473 kill_block_super+0x94/0xd0 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 ffff888070c9d000 which belongs to the cache gfs2_quotad of size 272 The buggy address is located 144 bytes inside of freed 272-byte region [ffff888070c9d000, ffff888070c9d110) The buggy address belongs to the physical page: page:ffffea0001c32740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x70c9d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888146082280 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 5548, tgid 5547 (syz-executor.0), ts 51427492260, free_ts 32591516505 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4326 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5592 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:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x38e/0x3b0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [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+0x1cf1/0x2650 fs/gfs2/ops_fstype.c:1280 get_tree_bdev+0x39c/0x680 fs/super.c:1303 gfs2_get_tree+0x49/0x240 fs/gfs2/ops_fstype.c:1338 vfs_get_tree+0x83/0x320 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x82d/0x1a30 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x1f9/0x270 fs/namespace.c:3571 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:1454 [inline] free_pcp_prepare+0x5d5/0xa50 mm/page_alloc.c:1504 free_unref_page_prepare mm/page_alloc.c:3388 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3483 __folio_put_large mm/swap.c:119 [inline] release_pages+0x2ed/0x10e0 mm/swap.c:1008 tlb_batch_pages_flush+0x85/0x160 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x114/0x6c0 mm/mmu_gather.c:391 exit_mmap+0x1d0/0x540 mm/mmap.c:3042 __mmput+0xf3/0x440 kernel/fork.c:1204 exit_mm kernel/exit.c:563 [inline] do_exit+0x88d/0x2480 kernel/exit.c:856 do_group_exit+0xb4/0x250 kernel/exit.c:1019 __do_sys_exit_group kernel/exit.c:1030 [inline] __se_sys_exit_group kernel/exit.c:1028 [inline] __x64_sys_exit_group+0x39/0x40 kernel/exit.c:1028 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 Memory state around the buggy address: ffff888070c9cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888070c9d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888070c9d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888070c9d100: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888070c9d180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================