* [syzbot] [udf?] WARNING in udf_fiiter_add_entry
@ 2025-06-03 7:49 syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb() syzbot
2026-04-17 16:21 ` Forwarded: Re: [syzbot] WARNING in udf_fiiter_add_entry syzbot
0 siblings, 2 replies; 5+ messages in thread
From: syzbot @ 2025-06-03 7:49 UTC (permalink / raw)
To: jack, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: e0797d3b91de Merge tag 'fs_for_v6.16-rc1' of git://git.ker..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=12c847f4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=5035170c334b10e0
dashboard link: https://syzkaller.appspot.com/bug?extid=969e250fc7983fc7417c
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=1540a970580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=129e9ed4580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/87203e463647/disk-e0797d3b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b7c4b444e00e/vmlinux-e0797d3b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/632be8fa8cc2/bzImage-e0797d3b.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b2be54974ef9/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 1 PID: 7408 at fs/udf/namei.c:214 udf_expand_dir_adinicb fs/udf/namei.c:214 [inline]
WARNING: CPU: 1 PID: 7408 at fs/udf/namei.c:214 udf_fiiter_add_entry+0x183e/0x1e10 fs/udf/namei.c:262
Modules linked in:
CPU: 1 UID: 0 PID: 7408 Comm: syz-executor141 Not tainted 6.15.0-syzkaller-08297-ge0797d3b91de #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:udf_expand_dir_adinicb fs/udf/namei.c:214 [inline]
RIP: 0010:udf_fiiter_add_entry+0x183e/0x1e10 fs/udf/namei.c:262
Code: 44 89 f1 41 d3 ef 41 01 df 44 89 7c 24 20 48 8b 5c 24 10 e9 f0 fb ff ff e8 3f 11 8c fe 89 d8 e9 a8 fe ff ff e8 33 11 8c fe 90 <0f> 0b 90 e9 1e f9 ff ff 44 89 f9 80 e1 07 38 c1 0f 8c 93 e8 ff ff
RSP: 0018:ffffc9000c857320 EFLAGS: 00010293
RAX: ffffffff833418cd RBX: 00000000ffffff8b RCX: ffff88802c835a00
RDX: 0000000000000000 RSI: 00000000ffffff8b RDI: 0000000000000000
RBP: ffffc9000c857730 R08: ffff888022e45b43 R09: 1ffff110045c8b68
R10: dffffc0000000000 R11: ffffed10045c8b69 R12: dffffc0000000000
R13: 1ffff9200190ae88 R14: ffff888074dd2020 R15: 0000000000000200
FS: 000055557eba4380(0000) GS:ffff888125d98000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f95825da00a CR3: 000000003333e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
udf_rename+0x69b/0xcd0 fs/udf/namei.c:843
vfs_rename+0xb9c/0xec0 fs/namei.c:5128
do_renameat2+0x878/0xc50 fs/namei.c:5277
__do_sys_renameat2 fs/namei.c:5311 [inline]
__se_sys_renameat2 fs/namei.c:5308 [inline]
__x64_sys_renameat2+0xce/0xe0 fs/namei.c:5308
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:0x7f95825912d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 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:00007ffdb0ba3048 EFLAGS: 00000246 ORIG_RAX: 000000000000013c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f95825912d9
RDX: 0000000000000004 RSI: 0000200000000080 RDI: 00000000ffffff9c
RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000
R10: 0000200000000980 R11: 0000000000000246 R12: 0000000000010000
R13: 00007ffdb0ba30e0 R14: 0000200000000500 R15: 0000000000000003
</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] 5+ messages in thread
* Forwarded: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb()
2025-06-03 7:49 [syzbot] [udf?] WARNING in udf_fiiter_add_entry syzbot
@ 2026-04-17 10:12 ` syzbot
2026-04-17 16:21 ` Forwarded: Re: [syzbot] WARNING in udf_fiiter_add_entry syzbot
1 sibling, 0 replies; 5+ messages in thread
From: syzbot @ 2026-04-17 10:12 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: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb()
Author: tristmd@gmail.com
From: Tristan Madani <tristan@talencesecurity.com>
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
udf_expand_dir_adinicb() copies inline directory data into a newly
allocated block and then re-iterates the directory entries to fixup tag
locations. If the iteration fails (e.g. due to I/O error reading the
new block or corrupted on-disk data), the function hits a WARN_ON_ONCE()
and silently returns success.
On a crafted UDF image this WARNING fires reliably because the
underlying block read fails, causing udf_fiiter_init() or
udf_fiiter_advance() to return -EFSCORRUPTED.
Fix this by removing the WARN_ON_ONCE() and propagating the error code
to the caller instead, so that filesystem corruption is handled
gracefully rather than triggering a kernel warning.
Fixes: a27b2923de7e ("udf: Move udf_expand_dir_adinicb() to its callsite")
Reported-by: syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=969e250fc7983fc7417c
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
fs/udf/namei.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -206,15 +206,11 @@ static int udf_expand_dir_adinicb(struct inode *inode, udf_pblk_t *block)
else
impuse = NULL;
udf_fiiter_write_fi(&iter, impuse);
}
brelse(dbh);
- /*
- * We don't expect the iteration to fail as the directory has been
- * already verified to be correct
- */
- WARN_ON_ONCE(ret);
udf_fiiter_release(&iter);
- return 0;
+ return ret;
}
static int udf_fiiter_add_entry(struct inode *dir, struct dentry *dentry,
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread* Forwarded: Re: [syzbot] WARNING in udf_fiiter_add_entry
2025-06-03 7:49 [syzbot] [udf?] WARNING in udf_fiiter_add_entry syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb() syzbot
@ 2026-04-17 16:21 ` syzbot
1 sibling, 0 replies; 5+ messages in thread
From: syzbot @ 2026-04-17 16:21 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: Re: [syzbot] WARNING in udf_fiiter_add_entry
Author: tristmd@gmail.com
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>From 8952d1a6c0f2ba60983d065a704e20171d843b57 Mon Sep 17 00:00:00 2001
From: Tristan Madani <tristan@talencesecurity.com>
Date: Fri, 17 Apr 2026 16:15:18 +0000
Subject: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb()
udf_expand_dir_adinicb() returns 0 unconditionally after iterating
directory entries, even when the iteration fails. The WARN_ON_ONCE(ret)
fires on corrupted filesystems but the error is discarded.
Remove the WARN_ON_ONCE and propagate the error return value to
the caller.
Reported-by: syzbot+969e250fc7983fc7417c@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=969e250fc7983fc7417c
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
fs/udf/namei.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 9a3b7ce..2249b79 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -207,14 +207,9 @@ static int udf_expand_dir_adinicb(struct inode *inode, udf_pblk_t *block)
udf_fiiter_write_fi(&iter, impuse);
}
brelse(dbh);
- /*
- * We don't expect the iteration to fail as the directory has been
- * already verified to be correct
- */
- WARN_ON_ONCE(ret);
udf_fiiter_release(&iter);
- return 0;
+ return ret;
}
static int udf_fiiter_add_entry(struct inode *dir, struct dentry *dentry,
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <20260417101213.2490118-1-tristmd@gmail.com>]
[parent not found: <177644285774.3788877.6275209598415052730@talencesecurity.com>]
end of thread, other threads:[~2026-04-17 18:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 7:49 [syzbot] [udf?] WARNING in udf_fiiter_add_entry syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] udf: propagate iteration error from udf_expand_dir_adinicb() syzbot
2026-04-17 16:21 ` Forwarded: Re: [syzbot] WARNING in udf_fiiter_add_entry syzbot
[not found] <20260417101213.2490118-1-tristmd@gmail.com>
2026-04-17 10:43 ` [syzbot] [udf?] " syzbot
[not found] <177644285774.3788877.6275209598415052730@talencesecurity.com>
2026-04-17 18:11 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox