syzbot


KASAN: null-ptr-deref Write in gfs2_trans_add_revoke

Status: upstream: reported C repro on 2025/07/31 18:10
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+f2b9fe431c853e793948@syzkaller.appspotmail.com
First crash: 2d20h, last: 2d14h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] gfs2: Correct use of trans 1 (1) 2025/08/01 04:12
[syzbot] [gfs2?] KASAN: null-ptr-deref Write in gfs2_trans_add_revoke 0 (2) 2025/08/01 03:48
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/08/01 03:48 21m lizhi.xu@windriver.com patch upstream OK log

Sample crash report:
gfs2: fsid=syz:syz.0: first mount done, others may mount
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_write include/linux/instrumented.h:82 [inline]
BUG: KASAN: null-ptr-deref in set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline]
BUG: KASAN: null-ptr-deref in gfs2_trans_add_revoke+0x8c/0xe0 fs/gfs2/trans.c:321
Write of size 8 at addr 0000000000000018 by task syz.0.17/5566

CPU: 0 UID: 0 PID: 5566 Comm: syz.0.17 Not tainted 6.16.0-syzkaller-08685-g260f6f4fda93 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189
 instrument_atomic_write include/linux/instrumented.h:82 [inline]
 set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline]
 gfs2_trans_add_revoke+0x8c/0xe0 fs/gfs2/trans.c:321
 gfs2_remove_from_journal+0x43e/0x6d0 fs/gfs2/meta_io.c:366
 gfs2_discard fs/gfs2/aops.c:597 [inline]
 gfs2_invalidate_folio+0x579/0x750 fs/gfs2/aops.c:631
 folio_invalidate mm/truncate.c:140 [inline]
 truncate_cleanup_folio+0x2d5/0x430 mm/truncate.c:160
 truncate_inode_pages_range+0x233/0xda0 mm/truncate.c:379
 do_gfs2_set_flags fs/gfs2/file.c:254 [inline]
 gfs2_fileattr_set+0x80a/0x9b0 fs/gfs2/file.c:311
 vfs_fileattr_set+0x92f/0xb90 fs/file_attr.c:298
 ioctl_setflags+0x17b/0x200 fs/file_attr.c:336
 do_vfs_ioctl+0x8ed/0x1430 fs/ioctl.c:561
 __do_sys_ioctl fs/ioctl.c:596 [inline]
 __se_sys_ioctl+0x82/0x170 fs/ioctl.c:584
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f55c3b8eb69
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffea6c68328 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f55c3db5fa0 RCX: 00007f55c3b8eb69
RDX: 0000200000000000 RSI: 0000000040086602 RDI: 0000000000000005
RBP: 00007f55c3c11df1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f55c3db5fa0 R14: 00007f55c3db5fa0 R15: 0000000000000003
 </TASK>
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/31 17:08 upstream 260f6f4fda93 3526e777 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro #1 (clean fs)] [mounted in repro #2 (clean fs)] ci-snapshot-upstream-root KASAN: null-ptr-deref Write in gfs2_trans_add_revoke
2025/07/31 11:06 upstream 260f6f4fda93 f8f2b4da .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: null-ptr-deref Write in gfs2_trans_add_revoke
* Struck through repros no longer work on HEAD.