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

Dmitry Antipov dmantipov at yandex.ru
Thu Oct 16 12:00:01 MSK 2025


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




More information about the lvc-project mailing list