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)
Oct 31 2024, 11:37 PM
Unknown Object (File)
Oct 23 2024, 5:05 AM
Unknown Object (File)
Oct 16 2024, 7:29 AM
Unknown Object (File)
Oct 12 2024, 9:23 AM
Unknown Object (File)
Oct 10 2024, 2:08 PM
Unknown Object (File)
Sep 30 2024, 9:24 PM
Unknown Object (File)
Sep 17 2024, 9:38 AM
Unknown Object (File)
Sep 9 2024, 2:48 AM
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 Not Applicable
Unit
Tests Not Applicable

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.