Page MenuHomeFreeBSD

Add root directory entry check.
ClosedPublic

Authored by fsu on Feb 11 2023, 7:39 AM.
Tags
None
Referenced Files
F97713043: D38502.diff
Mon, Sep 30, 10:26 PM
Unknown Object (File)
Sat, Sep 7, 11:59 PM
Unknown Object (File)
Mon, Sep 2, 11:10 AM
Unknown Object (File)
Aug 24 2024, 6:46 PM
Unknown Object (File)
Jul 28 2024, 3:45 PM
Unknown Object (File)
Jun 29 2024, 1:06 AM
Unknown Object (File)
Jun 16 2024, 10:17 PM
Unknown Object (File)
Jun 2 2024, 4:06 AM
Subscribers

Details

Summary

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.

Fix: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259068

Test Plan

ext2fs does not panic on malicious image from 259068

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

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.