* [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super
@ 2024-12-29 7:45 syzbot
2024-12-30 2:53 ` Gao Xiang
0 siblings, 1 reply; 6+ messages in thread
From: syzbot @ 2024-12-29 7:45 UTC (permalink / raw)
To: chao, dhavale, jefflexu, linux-erofs, linux-kernel,
syzkaller-bugs, xiang, zbestahu
Hello,
syzbot found the following issue on:
HEAD commit: 9b2ffa6148b1 Merge tag 'mtd/fixes-for-6.13-rc5' of git://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=112374c4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f9048090d7bb0d06
dashboard link: https://syzkaller.appspot.com/bug?extid=1379ee6b9a14d5dacaf2
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/244f25c1a275/disk-9b2ffa61.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0d14fc6634fd/vmlinux-9b2ffa61.xz
kernel image: https://storage.googleapis.com/syzbot-assets/cb152a4c0fd2/bzImage-9b2ffa61.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1379ee6b9a14d5dacaf2@syzkaller.appspotmail.com
exFAT-fs (loop7): failed to load upcase table (idx : 0x00010000, chksum : 0x1a9973fb, utbl_chksum : 0xe619d30d)
=====================================================
BUG: KMSAN: uninit-value in erofs_read_superblock fs/erofs/super.c:274 [inline]
BUG: KMSAN: uninit-value in erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
erofs_read_superblock fs/erofs/super.c:274 [inline]
erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
vfs_get_super fs/super.c:1280 [inline]
get_tree_nodev+0x183/0x350 fs/super.c:1299
erofs_fc_get_tree+0x34d/0x450 fs/erofs/super.c:721
vfs_get_tree+0xb1/0x5a0 fs/super.c:1814
do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
path_mount+0x742/0x1f10 fs/namespace.c:3834
do_mount fs/namespace.c:3847 [inline]
__do_sys_mount fs/namespace.c:4057 [inline]
__se_sys_mount+0x722/0x810 fs/namespace.c:4034
__x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
x64_sys_call+0x39bf/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:166
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was created at:
__alloc_pages_noprof+0x9a7/0xe00 mm/page_alloc.c:4776
alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2269
alloc_pages_noprof mm/mempolicy.c:2348 [inline]
folio_alloc_noprof+0x1db/0x310 mm/mempolicy.c:2355
filemap_alloc_folio_noprof+0xa6/0x440 mm/filemap.c:1009
__filemap_get_folio+0xac4/0x1550 mm/filemap.c:1951
block_write_begin+0x6e/0x2b0 fs/buffer.c:2221
exfat_write_begin+0xfb/0x400 fs/exfat/inode.c:434
exfat_extend_valid_size fs/exfat/file.c:553 [inline]
exfat_file_write_iter+0x771/0x12a0 fs/exfat/file.c:598
do_iter_readv_writev+0x88a/0xa30
vfs_writev+0x56a/0x14f0 fs/read_write.c:1050
do_pwritev fs/read_write.c:1146 [inline]
__do_sys_pwritev2 fs/read_write.c:1204 [inline]
__se_sys_pwritev2+0x262/0x460 fs/read_write.c:1195
__x64_sys_pwritev2+0x11f/0x1a0 fs/read_write.c:1195
x64_sys_call+0x368c/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:329
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
CPU: 1 UID: 0 PID: 8448 Comm: syz.7.643 Not tainted 6.13.0-rc4-syzkaller-00012-g9b2ffa6148b1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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@googlegroups.com.
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super
2024-12-29 7:45 [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super syzbot
@ 2024-12-30 2:53 ` Gao Xiang
0 siblings, 0 replies; 6+ messages in thread
From: Gao Xiang via Linux-erofs @ 2024-12-30 2:53 UTC (permalink / raw)
To: Namjae Jeon, Sungjong Seo, Yuezhang Mo, syzbot
Cc: syzkaller-bugs, linux-erofs, linux-kernel
Hi exfat maintainers,
On Sat, Dec 28, 2024 at 11:45:22PM -0800, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9b2ffa6148b1 Merge tag 'mtd/fixes-for-6.13-rc5' of git://g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=112374c4580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f9048090d7bb0d06
> dashboard link: https://syzkaller.appspot.com/bug?extid=1379ee6b9a14d5dacaf2
> 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/244f25c1a275/disk-9b2ffa61.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/0d14fc6634fd/vmlinux-9b2ffa61.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/cb152a4c0fd2/bzImage-9b2ffa61.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1379ee6b9a14d5dacaf2@syzkaller.appspotmail.com
>
> exFAT-fs (loop7): failed to load upcase table (idx : 0x00010000, chksum : 0x1a9973fb, utbl_chksum : 0xe619d30d)
> =====================================================
> BUG: KMSAN: uninit-value in erofs_read_superblock fs/erofs/super.c:274 [inline]
> BUG: KMSAN: uninit-value in erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> erofs_read_superblock fs/erofs/super.c:274 [inline]
> erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> vfs_get_super fs/super.c:1280 [inline]
> get_tree_nodev+0x183/0x350 fs/super.c:1299
> erofs_fc_get_tree+0x34d/0x450 fs/erofs/super.c:721
> vfs_get_tree+0xb1/0x5a0 fs/super.c:1814
> do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
> path_mount+0x742/0x1f10 fs/namespace.c:3834
> do_mount fs/namespace.c:3847 [inline]
> __do_sys_mount fs/namespace.c:4057 [inline]
> __se_sys_mount+0x722/0x810 fs/namespace.c:4034
> __x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
> x64_sys_call+0x39bf/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:166
> do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Uninit was created at:
> __alloc_pages_noprof+0x9a7/0xe00 mm/page_alloc.c:4776
> alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2269
> alloc_pages_noprof mm/mempolicy.c:2348 [inline]
> folio_alloc_noprof+0x1db/0x310 mm/mempolicy.c:2355
> filemap_alloc_folio_noprof+0xa6/0x440 mm/filemap.c:1009
> __filemap_get_folio+0xac4/0x1550 mm/filemap.c:1951
> block_write_begin+0x6e/0x2b0 fs/buffer.c:2221
> exfat_write_begin+0xfb/0x400 fs/exfat/inode.c:434
> exfat_extend_valid_size fs/exfat/file.c:553 [inline]
> exfat_file_write_iter+0x771/0x12a0 fs/exfat/file.c:598
> do_iter_readv_writev+0x88a/0xa30
> vfs_writev+0x56a/0x14f0 fs/read_write.c:1050
> do_pwritev fs/read_write.c:1146 [inline]
> __do_sys_pwritev2 fs/read_write.c:1204 [inline]
> __se_sys_pwritev2+0x262/0x460 fs/read_write.c:1195
> __x64_sys_pwritev2+0x11f/0x1a0 fs/read_write.c:1195
> x64_sys_call+0x368c/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:329
> do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
Currently, I don't think it's an EROFS issue but since it doesn't have
a valid reproducer so I don't have an exact idea.
This case is out of EROFS file-backed mount, which seems to read EROFS
superblock (erofs_read_superblock -> erofs_read_metabuf -> erofs_bread)
via exfat page cache:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/erofs/super.c?h=v6.13-rc5#n274
But it seems exfat returns an unlocked uptodate page without fully
initialized data.
I'm not sure if it's a post-EOF read for this specific regular inode,
but IMHO, at least mmap read allows post-EOF read within the same page,
so it'd be better to leave the whole page initialized on the exfat side.
I'm not sure if it's related to exfat_extend_valid_size() though.
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super
@ 2024-12-30 2:53 ` Gao Xiang
0 siblings, 0 replies; 6+ messages in thread
From: Gao Xiang @ 2024-12-30 2:53 UTC (permalink / raw)
To: Namjae Jeon, Sungjong Seo, Yuezhang Mo, syzbot
Cc: linux-erofs, linux-kernel, syzkaller-bugs
Hi exfat maintainers,
On Sat, Dec 28, 2024 at 11:45:22PM -0800, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 9b2ffa6148b1 Merge tag 'mtd/fixes-for-6.13-rc5' of git://g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=112374c4580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f9048090d7bb0d06
> dashboard link: https://syzkaller.appspot.com/bug?extid=1379ee6b9a14d5dacaf2
> 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/244f25c1a275/disk-9b2ffa61.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/0d14fc6634fd/vmlinux-9b2ffa61.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/cb152a4c0fd2/bzImage-9b2ffa61.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1379ee6b9a14d5dacaf2@syzkaller.appspotmail.com
>
> exFAT-fs (loop7): failed to load upcase table (idx : 0x00010000, chksum : 0x1a9973fb, utbl_chksum : 0xe619d30d)
> =====================================================
> BUG: KMSAN: uninit-value in erofs_read_superblock fs/erofs/super.c:274 [inline]
> BUG: KMSAN: uninit-value in erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> erofs_read_superblock fs/erofs/super.c:274 [inline]
> erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> vfs_get_super fs/super.c:1280 [inline]
> get_tree_nodev+0x183/0x350 fs/super.c:1299
> erofs_fc_get_tree+0x34d/0x450 fs/erofs/super.c:721
> vfs_get_tree+0xb1/0x5a0 fs/super.c:1814
> do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
> path_mount+0x742/0x1f10 fs/namespace.c:3834
> do_mount fs/namespace.c:3847 [inline]
> __do_sys_mount fs/namespace.c:4057 [inline]
> __se_sys_mount+0x722/0x810 fs/namespace.c:4034
> __x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
> x64_sys_call+0x39bf/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:166
> do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Uninit was created at:
> __alloc_pages_noprof+0x9a7/0xe00 mm/page_alloc.c:4776
> alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2269
> alloc_pages_noprof mm/mempolicy.c:2348 [inline]
> folio_alloc_noprof+0x1db/0x310 mm/mempolicy.c:2355
> filemap_alloc_folio_noprof+0xa6/0x440 mm/filemap.c:1009
> __filemap_get_folio+0xac4/0x1550 mm/filemap.c:1951
> block_write_begin+0x6e/0x2b0 fs/buffer.c:2221
> exfat_write_begin+0xfb/0x400 fs/exfat/inode.c:434
> exfat_extend_valid_size fs/exfat/file.c:553 [inline]
> exfat_file_write_iter+0x771/0x12a0 fs/exfat/file.c:598
> do_iter_readv_writev+0x88a/0xa30
> vfs_writev+0x56a/0x14f0 fs/read_write.c:1050
> do_pwritev fs/read_write.c:1146 [inline]
> __do_sys_pwritev2 fs/read_write.c:1204 [inline]
> __se_sys_pwritev2+0x262/0x460 fs/read_write.c:1195
> __x64_sys_pwritev2+0x11f/0x1a0 fs/read_write.c:1195
> x64_sys_call+0x368c/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:329
> do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
Currently, I don't think it's an EROFS issue but since it doesn't have
a valid reproducer so I don't have an exact idea.
This case is out of EROFS file-backed mount, which seems to read EROFS
superblock (erofs_read_superblock -> erofs_read_metabuf -> erofs_bread)
via exfat page cache:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/erofs/super.c?h=v6.13-rc5#n274
But it seems exfat returns an unlocked uptodate page without fully
initialized data.
I'm not sure if it's a post-EOF read for this specific regular inode,
but IMHO, at least mmap read allows post-EOF read within the same page,
so it'd be better to leave the whole page initialized on the exfat side.
I'm not sure if it's related to exfat_extend_valid_size() though.
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super
2024-12-30 2:53 ` Gao Xiang
@ 2024-12-30 4:33 ` Namjae Jeon
-1 siblings, 0 replies; 6+ messages in thread
From: Namjae Jeon via Linux-erofs @ 2024-12-30 4:33 UTC (permalink / raw)
To: Namjae Jeon, Sungjong Seo, Yuezhang Mo, syzbot, linux-erofs,
linux-kernel, syzkaller-bugs
On Mon, Dec 30, 2024 at 11:53 AM Gao Xiang <xiang@kernel.org> wrote:
>
> Hi exfat maintainers,
Hi Gao,
We have a patch for this and will send a PR to Linus soon.
Thanks!
>
> On Sat, Dec 28, 2024 at 11:45:22PM -0800, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 9b2ffa6148b1 Merge tag 'mtd/fixes-for-6.13-rc5' of git://g..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=112374c4580000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=f9048090d7bb0d06
> > dashboard link: https://syzkaller.appspot.com/bug?extid=1379ee6b9a14d5dacaf2
> > 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/244f25c1a275/disk-9b2ffa61.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/0d14fc6634fd/vmlinux-9b2ffa61.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/cb152a4c0fd2/bzImage-9b2ffa61.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+1379ee6b9a14d5dacaf2@syzkaller.appspotmail.com
> >
> > exFAT-fs (loop7): failed to load upcase table (idx : 0x00010000, chksum : 0x1a9973fb, utbl_chksum : 0xe619d30d)
> > =====================================================
> > BUG: KMSAN: uninit-value in erofs_read_superblock fs/erofs/super.c:274 [inline]
> > BUG: KMSAN: uninit-value in erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> > erofs_read_superblock fs/erofs/super.c:274 [inline]
> > erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> > vfs_get_super fs/super.c:1280 [inline]
> > get_tree_nodev+0x183/0x350 fs/super.c:1299
> > erofs_fc_get_tree+0x34d/0x450 fs/erofs/super.c:721
> > vfs_get_tree+0xb1/0x5a0 fs/super.c:1814
> > do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
> > path_mount+0x742/0x1f10 fs/namespace.c:3834
> > do_mount fs/namespace.c:3847 [inline]
> > __do_sys_mount fs/namespace.c:4057 [inline]
> > __se_sys_mount+0x722/0x810 fs/namespace.c:4034
> > __x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
> > x64_sys_call+0x39bf/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:166
> > do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> > do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> > entry_SYSCALL_64_after_hwframe+0x77/0x7f
> >
> > Uninit was created at:
> > __alloc_pages_noprof+0x9a7/0xe00 mm/page_alloc.c:4776
> > alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2269
> > alloc_pages_noprof mm/mempolicy.c:2348 [inline]
> > folio_alloc_noprof+0x1db/0x310 mm/mempolicy.c:2355
> > filemap_alloc_folio_noprof+0xa6/0x440 mm/filemap.c:1009
> > __filemap_get_folio+0xac4/0x1550 mm/filemap.c:1951
> > block_write_begin+0x6e/0x2b0 fs/buffer.c:2221
> > exfat_write_begin+0xfb/0x400 fs/exfat/inode.c:434
> > exfat_extend_valid_size fs/exfat/file.c:553 [inline]
> > exfat_file_write_iter+0x771/0x12a0 fs/exfat/file.c:598
> > do_iter_readv_writev+0x88a/0xa30
> > vfs_writev+0x56a/0x14f0 fs/read_write.c:1050
> > do_pwritev fs/read_write.c:1146 [inline]
> > __do_sys_pwritev2 fs/read_write.c:1204 [inline]
> > __se_sys_pwritev2+0x262/0x460 fs/read_write.c:1195
> > __x64_sys_pwritev2+0x11f/0x1a0 fs/read_write.c:1195
> > x64_sys_call+0x368c/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:329
> > do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> > do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> > entry_SYSCALL_64_after_hwframe+0x77/0x7f
> >
>
> Currently, I don't think it's an EROFS issue but since it doesn't have
> a valid reproducer so I don't have an exact idea.
>
> This case is out of EROFS file-backed mount, which seems to read EROFS
> superblock (erofs_read_superblock -> erofs_read_metabuf -> erofs_bread)
> via exfat page cache:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/erofs/super.c?h=v6.13-rc5#n274
>
> But it seems exfat returns an unlocked uptodate page without fully
> initialized data.
>
> I'm not sure if it's a post-EOF read for this specific regular inode,
> but IMHO, at least mmap read allows post-EOF read within the same page,
> so it'd be better to leave the whole page initialized on the exfat side.
>
> I'm not sure if it's related to exfat_extend_valid_size() though.
>
> Thanks,
> Gao Xiang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super
@ 2024-12-30 4:33 ` Namjae Jeon
0 siblings, 0 replies; 6+ messages in thread
From: Namjae Jeon @ 2024-12-30 4:33 UTC (permalink / raw)
To: Namjae Jeon, Sungjong Seo, Yuezhang Mo, syzbot, linux-erofs,
linux-kernel, syzkaller-bugs
On Mon, Dec 30, 2024 at 11:53 AM Gao Xiang <xiang@kernel.org> wrote:
>
> Hi exfat maintainers,
Hi Gao,
We have a patch for this and will send a PR to Linus soon.
Thanks!
>
> On Sat, Dec 28, 2024 at 11:45:22PM -0800, syzbot wrote:
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 9b2ffa6148b1 Merge tag 'mtd/fixes-for-6.13-rc5' of git://g..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=112374c4580000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=f9048090d7bb0d06
> > dashboard link: https://syzkaller.appspot.com/bug?extid=1379ee6b9a14d5dacaf2
> > 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/244f25c1a275/disk-9b2ffa61.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/0d14fc6634fd/vmlinux-9b2ffa61.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/cb152a4c0fd2/bzImage-9b2ffa61.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+1379ee6b9a14d5dacaf2@syzkaller.appspotmail.com
> >
> > exFAT-fs (loop7): failed to load upcase table (idx : 0x00010000, chksum : 0x1a9973fb, utbl_chksum : 0xe619d30d)
> > =====================================================
> > BUG: KMSAN: uninit-value in erofs_read_superblock fs/erofs/super.c:274 [inline]
> > BUG: KMSAN: uninit-value in erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> > erofs_read_superblock fs/erofs/super.c:274 [inline]
> > erofs_fc_fill_super+0x66a/0x2520 fs/erofs/super.c:614
> > vfs_get_super fs/super.c:1280 [inline]
> > get_tree_nodev+0x183/0x350 fs/super.c:1299
> > erofs_fc_get_tree+0x34d/0x450 fs/erofs/super.c:721
> > vfs_get_tree+0xb1/0x5a0 fs/super.c:1814
> > do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
> > path_mount+0x742/0x1f10 fs/namespace.c:3834
> > do_mount fs/namespace.c:3847 [inline]
> > __do_sys_mount fs/namespace.c:4057 [inline]
> > __se_sys_mount+0x722/0x810 fs/namespace.c:4034
> > __x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
> > x64_sys_call+0x39bf/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:166
> > do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> > do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> > entry_SYSCALL_64_after_hwframe+0x77/0x7f
> >
> > Uninit was created at:
> > __alloc_pages_noprof+0x9a7/0xe00 mm/page_alloc.c:4776
> > alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2269
> > alloc_pages_noprof mm/mempolicy.c:2348 [inline]
> > folio_alloc_noprof+0x1db/0x310 mm/mempolicy.c:2355
> > filemap_alloc_folio_noprof+0xa6/0x440 mm/filemap.c:1009
> > __filemap_get_folio+0xac4/0x1550 mm/filemap.c:1951
> > block_write_begin+0x6e/0x2b0 fs/buffer.c:2221
> > exfat_write_begin+0xfb/0x400 fs/exfat/inode.c:434
> > exfat_extend_valid_size fs/exfat/file.c:553 [inline]
> > exfat_file_write_iter+0x771/0x12a0 fs/exfat/file.c:598
> > do_iter_readv_writev+0x88a/0xa30
> > vfs_writev+0x56a/0x14f0 fs/read_write.c:1050
> > do_pwritev fs/read_write.c:1146 [inline]
> > __do_sys_pwritev2 fs/read_write.c:1204 [inline]
> > __se_sys_pwritev2+0x262/0x460 fs/read_write.c:1195
> > __x64_sys_pwritev2+0x11f/0x1a0 fs/read_write.c:1195
> > x64_sys_call+0x368c/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:329
> > do_syscall_x64 arch/x86/entry/common.c:52 [inline]
> > do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
> > entry_SYSCALL_64_after_hwframe+0x77/0x7f
> >
>
> Currently, I don't think it's an EROFS issue but since it doesn't have
> a valid reproducer so I don't have an exact idea.
>
> This case is out of EROFS file-backed mount, which seems to read EROFS
> superblock (erofs_read_superblock -> erofs_read_metabuf -> erofs_bread)
> via exfat page cache:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/erofs/super.c?h=v6.13-rc5#n274
>
> But it seems exfat returns an unlocked uptodate page without fully
> initialized data.
>
> I'm not sure if it's a post-EOF read for this specific regular inode,
> but IMHO, at least mmap read allows post-EOF read within the same page,
> so it'd be better to leave the whole page initialized on the exfat side.
>
> I'm not sure if it's related to exfat_extend_valid_size() though.
>
> Thanks,
> Gao Xiang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super
2024-12-30 4:33 ` Namjae Jeon
(?)
@ 2024-12-30 6:13 ` Gao Xiang
-1 siblings, 0 replies; 6+ messages in thread
From: Gao Xiang @ 2024-12-30 6:13 UTC (permalink / raw)
To: Namjae Jeon, Sungjong Seo, Yuezhang Mo, syzbot, linux-erofs,
linux-kernel, syzkaller-bugs
Hi Namjae,
On 2024/12/30 12:33, Namjae Jeon via Linux-erofs wrote:
> On Mon, Dec 30, 2024 at 11:53 AM Gao Xiang <xiang@kernel.org> wrote:
>>
>> Hi exfat maintainers,
> Hi Gao,
>
> We have a patch for this and will send a PR to Linus soon.
> Thanks!
Many thanks! So good to hear that. Also (just friendly in
case) it would be helpful to add the following reported-by
to close this syzbot issue..
Anyway, if addresses at the exfat side:
#syz set subsystems: exfat
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-30 6:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-29 7:45 [syzbot] [erofs?] KMSAN: uninit-value in erofs_fc_fill_super syzbot
2024-12-30 2:53 ` Gao Xiang via Linux-erofs
2024-12-30 2:53 ` Gao Xiang
2024-12-30 4:33 ` Namjae Jeon via Linux-erofs
2024-12-30 4:33 ` Namjae Jeon
2024-12-30 6:13 ` Gao Xiang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.