Page MenuHomeFreeBSD

Add root directory entry check.

Authored by fsu on Feb 11 2023, 7:39 AM.
Referenced Files
Unknown Object (File)
Tue, May 21, 4:03 AM
Unknown Object (File)
Thu, May 9, 6:32 PM
Unknown Object (File)
Wed, May 8, 9:21 PM
Unknown Object (File)
Sun, Apr 28, 11:44 PM
Unknown Object (File)
Apr 26 2024, 1:12 PM
Unknown Object (File)
Jan 14 2024, 7:25 AM
Unknown Object (File)
Dec 20 2023, 6:37 AM
Unknown Object (File)
Dec 13 2023, 11:52 AM



Add check that directory entry with ino=EXT2_ROOTINO have correct namelength and name. It is possible to create malicious image which will cause panic if root directory entry have incorrect name.


Test Plan

ext2fs does not panic on malicious image from 259068

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

fsu requested review of this revision.Feb 11 2023, 7:39 AM

I think this is the first time I have seen a char string return value. Can we keep the same coding style as in ext2_check_direntry() ?
That is .. assigning error_msg within the function instead of returning it.

Ok, let's remove ext2_check_root_direntry() completely.

This revision is now accepted and ready to land.Feb 18 2023, 7:02 PM
This revision was automatically updated to reflect the committed changes.