From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: Matthew Wilcox <willy@infradead.org>,
joseph.qi@linux.alibaba.com, Edward Adam Davis <eadavis@qq.com>
Cc: syzbot+5a64828fcc4c2ad9b04f@syzkaller.appspotmail.com,
jlbec@evilplan.org, linux-kernel@vger.kernel.org,
mark@fasheh.com, ocfs2-devel@lists.linux.dev,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] ocfs2: Add i_size check for dir
Date: Wed, 21 Aug 2024 14:16:17 +0800 [thread overview]
Message-ID: <1c4d5baa-0ee9-46f9-b7d1-cb69387cc0d0@suse.com> (raw)
In-Reply-To: <ZsSvbDxMtUEHEldl@casper.infradead.org>
On 8/20/24 22:59, Matthew Wilcox wrote:
> On Tue, Aug 20, 2024 at 08:08:38PM +0800, Edward Adam Davis wrote:
>> When the i_size of dir is too large, it will cause limit to overflow and
>> be less than de_buf, ultimately resulting in last_de not being initialized
>> and causing uaf issue.
>>
>> + if (i_size_read(dir) > OCFS2_MAX_BLOCKSIZE)
>> + return -EINVAL;
>
> Surely directories can be more than one block in size?
>
The key point above is that the patch uses a hard code value, but in the real world,
the blocksize can be smaller than OCFS2_MAX_BLOCKSIZE.
-Heming
next prev parent reply other threads:[~2024-08-21 6:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 7:58 [syzbot] [ocfs2?] general protection fault in ocfs2_prepare_dir_for_insert syzbot
2024-08-20 11:19 ` Edward Adam Davis
2024-08-20 11:42 ` syzbot
2024-08-20 12:08 ` [PATCH] ocfs2: Add i_size check for dir Edward Adam Davis
2024-08-20 12:44 ` Joseph Qi
2024-08-20 13:55 ` Edward Adam Davis
2024-08-21 10:41 ` Joseph Qi
2024-08-21 11:15 ` Edward Adam Davis
2024-08-20 14:59 ` Matthew Wilcox
2024-08-21 6:16 ` heming.zhao [this message]
2024-08-21 9:08 ` Edward Adam Davis
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=1c4d5baa-0ee9-46f9-b7d1-cb69387cc0d0@suse.com \
--to=heming.zhao@suse.com \
--cc=eadavis@qq.com \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=syzbot+5a64828fcc4c2ad9b04f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=willy@infradead.org \
/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®