* [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork
@ 2024-05-06 7:01 syzbot
2024-10-22 21:25 ` [syzbot] [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork; test if repro still valid syzbot
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: syzbot @ 2024-05-06 7:01 UTC (permalink / raw)
To: linux-fsdevel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: b9158815de52 Merge tag 'char-misc-6.9-rc7' of git://git.ke..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15154bff180000
kernel config: https://syzkaller.appspot.com/x/.config?x=bbf567496022057b
dashboard link: https://syzkaller.appspot.com/bug?extid=2e6fb1f89ce5e13cd02d
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=1262fb38980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1530bdc4980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7886d49e8de8/disk-b9158815.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7909f40ff65c/vmlinux-b9158815.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7641fb86043d/bzImage-b9158815.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/aeab32d02708/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2e6fb1f89ce5e13cd02d@syzkaller.appspotmail.com
=====================================================
BUG: KMSAN: uninit-value in __hfs_ext_read_extent fs/hfs/extent.c:160 [inline]
BUG: KMSAN: uninit-value in hfs_free_fork+0x6b4/0xa50 fs/hfs/extent.c:320
__hfs_ext_read_extent fs/hfs/extent.c:160 [inline]
hfs_free_fork+0x6b4/0xa50 fs/hfs/extent.c:320
hfs_cat_delete+0x501/0xb90 fs/hfs/catalog.c:247
hfs_remove+0x16a/0x2f0 fs/hfs/dir.c:262
vfs_unlink+0x676/0xa30 fs/namei.c:4335
do_unlinkat+0x823/0xe10 fs/namei.c:4399
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0x78/0xb0 fs/namei.c:4445
x64_sys_call+0x31c7/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:88
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:
slab_post_alloc_hook mm/slub.c:3804 [inline]
slab_alloc_node mm/slub.c:3845 [inline]
__do_kmalloc_node mm/slub.c:3965 [inline]
__kmalloc+0x6e4/0x1000 mm/slub.c:3979
kmalloc include/linux/slab.h:632 [inline]
hfs_find_init+0x91/0x250 fs/hfs/bfind.c:21
hfs_free_fork+0x3bb/0xa50 fs/hfs/extent.c:316
hfs_cat_delete+0x501/0xb90 fs/hfs/catalog.c:247
hfs_remove+0x16a/0x2f0 fs/hfs/dir.c:262
vfs_unlink+0x676/0xa30 fs/namei.c:4335
do_unlinkat+0x823/0xe10 fs/namei.c:4399
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0x78/0xb0 fs/namei.c:4445
x64_sys_call+0x31c7/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:88
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: 5043 Comm: syz-executor323 Not tainted 6.9.0-rc6-syzkaller-00290-gb9158815de52 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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] 11+ messages in thread* Re: [syzbot] [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork; test if repro still valid
2024-05-06 7:01 [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork syzbot
@ 2024-10-22 21:25 ` syzbot
2024-11-11 19:49 ` [syzbot] KMSAN: uninit-value in hfs_free_fork syzbot
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-10-22 21:25 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork; test if repro still valid
Author: gianf.trad@gmail.com
#syz test
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [syzbot] KMSAN: uninit-value in hfs_free_fork
2024-05-06 7:01 [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork syzbot
2024-10-22 21:25 ` [syzbot] [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork; test if repro still valid syzbot
@ 2024-11-11 19:49 ` syzbot
2024-11-11 19:50 ` syzbot
2024-11-11 19:53 ` syzbot
3 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-11-11 19:49 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: KMSAN: uninit-value in hfs_free_fork
Author: gianf.trad@gmail.com
#syz test
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [syzbot] KMSAN: uninit-value in hfs_free_fork
2024-05-06 7:01 [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork syzbot
2024-10-22 21:25 ` [syzbot] [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork; test if repro still valid syzbot
2024-11-11 19:49 ` [syzbot] KMSAN: uninit-value in hfs_free_fork syzbot
@ 2024-11-11 19:50 ` syzbot
2024-11-11 19:53 ` syzbot
3 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-11-11 19:50 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: KMSAN: uninit-value in hfs_free_fork
Author: gianf.trad@gmail.com
#syz test
diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c
index ef9498a6e88a..c74d864bc29e 100644
--- a/fs/hfs/bfind.c
+++ b/fs/hfs/bfind.c
@@ -18,7 +18,7 @@ int hfs_find_init(struct hfs_btree *tree, struct
hfs_find_data *fd)
fd->tree = tree;
fd->bnode = NULL;
- ptr = kmalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
+ ptr = kzalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
if (!ptr)
return -ENOMEM;
fd->search_key = ptr;
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [syzbot] KMSAN: uninit-value in hfs_free_fork
2024-05-06 7:01 [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork syzbot
` (2 preceding siblings ...)
2024-11-11 19:50 ` syzbot
@ 2024-11-11 19:53 ` syzbot
3 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-11-11 19:53 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: KMSAN: uninit-value in hfs_free_fork
Author: gianf.trad@gmail.com
#syz test
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <41a67fa0-52c7-4089-8cb1-3d3d622cbcff@gmail.com>]
* Re: [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork
[not found] <41a67fa0-52c7-4089-8cb1-3d3d622cbcff@gmail.com>
@ 2024-10-22 22:07 ` syzbot
2024-10-22 22:11 ` Gianfranco Trad
0 siblings, 1 reply; 11+ messages in thread
From: syzbot @ 2024-10-22 22:07 UTC (permalink / raw)
To: gianf.trad, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KMSAN: uninit-value in hfs_free_fork
loop0: detected capacity change from 0 to 64
=====================================================
BUG: KMSAN: uninit-value in __hfs_ext_read_extent fs/hfs/extent.c:160 [inline]
BUG: KMSAN: uninit-value in hfs_free_fork+0x6b4/0xa50 fs/hfs/extent.c:320
__hfs_ext_read_extent fs/hfs/extent.c:160 [inline]
hfs_free_fork+0x6b4/0xa50 fs/hfs/extent.c:320
hfs_cat_delete+0x501/0xb90 fs/hfs/catalog.c:247
hfs_remove+0x16a/0x2f0 fs/hfs/dir.c:262
vfs_unlink+0x676/0xa90 fs/namei.c:4469
do_unlinkat+0x823/0xe10 fs/namei.c:4533
__do_sys_unlink fs/namei.c:4581 [inline]
__se_sys_unlink fs/namei.c:4579 [inline]
__x64_sys_unlink+0x76/0xa0 fs/namei.c:4579
x64_sys_call+0x30d3/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:88
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:
slab_post_alloc_hook mm/slub.c:4091 [inline]
slab_alloc_node mm/slub.c:4134 [inline]
__do_kmalloc_node mm/slub.c:4263 [inline]
__kmalloc_noprof+0x661/0xf30 mm/slub.c:4276
kmalloc_noprof include/linux/slab.h:882 [inline]
hfs_find_init+0x91/0x250 fs/hfs/bfind.c:21
hfs_free_fork+0x3bb/0xa50 fs/hfs/extent.c:316
hfs_cat_delete+0x501/0xb90 fs/hfs/catalog.c:247
hfs_remove+0x16a/0x2f0 fs/hfs/dir.c:262
vfs_unlink+0x676/0xa90 fs/namei.c:4469
do_unlinkat+0x823/0xe10 fs/namei.c:4533
__do_sys_unlink fs/namei.c:4581 [inline]
__se_sys_unlink fs/namei.c:4579 [inline]
__x64_sys_unlink+0x76/0xa0 fs/namei.c:4579
x64_sys_call+0x30d3/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:88
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: 0 UID: 0 PID: 6057 Comm: syz.0.15 Not tainted 6.12.0-rc4-syzkaller-gc2ee9f594da8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
=====================================================
Tested on:
commit: c2ee9f59 KVM: selftests: Fix build on on non-x86 archi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11d8ca5f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=fa3d7fc2fd6ea40d
dashboard link: https://syzkaller.appspot.com/bug?extid=2e6fb1f89ce5e13cd02d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork
2024-10-22 22:07 ` [syzbot] [hfs?] " syzbot
@ 2024-10-22 22:11 ` Gianfranco Trad
2024-10-22 22:40 ` syzbot
0 siblings, 1 reply; 11+ messages in thread
From: Gianfranco Trad @ 2024-10-22 22:11 UTC (permalink / raw)
To: syzbot, linux-kernel, syzkaller-bugs
[-- Attachment #1: Type: text/plain, Size: 9 bytes --]
#syz test
[-- Attachment #2: 0001-hfs-use-kzalloc-in-hfs_find_init.patch --]
[-- Type: text/x-patch, Size: 770 bytes --]
From 0fb9dbd8a0e88e6e4011c9c97701f40b8d845831 Mon Sep 17 00:00:00 2001
From: Gianfranco Trad <gianf.trad@gmail.com>
Date: Wed, 23 Oct 2024 00:10:04 +0200
Subject: [PATCH] hfs: use kzalloc in hfs_find_init()
Signed-off-by: Gianfranco Trad <gianf.trad@gmail.com>
---
fs/hfs/bfind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c
index ef9498a6e88a..c74d864bc29e 100644
--- a/fs/hfs/bfind.c
+++ b/fs/hfs/bfind.c
@@ -18,7 +18,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
fd->tree = tree;
fd->bnode = NULL;
- ptr = kmalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
+ ptr = kzalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
if (!ptr)
return -ENOMEM;
fd->search_key = ptr;
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
[parent not found: <18374947-f71e-4f71-b097-f06eb0699bfa@gmail.com>]
[parent not found: <429d2bea-ef68-4130-bb8a-0fb5fd38663c@gmail.com>]
* Re: [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork
[not found] <429d2bea-ef68-4130-bb8a-0fb5fd38663c@gmail.com>
@ 2024-11-11 20:21 ` syzbot
0 siblings, 0 replies; 11+ messages in thread
From: syzbot @ 2024-11-11 20:21 UTC (permalink / raw)
To: gianf.trad, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KMSAN: uninit-value in hfs_free_fork
loop0: detected capacity change from 0 to 64
=====================================================
BUG: KMSAN: uninit-value in __hfs_ext_read_extent fs/hfs/extent.c:160 [inline]
BUG: KMSAN: uninit-value in hfs_free_fork+0x6b4/0xa50 fs/hfs/extent.c:320
__hfs_ext_read_extent fs/hfs/extent.c:160 [inline]
hfs_free_fork+0x6b4/0xa50 fs/hfs/extent.c:320
hfs_cat_delete+0x501/0xb90 fs/hfs/catalog.c:247
hfs_remove+0x16a/0x2f0 fs/hfs/dir.c:262
vfs_unlink+0x676/0xa90 fs/namei.c:4469
do_unlinkat+0x823/0xe10 fs/namei.c:4533
__do_sys_unlink fs/namei.c:4581 [inline]
__se_sys_unlink fs/namei.c:4579 [inline]
__x64_sys_unlink+0x76/0xa0 fs/namei.c:4579
x64_sys_call+0x30d3/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:88
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:
slab_post_alloc_hook mm/slub.c:4091 [inline]
slab_alloc_node mm/slub.c:4134 [inline]
__do_kmalloc_node mm/slub.c:4263 [inline]
__kmalloc_noprof+0x661/0xf30 mm/slub.c:4276
kmalloc_noprof include/linux/slab.h:882 [inline]
hfs_find_init+0x91/0x250 fs/hfs/bfind.c:21
hfs_free_fork+0x3bb/0xa50 fs/hfs/extent.c:316
hfs_cat_delete+0x501/0xb90 fs/hfs/catalog.c:247
hfs_remove+0x16a/0x2f0 fs/hfs/dir.c:262
vfs_unlink+0x676/0xa90 fs/namei.c:4469
do_unlinkat+0x823/0xe10 fs/namei.c:4533
__do_sys_unlink fs/namei.c:4581 [inline]
__se_sys_unlink fs/namei.c:4579 [inline]
__x64_sys_unlink+0x76/0xa0 fs/namei.c:4579
x64_sys_call+0x30d3/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:88
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: 6013 Comm: syz.0.15 Not tainted 6.12.0-rc7-syzkaller-g2d5404caa8c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
=====================================================
Tested on:
commit: 2d5404ca Linux 6.12-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12cd38c0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d1e659028faecb9
dashboard link: https://syzkaller.appspot.com/bug?extid=2e6fb1f89ce5e13cd02d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <6f129270-4c3c-454b-831b-4fe2f5597bc7@gmail.com>]
end of thread, other threads:[~2024-11-11 20:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 7:01 [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork syzbot
2024-10-22 21:25 ` [syzbot] [syzbot] [hfs?] KMSAN: uninit-value in hfs_free_fork; test if repro still valid syzbot
2024-11-11 19:49 ` [syzbot] KMSAN: uninit-value in hfs_free_fork syzbot
2024-11-11 19:50 ` syzbot
2024-11-11 19:53 ` syzbot
[not found] <41a67fa0-52c7-4089-8cb1-3d3d622cbcff@gmail.com>
2024-10-22 22:07 ` [syzbot] [hfs?] " syzbot
2024-10-22 22:11 ` Gianfranco Trad
2024-10-22 22:40 ` syzbot
[not found] <18374947-f71e-4f71-b097-f06eb0699bfa@gmail.com>
2024-11-11 20:21 ` syzbot
[not found] <429d2bea-ef68-4130-bb8a-0fb5fd38663c@gmail.com>
2024-11-11 20:21 ` syzbot
[not found] <6f129270-4c3c-454b-831b-4fe2f5597bc7@gmail.com>
2024-11-11 20:49 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox