* [syzbot] [ntfs3?] WARNING in ni_rename
@ 2025-06-29 9:46 syzbot
2025-06-30 11:19 ` [syzbot] Private message regarding: " syzbot
` (4 more replies)
0 siblings, 5 replies; 19+ messages in thread
From: syzbot @ 2025-06-29 9:46 UTC (permalink / raw)
To: almaz.alexandrovich, linux-kernel, ntfs3, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 1b152eeca84a Add linux-next specific files for 20250625
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1409df0c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1683770c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1183770c580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4fe40968b29a/disk-1b152eec.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/edf810403580/vmlinux-1b152eec.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b63be52ad9a/bzImage-1b152eec.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/3256aebc06d8/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029, CPU#0: syz-executor359/5838
Modules linked in:
CPU: 0 UID: 0 PID: 5838 Comm: syz-executor359 Not tainted 6.16.0-rc3-next-20250625-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
Code: 8b 05 36 32 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 19 b4 6b 08 cc e8 73 fe b9 fe 90 <0f> 0b 90 eb c5 e8 e8 d9 68 08 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc9000420fab8 EFLAGS: 00010293
RAX: ffffffff8305be0d RBX: 00000000fffffffe RCX: ffff888029afbc00
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: 00000000fffffffe R08: ffffffff8fa18d37 R09: 1ffffffff1f431a6
R10: dffffc0000000000 R11: fffffbfff1f431a7 R12: 0000000000000000
R13: ffff88807c10a200 R14: ffff8880776e8758 R15: ffff888073d566d0
FS: 0000555581b87380(0000) GS:ffff888125c21000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e3bd1067a8 CR3: 0000000072ba4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
vfs_rename+0xbda/0xf00 fs/namei.c:5129
do_renameat2+0x6ce/0xa80 fs/namei.c:5278
__do_sys_rename fs/namei.c:5325 [inline]
__se_sys_rename fs/namei.c:5323 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe16d5c28b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcc6842518 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007fe16d5c28b9
RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
RBP: 0030656c69662f2e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcc68426f8 R14: 0000000000000001 R15: 0000000000000001
</TASK>
---
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] 19+ messages in thread
* Re: [syzbot] Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
2025-06-29 9:46 [syzbot] [ntfs3?] WARNING in ni_rename syzbot
@ 2025-06-30 11:19 ` syzbot
2025-06-30 11:29 ` syzbot
` (3 subsequent siblings)
4 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 11:19 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
Author: kapoorarnav43@gmail.com
#syz test
From 00325fe8a9658ef0d9e0082dd98c09adc01875fa Mon Sep 17 00:00:00 2001
From: Arnav Kapoor <kapoor...@gmail.com <https://groups.google.com/u/1/>>
Date: Sun, 29 Jun 2025 15:29:27 +0530
Subject: [PATCH] ntfs3: log error when cleanup in ni_rename fails
If ni_remove_name fails and undoing ni_add_name also fails,
add an error log so the failure is visible.
Reported-by: syzbot+b03730...@syzkaller.appspotmail.com
<https://groups.google.com/u/1/>
Signed-off-by: Arnav Kapoor <kapoor...@gmail.com
<https://groups.google.com/u/1/>>
---
fs/ntfs3/frecord.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index b7a83200f2cc..8e9d2ea4e37e 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -3027,8 +3027,10 @@ int ni_rename(struct ntfs_inode *dir_ni, struct
ntfs_inode *new_dir_ni,
err = ni_add_name(new_dir_ni, ni, new_de);
if (!err) {
err = ni_remove_name(dir_ni, ni, de, &de2, &undo);
- if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2, &undo))
+ if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2, &undo)) {
+ ntfs_err(sb, "ni_rename: failed to clean up after add_name failure");
*is_bad = true;
+ }
}
/*
--
2.43.0
On Sunday, 29 June 2025 at 15:16:28 UTC+5:30 syzbot wrote:
Hello,
syzbot found the following issue on:
HEAD commit: 1b152eeca84a Add linux-next specific files for 20250625
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1409df0c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.6
(++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD
20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1683770c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1183770c580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/4fe40968b29a/disk-1b152eec.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/edf810403580/vmlinux-1b152eec.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/0b63be52ad9a/bzImage-1b152eec.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/3256aebc06d8/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the
commit:
Reported-by: syzbot+b03730...@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100
fs/ntfs3/frecord.c:3029, CPU#0: syz-executor359/5838
Modules linked in:
CPU: 0 UID: 0 PID: 5838 Comm: syz-executor359 Not tainted
6.16.0-rc3-next-20250625-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 05/07/2025
RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
Code: 8b 05 36 32 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c
41 5d 41 5e 41 5f 5d e9 19 b4 6b 08 cc e8 73 fe b9 fe 90 <0f> 0b 90 eb c5
e8 e8 d9 68 08 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc9000420fab8 EFLAGS: 00010293
RAX: ffffffff8305be0d RBX: 00000000fffffffe RCX: ffff888029afbc00
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: 00000000fffffffe R08: ffffffff8fa18d37 R09: 1ffffffff1f431a6
R10: dffffc0000000000 R11: fffffbfff1f431a7 R12: 0000000000000000
R13: ffff88807c10a200 R14: ffff8880776e8758 R15: ffff888073d566d0
FS: 0000555581b87380(0000) GS:ffff888125c21000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e3bd1067a8 CR3: 0000000072ba4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
vfs_rename+0xbda/0xf00 fs/namei.c:5129
do_renameat2+0x6ce/0xa80 fs/namei.c:5278
__do_sys_rename fs/namei.c:5325 [inline]
__se_sys_rename fs/namei.c:5323 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe16d5c28b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcc6842518 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007fe16d5c28b9
RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
RBP: 0030656c69662f2e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcc68426f8 R14: 0000000000000001 R15: 0000000000000001
</TASK>
---
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 syzk...@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 related [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
[not found] <e13eff57-579f-4eca-9bc3-9f6ec2d5f42fn@googlegroups.com>
@ 2025-06-30 11:21 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 11:21 UTC (permalink / raw)
To: kapoorarnav43, linux-kernel, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
Hunk #1 FAILED at 3027.
1 out of 1 hunk FAILED
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=115cb88c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
2025-06-29 9:46 [syzbot] [ntfs3?] WARNING in ni_rename syzbot
2025-06-30 11:19 ` [syzbot] Private message regarding: " syzbot
@ 2025-06-30 11:29 ` syzbot
2025-06-30 13:50 ` syzbot
` (2 subsequent siblings)
4 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 11:29 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
Author: kapoorarnav43@gmail.com
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
From 00325fe8a9658ef0d9e0082dd98c09adc01875fa Mon Sep 17 00:00:00 2001
From: Arnav Kapoor <kapoor...@gmail.com>
Date: Sun, 29 Jun 2025 15:29:27 +0530
Subject: [PATCH] ntfs3: log error when cleanup in ni_rename fails
If ni_remove_name fails and undoing ni_add_name also fails,
add an error log so the failure is visible.
Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Signed-off-by: Arnav Kapoor <kapoor...@gmail.com>
---
fs/ntfs3/frecord.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index b7a83200f2cc..8e9d2ea4e37e 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ int ni_rename(struct ntfs_inode *dir_ni, struct ntfs_inode *new_dir_ni,
struct ntfs_inode *ni, struct dentry *de, struct dentry
*new_de,
bool *is_bad)
{
+ struct super_block *sb = ni->mi.sbi->sb;
int err;
struct ntfs_dir_entry *de2;
bool undo;
err = ni_add_name(new_dir_ni, ni, new_de);
if (!err) {
err = ni_remove_name(dir_ni, ni, de, &de2, &undo);
- if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2,
&undo))
+ if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2,
&undo)) {
+ ntfs_err(sb, "ni_rename: failed to clean up after
add_name failure");
*is_bad = true;
+ }
}
/*
--
2.43.0
On Monday, 30 June 2025 at 16:51:05 UTC+5:30 syzbot wrote:
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
Hunk #1 FAILED at 3027.
1 out of 1 hunk FAILED
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=115cb88c580000
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
[not found] <0620687c-30d7-405d-b4f3-636546ef1823n@googlegroups.com>
@ 2025-06-30 11:55 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 11:55 UTC (permalink / raw)
To: kapoorarnav43, linux-kernel, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in ni_rename
loop0: detected capacity change from 0 to 4096
------------[ cut here ]------------
WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029, CPU#0: syz.0.16/6714
Modules linked in:
CPU: 0 UID: 0 PID: 6714 Comm: syz.0.16 Not tainted 6.16.0-rc4-next-20250630-syzkaller-g1343433ed389 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
Code: 8b 05 66 63 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 49 ac 6c 08 cc e8 b3 fe b9 fe 90 <0f> 0b 90 eb c5 e8 18 d2 69 08 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc90002eb7ab8 EFLAGS: 00010293
RAX: ffffffff8305ccdd RBX: 00000000fffffffe RCX: ffff888020b28000
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: 00000000fffffffe R08: ffffffff8fa17437 R09: 1ffffffff1f42e86
R10: dffffc0000000000 R11: fffffbfff1f42e87 R12: 0000000000000000
R13: ffff88803385e600 R14: ffff888077140758 R15: ffff888066ebe6d0
FS: 00007f59ac0016c0(0000) GS:ffff888125c1d000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8e813c3000 CR3: 000000007f64a000 CR4: 00000000003526f0
Call Trace:
<TASK>
ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
vfs_rename+0xbd7/0xf00 fs/namei.c:5129
do_renameat2+0x6ce/0xa80 fs/namei.c:5278
__do_sys_rename fs/namei.c:5325 [inline]
__se_sys_rename fs/namei.c:5323 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f59ab18e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f59ac001038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f59ab3b5fa0 RCX: 00007f59ab18e929
RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
RBP: 00007f59ab210b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f59ab3b5fa0 R15: 00007fff104b3398
</TASK>
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=10bfa770580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c1ce97baf6bd6397
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
patch: https://syzkaller.appspot.com/x/patch.diff?x=1147848c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
2025-06-29 9:46 [syzbot] [ntfs3?] WARNING in ni_rename syzbot
2025-06-30 11:19 ` [syzbot] Private message regarding: " syzbot
2025-06-30 11:29 ` syzbot
@ 2025-06-30 13:50 ` syzbot
2025-06-30 23:37 ` syzbot
2025-06-30 23:48 ` syzbot
4 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 13:50 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
Author: kapoorarnav43@gmail.com
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
From 00325fe8a9658ef0d9e0082dd98c09adc01875fa Mon Sep 17 00:00:00 2001
From: Arnav Kapoor <kapoor...@gmail.com>
Date: Sun, 29 Jun 2025 15:29:27 +0530
Subject: [PATCH] ntfs3: log error instead of WARN_ON in ni_rename cleanup
failure
If ni_remove_name fails and undoing ni_add_name also fails,
add an error log and mark the inode as bad,
instead of triggering a WARN_ON.
This avoids kernel WARNING reports from syzbot,
while still keeping the error visible in logs.
Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Signed-off-by: Arnav Kapoor <kapoor...@gmail.com>
---
fs/ntfs3/frecord.c | 2 +-
1 file changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.cindex
b7a83200f2cc..xxxxxxxxxxxx 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -3029,11 +3029,11 @@ int ni_rename(...)
if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2, &undo)) {
ntfs_err(sb, "ni_rename: failed to clean up after add_name
failure");
*is_bad = true;
- WARN_ON(err);
+ ntfs_warn(sb, "ni_rename: incomplete rename cleanup,
marking bad");
}
On Monday, 30 June 2025 at 17:25:07 UTC+5:30 syzbot wrote:
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering
an issue:
WARNING in ni_rename
loop0: detected capacity change from 0 to 4096
------------[ cut here ]------------
WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100
fs/ntfs3/frecord.c:3029, CPU#0: syz.0.16/6714
Modules linked in:
CPU: 0 UID: 0 PID: 6714 Comm: syz.0.16 Not tainted
6.16.0-rc4-next-20250630-syzkaller-g1343433ed389 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 05/07/2025
RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
Code: 8b 05 66 63 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c
41 5d 41 5e 41 5f 5d e9 49 ac 6c 08 cc e8 b3 fe b9 fe 90 <0f> 0b 90 eb c5
e8 18 d2 69 08 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc90002eb7ab8 EFLAGS: 00010293
RAX: ffffffff8305ccdd RBX: 00000000fffffffe RCX: ffff888020b28000
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: 00000000fffffffe R08: ffffffff8fa17437 R09: 1ffffffff1f42e86
R10: dffffc0000000000 R11: fffffbfff1f42e87 R12: 0000000000000000
R13: ffff88803385e600 R14: ffff888077140758 R15: ffff888066ebe6d0
FS: 00007f59ac0016c0(0000) GS:ffff888125c1d000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8e813c3000 CR3: 000000007f64a000 CR4: 00000000003526f0
Call Trace:
<TASK>
ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
vfs_rename+0xbd7/0xf00 fs/namei.c:5129
do_renameat2+0x6ce/0xa80 fs/namei.c:5278
__do_sys_rename fs/namei.c:5325 [inline]
__se_sys_rename fs/namei.c:5323 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f59ab18e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f59ac001038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f59ab3b5fa0 RCX: 00007f59ab18e929
RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
RBP: 00007f59ab210b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f59ab3b5fa0 R15: 00007fff104b3398
</TASK>
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=10bfa770580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c1ce97baf6bd6397
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.6
(++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD
20.1.6
patch: https://syzkaller.appspot.com/x/patch.diff?x=1147848c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
[not found] <840cee6a-44db-4c88-8501-6291f0c26486n@googlegroups.com>
@ 2025-06-30 14:32 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 14:32 UTC (permalink / raw)
To: kapoorarnav43, linux-kernel, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
patch: **** unexpected end of file in patch
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=1362988c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
2025-06-29 9:46 [syzbot] [ntfs3?] WARNING in ni_rename syzbot
` (2 preceding siblings ...)
2025-06-30 13:50 ` syzbot
@ 2025-06-30 23:37 ` syzbot
2025-06-30 23:48 ` syzbot
4 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 23:37 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
Author: kapoorarnav43@gmail.com
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
From 00325fe8a9658ef0d9e0082dd98c09adc01875fa Mon Sep 17 00:00:00 2001
From: Arnav Kapoor <kapoor...@gmail.com>
Date: Sun, 29 Jun 2025 15:29:27 +0530
Subject: [PATCH] ntfs3: log warning instead of WARN_ON in ni_rename cleanup
failure
If ni_remove_name fails and undoing ni_add_name also fails,
replace WARN_ON with a ntfs_warn log and mark the inode bad.
This keeps the error visible without triggering a kernel warning.
Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Signed-off-by: Arnav Kapoor <kapoor...@gmail.com>
---
fs/ntfs3/frecord.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index b7a83200f2cc..xxxxxxxxxxxx 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -3029,11 +3029,11 @@ int ni_rename(...)
if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2, &undo)) {
ntfs_err(sb, "ni_rename: failed to clean up after add_name failure");
*is_bad = true;
- WARN_ON(err);
+ ntfs_warn(sb, "ni_rename: incomplete rename cleanup, marking bad");
}
/*
--
2.43.0
On Monday, 30 June 2025 at 20:02:07 UTC+5:30 syzbot wrote:
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
patch: **** unexpected end of file in patch
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=1362988c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
[not found] <e4eb2024-f891-4548-ac08-4f224877c902n@googlegroups.com>
@ 2025-06-30 23:45 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 23:45 UTC (permalink / raw)
To: kapoorarnav43, linux-kernel, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
patch: **** unexpected end of file in patch
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=174b448c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
2025-06-29 9:46 [syzbot] [ntfs3?] WARNING in ni_rename syzbot
` (3 preceding siblings ...)
2025-06-30 23:37 ` syzbot
@ 2025-06-30 23:48 ` syzbot
4 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 23:48 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Private message regarding: [syzbot] [ntfs3?] WARNING in ni_rename
Author: kapoorarnav43@gmail.com
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
From 00325fe8a9658ef0d9e0082dd98c09adc01875fa Mon Sep 17 00:00:00 2001
From: Arnav Kapoor <kapoorarnav43@gmail.com <https://groups.google.com/>>
Date: Sun, 29 Jun 2025 15:29:27 +0530
Subject: [PATCH] ntfs3: log warning instead of WARN_ON in ni_rename cleanup
failure
If ni_remove_name fails and undoing ni_add_name also fails,
replace WARN_ON with a ntfs_warn log and mark the inode bad.
This keeps the error visible without triggering a kernel warning.
Reported-by: syzbot+b03730...@syzkaller.appspotmail.com
<https://groups.google.com/>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com
<https://groups.google.com/>>
---
fs/ntfs3/frecord.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index b7a83200f2cc..xxxxxxxxxxxx 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -3029,11 +3029,11 @@ int ni_rename(...)
if (err && ni_remove_name(new_dir_ni, ni, new_de, &de2, &undo)) {
ntfs_err(sb, "ni_rename: failed to clean up after add_name failure");
*is_bad = true;
- WARN_ON(err);
+ ntfs_warn(sb, "ni_rename: incomplete rename cleanup, marking bad");
}
/*
--
2.43.0
On Tuesday, 1 July 2025 at 05:15:05 UTC+5:30 syzbot wrote:
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
patch: **** unexpected end of file in patch
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=174b448c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
[not found] <8b0a6266-d5c9-43e0-994d-df557fbf8f0fn@googlegroups.com>
@ 2025-06-30 23:50 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-06-30 23:50 UTC (permalink / raw)
To: kapoorarnav43, linux-kernel, syzkaller-bugs
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
failed to apply patch:
checking file fs/ntfs3/frecord.c
patch: **** unexpected end of file in patch
Tested on:
commit: 1343433e Add linux-next specific files for 20250630
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=a3d8d413c6928dae
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler:
patch: https://syzkaller.appspot.com/x/patch.diff?x=1328788c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* [syzbot] [ntfs3?] WARNING in ni_rename
@ 2025-07-08 7:54 Moonhee Lee
2025-07-08 8:13 ` syzbot
0 siblings, 1 reply; 19+ messages in thread
From: Moonhee Lee @ 2025-07-08 7:54 UTC (permalink / raw)
To: syzbot+b0373017f711c06ada64
Cc: almaz.alexandrovich, linux-kernel, ntfs3, syzkaller-bugs
#syz test
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 1bf2a6593dec..15f3a711ea0a 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -478,6 +478,7 @@ static int indx_find_free(struct ntfs_index *indx,
struct ntfs_inode *ni,
struct ATTR_LIST_ENTRY *le = NULL;
const struct INDEX_NAMES *in = &s_index_names[indx->type];
int err;
+ u64 bm_size;
b = ni_find_attr(ni, NULL, &le, ATTR_BITMAP, in->name, in->name_len,
NULL, NULL);
@@ -488,6 +489,17 @@ static int indx_find_free(struct ntfs_index
*indx, struct ntfs_inode *ni,
*bitmap = b;
*bit = MINUS_ONE_T;
+ bm_size = b->non_res ? le64_to_cpu(b->nres.valid_size) :
+ le32_to_cpu(b->res.data_size);
+
+ /*
+ * Allocated index blocks require $BITMAP to contain at least
+ * one bit for usage tracking. A zero-length bitmap in this
+ * case indicates a malformed on-disk structure and cannot be used.
+ */
+ if (unlikely(bm_size == 0 && indx->alloc_run.count))
+ return -EINVAL;
+
if (!b->non_res) {
u32 nbits = 8 * le32_to_cpu(b->res.data_size);
size_t pos = find_next_zero_bit_le(resident_data(b), nbits, 0);
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
2025-07-08 7:54 Moonhee Lee
@ 2025-07-08 8:13 ` syzbot
2025-07-08 8:21 ` Moon Hee Lee
0 siblings, 1 reply; 19+ messages in thread
From: syzbot @ 2025-07-08 8:13 UTC (permalink / raw)
To: almaz.alexandrovich, linux-kernel, moonhee.lee.ca, ntfs3,
syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in ni_rename
loop0: detected capacity change from 0 to 4096
------------[ cut here ]------------
WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029, CPU#1: syz.0.16/6620
Modules linked in:
CPU: 1 UID: 0 PID: 6620 Comm: syz.0.16 Not tainted 6.16.0-rc4-next-20250704-syzkaller-07381-g26ffb3d6f02c-dirty #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
Code: 8b 05 b6 5d 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 d9 a6 6c 08 cc e8 f3 7d b9 fe 90 <0f> 0b 90 eb c5 e8 68 cc 69 08 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc900033e7ab8 EFLAGS: 00010293
RAX: ffffffff8306228d RBX: 00000000fffffffe RCX: ffff888021723c00
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: 00000000fffffffe R08: ffffffff8fa18a37 R09: 1ffffffff1f43146
R10: dffffc0000000000 R11: fffffbfff1f43147 R12: 0000000000000000
R13: ffff88802f30d500 R14: ffff88806d04d0c8 R15: ffff88806d04b368
FS: 00007f1edd33f6c0(0000) GS:ffff888125d18000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000001060 CR3: 000000007c546000 CR4: 00000000003526f0
Call Trace:
<TASK>
ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
vfs_rename+0xbd7/0xf00 fs/namei.c:5129
do_renameat2+0x6ce/0xa80 fs/namei.c:5278
__do_sys_rename fs/namei.c:5325 [inline]
__se_sys_rename fs/namei.c:5323 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1edc58e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1edd33f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f1edc7b5fa0 RCX: 00007f1edc58e929
RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
RBP: 00007f1edc610b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f1edc7b5fa0 R15: 00007ffcb3616c48
</TASK>
Tested on:
commit: 26ffb3d6 Add linux-next specific files for 20250704
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16c95582580000
kernel config: https://syzkaller.appspot.com/x/.config?x=59817f9ef599726c
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=175edf70580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
2025-07-08 8:13 ` syzbot
@ 2025-07-08 8:21 ` Moon Hee Lee
2025-07-08 8:38 ` syzbot
0 siblings, 1 reply; 19+ messages in thread
From: Moon Hee Lee @ 2025-07-08 8:21 UTC (permalink / raw)
To: syzbot; +Cc: almaz.alexandrovich, linux-kernel, ntfs3, syzkaller-bugs
#syz test
---
fs/ntfs3/index.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 1bf2a6593dec..15f3a711ea0a 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -478,6 +478,7 @@ static int indx_find_free(struct ntfs_index *indx,
struct ntfs_inode *ni,
struct ATTR_LIST_ENTRY *le = NULL;
const struct INDEX_NAMES *in = &s_index_names[indx->type];
int err;
+ u64 bm_size;
b = ni_find_attr(ni, NULL, &le, ATTR_BITMAP, in->name, in->name_len,
NULL, NULL);
@@ -488,6 +489,17 @@ static int indx_find_free(struct ntfs_index
*indx, struct ntfs_inode *ni,
*bitmap = b;
*bit = MINUS_ONE_T;
+ bm_size = b->non_res ? le64_to_cpu(b->nres.valid_size) :
+ le32_to_cpu(b->res.data_size);
+
+ /*
+ * Allocated index blocks require $BITMAP to contain at least
+ * one bit for usage tracking. A zero-length bitmap in this
+ * case indicates a malformed on-disk structure and cannot be used.
+ */
+ if (unlikely(bm_size == 0 && indx->alloc_run.count))
+ return -EINVAL;
+
if (!b->non_res) {
u32 nbits = 8 * le32_to_cpu(b->res.data_size);
size_t pos = find_next_zero_bit_le(resident_data(b), nbits, 0);
--
On Tue, Jul 8, 2025 at 1:13 AM syzbot
<syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot has tested the proposed patch but the reproducer is still triggering an issue:
> WARNING in ni_rename
>
> loop0: detected capacity change from 0 to 4096
> ------------[ cut here ]------------
> WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029, CPU#1: syz.0.16/6620
> Modules linked in:
> CPU: 1 UID: 0 PID: 6620 Comm: syz.0.16 Not tainted 6.16.0-rc4-next-20250704-syzkaller-07381-g26ffb3d6f02c-dirty #0 PREEMPT(full)
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
> RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
> Code: 8b 05 b6 5d 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 d9 a6 6c 08 cc e8 f3 7d b9 fe 90 <0f> 0b 90 eb c5 e8 68 cc 69 08 0f 1f 84 00 00 00 00 00 90 90 90 90
> RSP: 0018:ffffc900033e7ab8 EFLAGS: 00010293
> RAX: ffffffff8306228d RBX: 00000000fffffffe RCX: ffff888021723c00
> RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
> RBP: 00000000fffffffe R08: ffffffff8fa18a37 R09: 1ffffffff1f43146
> R10: dffffc0000000000 R11: fffffbfff1f43147 R12: 0000000000000000
> R13: ffff88802f30d500 R14: ffff88806d04d0c8 R15: ffff88806d04b368
> FS: 00007f1edd33f6c0(0000) GS:ffff888125d18000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000200000001060 CR3: 000000007c546000 CR4: 00000000003526f0
> Call Trace:
> <TASK>
> ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
> vfs_rename+0xbd7/0xf00 fs/namei.c:5129
> do_renameat2+0x6ce/0xa80 fs/namei.c:5278
> __do_sys_rename fs/namei.c:5325 [inline]
> __se_sys_rename fs/namei.c:5323 [inline]
> __x64_sys_rename+0x82/0x90 fs/namei.c:5323
> do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
> do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7f1edc58e929
> Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007f1edd33f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
> RAX: ffffffffffffffda RBX: 00007f1edc7b5fa0 RCX: 00007f1edc58e929
> RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
> RBP: 00007f1edc610b39 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
> R13: 0000000000000000 R14: 00007f1edc7b5fa0 R15: 00007ffcb3616c48
> </TASK>
>
>
> Tested on:
>
> commit: 26ffb3d6 Add linux-next specific files for 20250704
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=16c95582580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=59817f9ef599726c
> dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
> compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> patch: https://syzkaller.appspot.com/x/patch.diff?x=175edf70580000
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/syzkaller-bugs/686cd312.a00a0220.338033.0009.GAE%40google.com.
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
2025-07-08 8:21 ` Moon Hee Lee
@ 2025-07-08 8:38 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-07-08 8:38 UTC (permalink / raw)
To: almaz.alexandrovich, linux-kernel, moonhee.lee.ca, ntfs3,
syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in ni_rename
loop0: detected capacity change from 0 to 4096
------------[ cut here ]------------
WARNING: fs/ntfs3/frecord.c:3030 at ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029, CPU#1: syz.0.16/6603
Modules linked in:
CPU: 1 UID: 0 PID: 6603 Comm: syz.0.16 Not tainted 6.16.0-rc4-next-20250704-syzkaller-07381-g26ffb3d6f02c-dirty #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:ni_rename+0xee/0x100 fs/ntfs3/frecord.c:3029
Code: 8b 05 b6 5d 9a 0f 48 3b 44 24 10 75 22 44 89 e0 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 d9 a6 6c 08 cc e8 f3 7d b9 fe 90 <0f> 0b 90 eb c5 e8 68 cc 69 08 0f 1f 84 00 00 00 00 00 90 90 90 90
RSP: 0018:ffffc90003007ab8 EFLAGS: 00010293
RAX: ffffffff8306228d RBX: 00000000fffffffe RCX: ffff8880274e5a00
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: 00000000fffffffe R08: ffffffff8fa18a37 R09: 1ffffffff1f43146
R10: dffffc0000000000 R11: fffffbfff1f43147 R12: 0000000000000000
R13: ffff88802d5e3300 R14: ffff88805b6e8758 R15: ffff88805b6e66d0
FS: 00007f5d3eea16c0(0000) GS:ffff888125d18000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000001060 CR3: 0000000032258000 CR4: 00000000003526f0
Call Trace:
<TASK>
ntfs_rename+0x6e2/0xb40 fs/ntfs3/namei.c:316
vfs_rename+0xbd7/0xf00 fs/namei.c:5129
do_renameat2+0x6ce/0xa80 fs/namei.c:5278
__do_sys_rename fs/namei.c:5325 [inline]
__se_sys_rename fs/namei.c:5323 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5323
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5d3df8e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5d3eea1038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f5d3e1b5fa0 RCX: 00007f5d3df8e929
RDX: 0000000000000000 RSI: 0000200000001040 RDI: 0000200000000280
RBP: 00007f5d3e010b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f5d3e1b5fa0 R15: 00007ffe542eb158
</TASK>
Tested on:
commit: 26ffb3d6 Add linux-next specific files for 20250704
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1484abd4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=59817f9ef599726c
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=16ecf28c580000
^ permalink raw reply [flat|nested] 19+ messages in thread
* [syzbot] [ntfs3?] WARNING in ni_rename
@ 2025-07-08 8:39 Moon Hee Lee
2025-07-08 9:06 ` syzbot
0 siblings, 1 reply; 19+ messages in thread
From: Moon Hee Lee @ 2025-07-08 8:39 UTC (permalink / raw)
To: syzbot+b0373017f711c06ada64
Cc: almaz.alexandrovich, linux-kernel, ntfs3, syzkaller-bugs
[-- Attachment #1: Type: text/plain, Size: 10 bytes --]
#syz test
[-- Attachment #2: 0001-ntfs3-reject-zero-length-BITMAP-when-index-blocks-ar.patch --]
[-- Type: text/x-patch, Size: 1655 bytes --]
From a7e94ad4959e46acf3861fa0c725a2d0c3373ebb Mon Sep 17 00:00:00 2001
From: Moon Hee Lee <moonhee.lee.ca@gmail.com>
Date: Tue, 8 Jul 2025 01:17:13 -0700
Subject: [PATCH] ntfs3: reject zero-length $BITMAP when index blocks are
allocated
A non-empty index allocation requires at least one bit in $BITMAP
to track usage. Reject malformed on-disk structures with zero-length
bitmaps and allocated index blocks.
Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com>
---
fs/ntfs3/index.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 1bf2a6593dec..15f3a711ea0a 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -478,6 +478,7 @@ static int indx_find_free(struct ntfs_index *indx, struct ntfs_inode *ni,
struct ATTR_LIST_ENTRY *le = NULL;
const struct INDEX_NAMES *in = &s_index_names[indx->type];
int err;
+ u64 bm_size;
b = ni_find_attr(ni, NULL, &le, ATTR_BITMAP, in->name, in->name_len,
NULL, NULL);
@@ -488,6 +489,17 @@ static int indx_find_free(struct ntfs_index *indx, struct ntfs_inode *ni,
*bitmap = b;
*bit = MINUS_ONE_T;
+ bm_size = b->non_res ? le64_to_cpu(b->nres.valid_size) :
+ le32_to_cpu(b->res.data_size);
+
+ /*
+ * Allocated index blocks require $BITMAP to contain at least
+ * one bit for usage tracking. A zero-length bitmap in this
+ * case indicates a malformed on-disk structure and cannot be used.
+ */
+ if (unlikely(bm_size == 0 && indx->alloc_run.count))
+ return -EINVAL;
+
if (!b->non_res) {
u32 nbits = 8 * le32_to_cpu(b->res.data_size);
size_t pos = find_next_zero_bit_le(resident_data(b), nbits, 0);
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
2025-07-08 8:39 Moon Hee Lee
@ 2025-07-08 9:06 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-07-08 9:06 UTC (permalink / raw)
To: almaz.alexandrovich, linux-kernel, moonhee.lee.ca, ntfs3,
syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Tested-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Tested on:
commit: 26ffb3d6 Add linux-next specific files for 20250704
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=13a14a8c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=59817f9ef599726c
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=12a9df70580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [syzbot] [ntfs3?] WARNING in ni_rename
@ 2025-07-08 21:45 Moon Hee Lee
2025-07-08 22:11 ` syzbot
0 siblings, 1 reply; 19+ messages in thread
From: Moon Hee Lee @ 2025-07-08 21:45 UTC (permalink / raw)
To: syzbot; +Cc: almaz.alexandrovich, linux-kernel, ntfs3, syzkaller-bugs
[-- Attachment #1: Type: text/plain, Size: 10 bytes --]
#syz test
[-- Attachment #2: 0001-ntfs3-validate-BITMAP-size-when-index-blocks-are-pre.patch --]
[-- Type: text/x-patch, Size: 1098 bytes --]
From 7fa1f4b399c2d47d1ab301c2662f6a60c2098c45 Mon Sep 17 00:00:00 2001
From: Moon Hee Lee <moonhee.lee.ca@gmail.com>
Date: Tue, 8 Jul 2025 14:39:43 -0700
Subject: [PATCH] ntfs3: validate $BITMAP size when index blocks are present
Reject directories with allocated index blocks but zero-length $BITMAP,
as this indicates an inconsistent on-disk structure.
Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com>
---
fs/ntfs3/index.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 1bf2a6593dec..6d1bf890929d 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1508,6 +1508,16 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni,
bmp_size = bmp_size_v = le32_to_cpu(bmp->res.data_size);
}
+ /*
+ * Index blocks exist, but $BITMAP has zero valid bits.
+ * This implies an on-disk corruption and must be rejected.
+ */
+ if (in->name == I30_NAME &&
+ unlikely(bmp_size_v == 0 && indx->alloc_run.count)) {
+ err = -EINVAL;
+ goto out1;
+ }
+
bit = bmp_size << 3;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [syzbot] [ntfs3?] WARNING in ni_rename
2025-07-08 21:45 Moon Hee Lee
@ 2025-07-08 22:11 ` syzbot
0 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2025-07-08 22:11 UTC (permalink / raw)
To: almaz.alexandrovich, linux-kernel, moonhee.lee.ca, ntfs3,
syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Tested-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
Tested on:
commit: 58ba80c4 Add linux-next specific files for 20250708
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=122fd582580000
kernel config: https://syzkaller.appspot.com/x/.config?x=bac86b8500d50c98
dashboard link: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch: https://syzkaller.appspot.com/x/patch.diff?x=10dc6bd4580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-07-08 22:11 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-29 9:46 [syzbot] [ntfs3?] WARNING in ni_rename syzbot
2025-06-30 11:19 ` [syzbot] Private message regarding: " syzbot
2025-06-30 11:29 ` syzbot
2025-06-30 13:50 ` syzbot
2025-06-30 23:37 ` syzbot
2025-06-30 23:48 ` syzbot
[not found] <e13eff57-579f-4eca-9bc3-9f6ec2d5f42fn@googlegroups.com>
2025-06-30 11:21 ` syzbot
[not found] <0620687c-30d7-405d-b4f3-636546ef1823n@googlegroups.com>
2025-06-30 11:55 ` syzbot
[not found] <840cee6a-44db-4c88-8501-6291f0c26486n@googlegroups.com>
2025-06-30 14:32 ` syzbot
[not found] <e4eb2024-f891-4548-ac08-4f224877c902n@googlegroups.com>
2025-06-30 23:45 ` syzbot
[not found] <8b0a6266-d5c9-43e0-994d-df557fbf8f0fn@googlegroups.com>
2025-06-30 23:50 ` syzbot
-- strict thread matches above, loose matches on Subject: below --
2025-07-08 7:54 Moonhee Lee
2025-07-08 8:13 ` syzbot
2025-07-08 8:21 ` Moon Hee Lee
2025-07-08 8:38 ` syzbot
2025-07-08 8:39 Moon Hee Lee
2025-07-08 9:06 ` syzbot
2025-07-08 21:45 Moon Hee Lee
2025-07-08 22:11 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).