Commit c3f42106 authored by Linus Torvalds's avatar Linus Torvalds Committed by Kleber Sacilotto de Souza

filldir[64]: remove WARN_ON_ONCE() for bad directory entries

BugLink: https://bugs.launchpad.net/bugs/1858462

commit b9959c7a upstream.

This was always meant to be a temporary thing, just for testing and to
see if it actually ever triggered.

The only thing that reported it was syzbot doing disk image fuzzing, and
then that warning is expected.  So let's just remove it before -rc4,
because the extra sanity testing should probably go to -stable, but we
don't want the warning to do so.

Reported-by: syzbot+3031f712c7ad5dd4d926@syzkaller.appspotmail.com
Fixes: 8a23eb80 ("Make filldir[64]() verify the directory entry filename is valid")
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSiddharth Chandrasekaran <csiddharth@vmware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 07c9dfce
......@@ -77,9 +77,9 @@ EXPORT_SYMBOL(iterate_dir);
*/
static int verify_dirent_name(const char *name, int len)
{
if (WARN_ON_ONCE(!len))
if (!len)
return -EIO;
if (WARN_ON_ONCE(memchr(name, '/', len)))
if (memchr(name, '/', len))
return -EIO;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment