Forwarded: Re: [syzbot] WARNING in udf_fiiter_add_entry

From: syzbot

Date: Fri Apr 17 2026 - 12:24:14 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: Re: [syzbot] WARNING in udf_fiiter_add_entry
Author: tristmd@xxxxxxxxx

#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@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxxxxxx
Closes: https://syzkaller.appspot.com/bug?extid=969e250fc7983fc7417c
Signed-off-by: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>
---
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