From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Edward Adam Davis <eadavis@qq.com>,
syzbot+630f6d40b3ccabc8e96e@syzkaller.appspotmail.com
Cc: jfs-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] jfs: Regular file curruption check
Date: Fri, 11 Jul 2025 14:28:25 -0500 [thread overview]
Message-ID: <77db1539-247c-4c58-ba07-93239d7be31b@oracle.com> (raw)
In-Reply-To: <tencent_35CC9554E896EE32CDD479766DB42D056D0A@qq.com>
On 6/4/25 1:48AM, Edward Adam Davis wrote:
> The reproducer builds a corrupted file on disk with a negative i_size value.
> Add a check when opening this file to avoid subsequent operation failures.
Looks good. I'll apply and test this.
Thanks,
Shaggy
>
> Reported-by: syzbot+630f6d40b3ccabc8e96e@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=630f6d40b3ccabc8e96e
> Tested-by: syzbot+630f6d40b3ccabc8e96e@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
> ---
> fs/jfs/file.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/jfs/file.c b/fs/jfs/file.c
> index 01b6912e60f8..742cadd1f37e 100644
> --- a/fs/jfs/file.c
> +++ b/fs/jfs/file.c
> @@ -44,6 +44,9 @@ static int jfs_open(struct inode *inode, struct file *file)
> {
> int rc;
>
> + if (S_ISREG(inode->i_mode) && inode->i_size < 0)
> + return -EIO;
> +
> if ((rc = dquot_file_open(inode, file)))
> return rc;
>
next prev parent reply other threads:[~2025-07-11 19:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 8:33 [syzbot] [jfs?] kernel BUG in jfs_truncate_nolock syzbot
2025-06-04 6:13 ` Edward Adam Davis
2025-06-04 6:47 ` syzbot
2025-06-04 6:48 ` [PATCH] jfs: Regular file curruption check Edward Adam Davis
2025-07-11 19:28 ` Dave Kleikamp [this message]
2025-06-04 9:46 ` [syzbot] #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5abc7438f1e9d62e91ad775cc83c9594c48d2282 syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77db1539-247c-4c58-ba07-93239d7be31b@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=eadavis@qq.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+630f6d40b3ccabc8e96e@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®