* [syzbot] [hfs?] KMSAN: uninit-value in hfs_iget
@ 2024-09-23 7:44 syzbot
2024-09-23 14:05 ` Edward Adam Davis
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2024-09-23 7:44 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: af9c191ac2a0 Merge tag 'trace-ring-buffer-v6.12' of git://..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1705c107980000
kernel config: https://syzkaller.appspot.com/x/.config?x=547de13ee0a4d284
dashboard link: https://syzkaller.appspot.com/bug?extid=18dd03a3fcf0ffe27da0
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1085c107980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16aa9c27980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2fd24309dcaf/disk-af9c191a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/37cd070c7ff6/vmlinux-af9c191a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/71a3466b8e96/bzImage-af9c191a.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/28d1a4936640/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+18dd03a3fcf0ffe27da0@syzkaller.appspotmail.com
loop0: detected capacity change from 0 to 64
=====================================================
BUG: KMSAN: uninit-value in hfs_iget+0x1be/0x240 fs/hfs/inode.c:403
hfs_iget+0x1be/0x240 fs/hfs/inode.c:403
hfs_lookup+0x2f3/0x3d0 fs/hfs/dir.c:37
lookup_one_qstr_excl+0x238/0x530 fs/namei.c:1633
do_unlinkat+0x2c5/0xe10 fs/namei.c:4521
__do_sys_unlinkat fs/namei.c:4576 [inline]
__se_sys_unlinkat fs/namei.c:4569 [inline]
__x64_sys_unlinkat+0x17a/0x220 fs/namei.c:4569
x64_sys_call+0x2c7a/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:264
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
Local variable rec created at:
hfs_lookup+0x43/0x3d0 fs/hfs/dir.c:23
lookup_one_qstr_excl+0x238/0x530 fs/namei.c:1633
CPU: 1 UID: 0 PID: 5180 Comm: syz-executor419 Not tainted 6.11.0-syzkaller-08829-gaf9c191ac2a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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] 3+ messages in thread
* Re: [syzbot] [hfs?] KMSAN: uninit-value in hfs_iget
2024-09-23 7:44 [syzbot] [hfs?] KMSAN: uninit-value in hfs_iget syzbot
@ 2024-09-23 14:05 ` Edward Adam Davis
2024-09-23 14:51 ` syzbot
0 siblings, 1 reply; 3+ messages in thread
From: Edward Adam Davis @ 2024-09-23 14:05 UTC (permalink / raw)
To: syzbot+18dd03a3fcf0ffe27da0; +Cc: linux-fsdevel, linux-kernel, syzkaller-bugs
When the read data is insufficient to fill the rec, use 0 to fill it
#syz test
diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c
index ef9498a6e88a..f0292b76e3d4 100644
--- a/fs/hfs/bfind.c
+++ b/fs/hfs/bfind.c
@@ -168,6 +168,8 @@ int hfs_brec_read(struct hfs_find_data *fd, void *rec, int rec_len)
if (fd->entrylength > rec_len)
return -EINVAL;
hfs_bnode_read(fd->bnode, rec, fd->entryoffset, fd->entrylength);
+ if (rec_len > fd->entrylength)
+ memset(rec + fd->entrylength, 0, rec_len - fd->entrylength);
return 0;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-23 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23 7:44 [syzbot] [hfs?] KMSAN: uninit-value in hfs_iget syzbot
2024-09-23 14:05 ` Edward Adam Davis
2024-09-23 14:51 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox