[syzbot] [gfs2?] KMSAN: uninit-value in gfs2_quota_init

From: syzbot
Date: Thu May 30 2024 - 21:23:35 EST


Hello,

syzbot found the following issue on:

HEAD commit: 614da38e2f7a Merge tag 'hid-for-linus-2024051401' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15bf6df0980000
kernel config: https://syzkaller.appspot.com/x/.config?x=f5d2cbf33633f507
dashboard link: https://syzkaller.appspot.com/bug?extid=54a69997acb9eddf144e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/89eafb874b71/disk-614da38e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/356000512ad9/vmlinux-614da38e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/839c73939115/bzImage-614da38e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+54a69997acb9eddf144e@xxxxxxxxxxxxxxxxxxxxxxxxx

syz-executor.3: attempt to access beyond end of device
loop3: rw=12288, sector=402653184, nr_sectors = 8 limit=32768
=====================================================
BUG: KMSAN: uninit-value in gfs2_metatype_check_i fs/gfs2/util.h:125 [inline]
BUG: KMSAN: uninit-value in gfs2_quota_init+0x1c1d/0x2150 fs/gfs2/quota.c:1443
gfs2_metatype_check_i fs/gfs2/util.h:125 [inline]
gfs2_quota_init+0x1c1d/0x2150 fs/gfs2/quota.c:1443
gfs2_make_fs_rw+0x4cf/0x6a0 fs/gfs2/super.c:155
gfs2_fill_super+0x410e/0x42b0 fs/gfs2/ops_fstype.c:1288
get_tree_bdev+0x681/0x890 fs/super.c:1614
gfs2_get_tree+0x5c/0x340 fs/gfs2/ops_fstype.c:1341
vfs_get_tree+0xa7/0x570 fs/super.c:1779
do_new_mount+0x71f/0x15e0 fs/namespace.c:3352
path_mount+0x742/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x725/0x810 fs/namespace.c:3875
__x64_sys_mount+0xe4/0x150 fs/namespace.c:3875
x64_sys_call+0x2bf4/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:166
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
__alloc_pages+0x9d6/0xe70 mm/page_alloc.c:4598
alloc_pages_mpol+0x299/0x990 mm/mempolicy.c:2264
alloc_pages mm/mempolicy.c:2335 [inline]
folio_alloc+0x1d0/0x230 mm/mempolicy.c:2342
filemap_alloc_folio+0xa6/0x440 mm/filemap.c:984
__filemap_get_folio+0xa10/0x14b0 mm/filemap.c:1926
gfs2_getbuf+0x23f/0xcd0 fs/gfs2/meta_io.c:132
gfs2_meta_ra+0x17f/0x7b0 fs/gfs2/meta_io.c:522
gfs2_quota_init+0x784/0x2150 fs/gfs2/quota.c:1440
gfs2_make_fs_rw+0x4cf/0x6a0 fs/gfs2/super.c:155
gfs2_fill_super+0x410e/0x42b0 fs/gfs2/ops_fstype.c:1288
get_tree_bdev+0x681/0x890 fs/super.c:1614
gfs2_get_tree+0x5c/0x340 fs/gfs2/ops_fstype.c:1341
vfs_get_tree+0xa7/0x570 fs/super.c:1779
do_new_mount+0x71f/0x15e0 fs/namespace.c:3352
path_mount+0x742/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x725/0x810 fs/namespace.c:3875
__x64_sys_mount+0xe4/0x150 fs/namespace.c:3875
x64_sys_call+0x2bf4/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:166
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 PID: 5867 Comm: syz-executor.3 Not tainted 6.9.0-syzkaller-02707-g614da38e2f7a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
=====================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup