KASAN: use-after-free Read in qd_unlock (2)

Status: upstream: reported C repro on 2026/11/07 14:57
Reported-by: syzbot+e48a70809a9109048d8e@syzkaller.appspotmail.com
First crash: 5d22h, last: 5d22h
▶ ▼ Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in qd_unlock (2) gfs2 19 syz, C error done 5 1182d 1410d 23/29 fixed on 2023/10/12 12:47
linux-6.1 KASAN: use-after-free Read in qd_unlock 19 7 863d 871d 0/3 auto-obsoleted due to no activity on 2024/10/10 22:13
upstream KASAN: use-after-free Read in qd_unlock gfs2 19 1 1695d 1691d 0/29 auto-closed as invalid on 2022/07/22 08:43
linux-5.15 KASAN: use-after-free Read in qd_unlock origin:lts-only 19 syz, C done 16157 4h50m 871d 0/3 upstream: reported C repro on 2024/06/24 17:41

Sample crash report:
 gfs2_quota_sync+0x2cc/0x4e8 fs/gfs2/quota.c:1329
 quotad_check_timeo fs/gfs2/quota.c:1519 [inline]
 gfs2_quotad+0x30c/0x520 fs/gfs2/quota.c:1566
 kthread+0x254/0x2e0 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
==================================================================
BUG: KASAN: use-after-free in generic_test_bit include/asm-generic/bitops/generic-non-atomic.h:128 [inline]
BUG: KASAN: use-after-free in qd_unlock+0x40/0x2a8 fs/gfs2/quota.c:502
Read of size 8 at addr ffff0000e1dbfb10 by task gfs2_quotad/4584

CPU: 0 PID: 4584 Comm: gfs2_quotad Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/31/2026
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 print_address_description+0x88/0x218 mm/kasan/report.c:316
 print_report+0x50/0x68 mm/kasan/report.c:420
 kasan_report+0xa8/0xfc mm/kasan/report.c:524
 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
 generic_test_bit include/asm-generic/bitops/generic-non-atomic.h:128 [inline]
 qd_unlock+0x40/0x2a8 fs/gfs2/quota.c:502
 gfs2_quota_sync+0x398/0x4e8 fs/gfs2/quota.c:1336
 quotad_check_timeo fs/gfs2/quota.c:1519 [inline]
 gfs2_quotad+0x30c/0x520 fs/gfs2/quota.c:1566
 kthread+0x254/0x2e0 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

Allocated by task 4582:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
 __kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x74/0x430 mm/slab.h:742
 slab_alloc_node mm/slub.c:3366 [inline]
 slab_alloc mm/slub.c:3374 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3381 [inline]
 kmem_cache_alloc+0x234/0x310 mm/slub.c:3390
 kmem_cache_zalloc include/linux/slab.h:689 [inline]
 qd_alloc+0x64/0x240 fs/gfs2/quota.c:216
 gfs2_quota_init+0x654/0xd7c fs/gfs2/quota.c:1426
 gfs2_make_fs_rw+0x33c/0x46c fs/gfs2/super.c:159
 gfs2_fill_super+0x1408/0x1a28 fs/gfs2/ops_fstype.c:1272
 get_tree_bdev+0x35c/0x54c fs/super.c:1377
 gfs2_get_tree+0x58/0x1b8 fs/gfs2/ops_fstype.c:1328
 vfs_get_tree+0x90/0x278 fs/super.c:1584
 do_new_mount+0x228/0x818 fs/namespace.c:3104
 path_mount+0x5ac/0xe6c fs/namespace.c:3462
 do_mount fs/namespace.c:3475 [inline]
 __do_sys_mount fs/namespace.c:3683 [inline]
 __se_sys_mount fs/namespace.c:3660 [inline]
 __arm64_sys_mount+0x4a0/0x5a0 fs/namespace.c:3660
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x12c arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:589

Freed by task 15:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:53
 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237
 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:245
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1735 [inline]
 slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1761
 slab_free mm/slub.c:3694 [inline]
 kmem_cache_free+0x118/0x318 mm/slub.c:3716
 gfs2_qd_dealloc+0x54/0x64 fs/gfs2/quota.c:109
 rcu_do_batch kernel/rcu/tree.c:2297 [inline]
 rcu_core+0x848/0x18e8 kernel/rcu/tree.c:2557
 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2574
 handle_softirqs+0x318/0xc90 kernel/softirq.c:596
 run_ksoftirqd+0x7c/0x2ac kernel/softirq.c:968
 smpboot_thread_fn+0x4e8/0x960 kernel/smpboot.c:164
 kthread+0x254/0x2e0 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

Last potentially related work creation:
 kasan_save_stack+0x40/0x70 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486
 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
 call_rcu+0x104/0x958 kernel/rcu/tree.c:2849
 gfs2_quota_cleanup+0x3cc/0x640 fs/gfs2/quota.c:1490
 gfs2_make_fs_rw+0x3dc/0x46c fs/gfs2/super.c:161
 gfs2_fill_super+0x1408/0x1a28 fs/gfs2/ops_fstype.c:1272
 get_tree_bdev+0x35c/0x54c fs/super.c:1377
 gfs2_get_tree+0x58/0x1b8 fs/gfs2/ops_fstype.c:1328
 vfs_get_tree+0x90/0x278 fs/super.c:1584
 do_new_mount+0x228/0x818 fs/namespace.c:3104
 path_mount+0x5ac/0xe6c fs/namespace.c:3462
 do_mount fs/namespace.c:3475 [inline]
 __do_sys_mount fs/namespace.c:3683 [inline]
 __se_sys_mount fs/namespace.c:3660 [inline]
 __arm64_sys_mount+0x4a0/0x5a0 fs/namespace.c:3660
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x12c arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:589

The buggy address belongs to the object at ffff0000e1dbfa80
 which belongs to the cache gfs2_quotad of size 272
The buggy address is located 144 bytes inside of
 272-byte region [ffff0000e1dbfa80, ffff0000e1dbfb90)

The buggy address belongs to the physical page:
page:00000000f4af09b7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x121dbf
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c4dc9080
raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000e1dbfa00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff0000e1dbfa80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000e1dbfb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff0000e1dbfb80: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff0000e1dbfc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/07 14:56 linux-6.1.y c75b0cf0982c 5cecaf1f .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in qd_unlock
* Struck through repros no longer work on HEAD.