[lvc-project] [PATCH] ocfs2: consistently validate extent lists in __ocfs2_find_path()

Heming Zhao heming.zhao at suse.com
Fri Dec 19 13:11:52 MSK 2025


On Fri, Dec 19, 2025 at 12:36:27PM +0300, Dmitry Antipov wrote:
> On Fri, 2025-12-19 at 12:28 +0800, Heming Zhao wrote:
> 
> 
> > As I mentioned in another thread [1], all __ocfs2_find_path() operations occur
> > in memory
> 
> Hm. AFAICS __ocfs2_find_path() calls ocfs2_read_extent_block() at least.

You are right.

> 
> Catching bogus zero values is easy (well, at least in this particular case).
> But an intension of my my patch was to catch all bogus values. IIUC an on-disk
> length of an extent list should be equal to ocfs2_extent_recs_per_eb(...) for
> an extent block and ocfs2_extent_recs_per_inode_with_xattr(...) for the regular
> inode, and it's hardly possible to check the latest without reading the full
> inode block.
> 
> Dmitry

If syzbot has indeed triggered a relevant bug, I suggest we move forward with
this patch."

- Heming



More information about the lvc-project mailing list