RE: [PATCH v3] hfs: Validate CNIDs in hfs_read_inode

From: Viacheslav Dubeyko

Date: Tue Mar 10 2026 - 17:34:51 EST


On Tue, 2026-03-10 at 19:41 +0900, Tetsuo Handa wrote:
> On 2026/03/10 9:08, George Anthony Vernon wrote:
> > - Remove Tetsuo's additional superblock check from patch series
>
> Why do we want to make mount() succeed for CNIDs other than HFS_ROOT_CNID ?
>
> 0 => EINVAL
> HFS_EXT_CNID => ENOTDIR
> HFS_CAT_CNID => ENOTDIR
> All others => succeed
>
> Fuzzing against unreadable root directory is not useful.
>

The hfs_fill_super() has not been modified as it was discussed.

Thanks,
Slava.