[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67113519.050a0220.a68d8.000e.GAE@google.com>
Date: Thu, 17 Oct 2024 09:02:33 -0700
From: syzbot <syzbot+d6ca2daf692c7a82f959@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] Re: kernel BUG in __block_write_begin_int (3)
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.
***
Subject: Re: kernel BUG in __block_write_begin_int (3)
Author: dmantipov@...dex.ru
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c964ced7726294d40913f2127c3f185a92cb4a41
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index fe5b1a30c509..57108bd90e8b 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -483,6 +483,13 @@ int nilfs_add_link(struct dentry *dentry, struct inode *inode)
got_it:
from = offset_in_folio(folio, de);
to = from + rec_len;
+ if (unlikely(to > folio_size(folio))) {
+ nilfs_error(dir->i_sb, "bad entry in directory #%lu:"
+ " from=%zu to=%zu size=%zu", dir->i_ino,
+ from, to, folio_size(folio));
+ err = -EINVAL;
+ goto out_unlock;
+ }
err = nilfs_prepare_chunk(folio, from, to);
if (err)
goto out_unlock;
Powered by blists - more mailing lists