Page MenuHomeFreeBSD

cd9660_open should check for padding
ClosedPublic

Authored by tsoome on Sep 30 2016, 10:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 3:48 PM
Unknown Object (File)
Mon, Sep 29, 5:49 PM
Unknown Object (File)
Sep 14 2025, 10:45 PM
Unknown Object (File)
Aug 17 2025, 12:27 PM
Unknown Object (File)
Aug 5 2025, 10:37 AM
Unknown Object (File)
Jul 27 2025, 9:09 PM
Unknown Object (File)
Jul 25 2025, 7:05 PM
Unknown Object (File)
Jul 25 2025, 5:01 PM
Subscribers
None

Details

Summary

I have "buggy" iso, where there is no /boot/loader.conf file, but loader
does not fail with file not found, but instead, it does open
/boot/defaults/loader.conf.

While investigating I found:

  1. the directory extent for /boot is 4096 bytes
  2. the last file in directory, /boot/zfsloader, ends at extent offset 2048.
  3. the next entry has length 0 (and in fact, all the directory entry is zero).

So we have hit the corner case with second half of the directory extent is
actually padding.

Test Plan

With patch applied, the missing /boot/loader.conf is correctly reported
as not found.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5381
Build 5579: arc lint + arc unit

Event Timeline

tsoome retitled this revision from to cd9660_open should check for padding.
tsoome updated this object.
tsoome edited the test plan for this revision. (Show Details)
tsoome added reviewers: allanjude, imp.
jhb added a reviewer: jhb.
This revision is now accepted and ready to land.Sep 30 2016, 10:04 PM
allanjude edited edge metadata.

Approved for commit

Remember to include 'reviewed by: jhb' in the commit message

This revision was automatically updated to reflect the committed changes.