From: syzbot <syzbot+3932ccb896e06f7414c9@syzkaller.appspotmail.com>
To: eadavis@qq.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [ntfs3?] memory leak in ni_add_subrecord
Date: Mon, 10 Nov 2025 17:20:02 -0800 [thread overview]
Message-ID: <69128f42.a70a0220.22f260.0119.GAE@google.com> (raw)
In-Reply-To: <tencent_56925ADDFB5DC999044FF38DF625928D8507@qq.com>
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in ni_add_subrecord
BUG: memory leak
unreferenced object 0xffff888126a90e00 (size 128):
comm "syz.0.17", pid 6726, jiffies 4294946753
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 b8 51 13 81 88 ff ff ..........Q.....
backtrace (crc 5c7e5ed8):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4979 [inline]
slab_alloc_node mm/slub.c:5284 [inline]
__kmalloc_cache_noprof+0x3a6/0x5b0 mm/slub.c:5762
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
ni_add_subrecord+0x31/0x180 fs/ntfs3/frecord.c:317
ntfs_look_free_mft+0xf0/0x790 fs/ntfs3/fsntfs.c:715
ni_ins_attr_ext+0x40c/0x690 fs/ntfs3/frecord.c:988
ni_insert_attr+0x1d1/0x480 fs/ntfs3/frecord.c:1091
ni_insert_resident+0x85/0x140 fs/ntfs3/frecord.c:1475
ni_add_name+0x15b/0x2e0 fs/ntfs3/frecord.c:2987
ni_rename+0x4c/0x100 fs/ntfs3/frecord.c:3026
ntfs_rename+0x46c/0x5d0 fs/ntfs3/namei.c:332
vfs_rename+0x94b/0x1340 fs/namei.c:5216
do_renameat2+0x5f5/0x870 fs/namei.c:5364
__do_sys_rename fs/namei.c:5411 [inline]
__se_sys_rename fs/namei.c:5409 [inline]
__x64_sys_rename+0x42/0x50 fs/namei.c:5409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xa4/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
BUG: memory leak
unreferenced object 0xffff888108b8c400 (size 1024):
comm "syz.0.17", pid 6726, jiffies 4294946753
hex dump (first 32 bytes):
46 49 4c 45 2a 00 03 00 00 00 00 00 00 00 00 00 FILE*...........
03 00 00 00 30 00 01 00 88 02 00 00 00 04 00 00 ....0...........
backtrace (crc 7197c55e):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4979 [inline]
slab_alloc_node mm/slub.c:5284 [inline]
__do_kmalloc_node mm/slub.c:5645 [inline]
__kmalloc_noprof+0x3e3/0x6b0 mm/slub.c:5658
kmalloc_noprof include/linux/slab.h:961 [inline]
mi_init+0x2b/0x50 fs/ntfs3/record.c:105
mi_format_new+0x40/0x220 fs/ntfs3/record.c:422
ni_add_subrecord+0x6b/0x180 fs/ntfs3/frecord.c:321
ntfs_look_free_mft+0xf0/0x790 fs/ntfs3/fsntfs.c:715
ni_ins_attr_ext+0x40c/0x690 fs/ntfs3/frecord.c:988
ni_insert_attr+0x1d1/0x480 fs/ntfs3/frecord.c:1091
ni_insert_resident+0x85/0x140 fs/ntfs3/frecord.c:1475
ni_add_name+0x15b/0x2e0 fs/ntfs3/frecord.c:2987
ni_rename+0x4c/0x100 fs/ntfs3/frecord.c:3026
ntfs_rename+0x46c/0x5d0 fs/ntfs3/namei.c:332
vfs_rename+0x94b/0x1340 fs/namei.c:5216
do_renameat2+0x5f5/0x870 fs/namei.c:5364
__do_sys_rename fs/namei.c:5411 [inline]
__se_sys_rename fs/namei.c:5409 [inline]
__x64_sys_rename+0x42/0x50 fs/namei.c:5409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xa4/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
BUG: memory leak
unreferenced object 0xffff88812586cb00 (size 128):
comm "syz.0.18", pid 6736, jiffies 4294946763
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 e8 f5 0e 81 88 ff ff ................
backtrace (crc db17ea11):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4979 [inline]
slab_alloc_node mm/slub.c:5284 [inline]
__kmalloc_cache_noprof+0x3a6/0x5b0 mm/slub.c:5762
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
ni_add_subrecord+0x31/0x180 fs/ntfs3/frecord.c:317
ntfs_look_free_mft+0xf0/0x790 fs/ntfs3/fsntfs.c:715
ni_ins_attr_ext+0x40c/0x690 fs/ntfs3/frecord.c:988
ni_insert_attr+0x1d1/0x480 fs/ntfs3/frecord.c:1091
ni_insert_resident+0x85/0x140 fs/ntfs3/frecord.c:1475
ni_add_name+0x15b/0x2e0 fs/ntfs3/frecord.c:2987
ni_rename+0x4c/0x100 fs/ntfs3/frecord.c:3026
ntfs_rename+0x46c/0x5d0 fs/ntfs3/namei.c:332
vfs_rename+0x94b/0x1340 fs/namei.c:5216
do_renameat2+0x5f5/0x870 fs/namei.c:5364
__do_sys_rename fs/namei.c:5411 [inline]
__se_sys_rename fs/namei.c:5409 [inline]
__x64_sys_rename+0x42/0x50 fs/namei.c:5409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xa4/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
BUG: memory leak
unreferenced object 0xffff8881275a6000 (size 1024):
comm "syz.0.18", pid 6736, jiffies 4294946763
hex dump (first 32 bytes):
46 49 4c 45 2a 00 03 00 00 00 00 00 00 00 00 00 FILE*...........
03 00 00 00 30 00 01 00 88 02 00 00 00 04 00 00 ....0...........
backtrace (crc 7197c55e):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4979 [inline]
slab_alloc_node mm/slub.c:5284 [inline]
__do_kmalloc_node mm/slub.c:5645 [inline]
__kmalloc_noprof+0x3e3/0x6b0 mm/slub.c:5658
kmalloc_noprof include/linux/slab.h:961 [inline]
mi_init+0x2b/0x50 fs/ntfs3/record.c:105
mi_format_new+0x40/0x220 fs/ntfs3/record.c:422
ni_add_subrecord+0x6b/0x180 fs/ntfs3/frecord.c:321
ntfs_look_free_mft+0xf0/0x790 fs/ntfs3/fsntfs.c:715
ni_ins_attr_ext+0x40c/0x690 fs/ntfs3/frecord.c:988
ni_insert_attr+0x1d1/0x480 fs/ntfs3/frecord.c:1091
ni_insert_resident+0x85/0x140 fs/ntfs3/frecord.c:1475
ni_add_name+0x15b/0x2e0 fs/ntfs3/frecord.c:2987
ni_rename+0x4c/0x100 fs/ntfs3/frecord.c:3026
ntfs_rename+0x46c/0x5d0 fs/ntfs3/namei.c:332
vfs_rename+0x94b/0x1340 fs/namei.c:5216
do_renameat2+0x5f5/0x870 fs/namei.c:5364
__do_sys_rename fs/namei.c:5411 [inline]
__se_sys_rename fs/namei.c:5409 [inline]
__x64_sys_rename+0x42/0x50 fs/namei.c:5409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xa4/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
BUG: memory leak
unreferenced object 0xffff888125f77780 (size 128):
comm "syz.0.19", pid 6746, jiffies 4294946771
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 c8 51 13 81 88 ff ff ..........Q.....
backtrace (crc af0a413f):
kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
slab_post_alloc_hook mm/slub.c:4979 [inline]
slab_alloc_node mm/slub.c:5284 [inline]
__kmalloc_cache_noprof+0x3a6/0x5b0 mm/slub.c:5762
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
ni_add_subrecord+0x31/0x180 fs/ntfs3/frecord.c:317
ntfs_look_free_mft+0xf0/0x790 fs/ntfs3/fsntfs.c:715
ni_ins_attr_ext+0x40c/0x690 fs/ntfs3/frecord.c:988
ni_insert_attr+0x1d1/0x480 fs/ntfs3/frecord.c:1091
ni_insert_resident+0x85/0x140 fs/ntfs3/frecord.c:1475
ni_add_name+0x15b/0x2e0 fs/ntfs3/frecord.c:2987
ni_rename+0x4c/0x100 fs/ntfs3/frecord.c:3026
ntfs_rename+0x46c/0x5d0 fs/ntfs3/namei.c:332
vfs_rename+0x94b/0x1340 fs/namei.c:5216
do_renameat2+0x5f5/0x870 fs/namei.c:5364
__do_sys_rename fs/namei.c:5411 [inline]
__se_sys_rename fs/namei.c:5409 [inline]
__x64_sys_rename+0x42/0x50 fs/namei.c:5409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xa4/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
connection error: failed to recv *flatrpc.ExecutorMessageRawT: EOF
Tested on:
commit: 4427259c Merge tag 'riscv-for-linus-6.18-rc6' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1771960a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb128cd5cb439809
dashboard link: https://syzkaller.appspot.com/bug?extid=3932ccb896e06f7414c9
compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=167e960a580000
next prev parent reply other threads:[~2025-11-11 1:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 18:10 [syzbot] [ntfs3?] memory leak in ni_add_subrecord syzbot
2025-11-11 0:06 ` Edward Adam Davis
2025-11-11 1:20 ` syzbot [this message]
2025-11-11 11:05 ` [PATCH 1/2] fs/ntfs3: Prevent memory leaks in add sub record Edward Adam Davis
2025-11-11 11:13 ` [PATCH 2/2] fs/ntfs3: out1 also needs to put mi Edward Adam Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69128f42.a70a0220.22f260.0119.GAE@google.com \
--to=syzbot+3932ccb896e06f7414c9@syzkaller.appspotmail.com \
--cc=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox