Re: [PATCH] ocfs2: Add i_size check for dir
From: Edward Adam Davis
Date: Wed Aug 21 2024 - 06:52:51 EST
On Tue, 20 Aug 2024 15:59:56 +0100, Matthew Wilcox 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?
In this issue, Yes.
--
Edward