Re: [PATCH] hpfs: add checks for ea addresses

From: Al Viro
Date: Tue Jul 22 2025 - 22:46:08 EST


On Sun, Jul 20, 2025 at 02:34:27PM +0200, Antoni Pokusinski wrote:

> ea_end = fnode_end_ea(fnode);
> - for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
> + for (ea = fnode_ea(fnode); ea < ea_end && ea_valid_addr(fnode, ea); ea = next_ea(ea))

That looks really fishy. If nothing else, your ea_valid_addr() is a range check;
are there any situations where we would want to allow fnode_ea() and fnode_end_ea()
be out of that range?