[lvc-project] [PATCH] ocfs2: add directory size check to ocfs2_find_dir_space_id()

Heming Zhao heming.zhao at suse.com
Thu Oct 16 14:43:50 MSK 2025


On 10/16/25 17:00, Dmitry Antipov wrote:
> On 10/16/25 5:54 AM, Heming Zhao wrote:
> 
>> I can't imagine how the last_de is NULL here.
>> Would you give more details for this patch?
> 
> This happens on a corrupted filesystem where 'i_size_read(dir)' returns
> zero. In such a case, 'while (de_buf < limit)' loop makes no iterations
> and so 'last_de' is NULL.
> 
> In general, OCFS2 is too trustful against the data comes from the block
> layer ('struct buffer_head' etc.), which makes it an easy target for
> syzkaller (which is capable to create very weird filesystem images).
> 
> Dmitry
> 

Thanks for the explanation, I will provide my comments later.

- Heming



More information about the lvc-project mailing list