Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyCdlibInvalidISO('Invalid SUSP SP record') on VirtualBox Guest Additions CD #130

Open
ANogin opened this issue Dec 3, 2024 · 1 comment

Comments

@ANogin
Copy link

ANogin commented Dec 3, 2024

$ wget https://download.virtualbox.org/virtualbox/7.1.0/VBoxGuestAdditions_7.1.0.iso
[...]
$ python3.9
Python 3.9.5 (default, Nov 23 2021, 15:27:38) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycdlib
>>> iso = pycdlib.PyCdlib()
>>> iso.open("VBoxGuestAdditions_7.1.0.iso")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aleksey/.local/lib/python3.9/site-packages/pycdlib/pycdlib.py", line 4152, in open
    self._open_fp(fp)
  File "/home/aleksey/.local/lib/python3.9/site-packages/pycdlib/pycdlib.py", line 2320, in _open_fp
    ic_level, lastbyte = self._walk_directories(self.pvd, extent_to_ptr,
  File "/home/aleksey/.local/lib/python3.9/site-packages/pycdlib/pycdlib.py", line 1066, in _walk_directories
    rr = new_record.parse(vd, data[offset:offset + lenbyte],
  File "/home/aleksey/.local/lib/python3.9/site-packages/pycdlib/dr.py", line 309, in parse
    self.rock_ridge.parse(record[record_offset:],
  File "/home/aleksey/.local/lib/python3.9/site-packages/pycdlib/rockridge.py", line 2534, in parse
    raise pycdlibexception.PyCdlibInvalidISO('Invalid SUSP SP record')
pycdlib.pycdlibexception.PyCdlibInvalidISO: Invalid SUSP SP record
$ python3.9 -m pip show pycdlib | grep Version
Version: 1.14.0
@clalancette
Copy link
Owner

So this is definitely a bug on that ISO. That is the second SP record in the directory hierarchy (the first is in the root directory record, and this one is on ".."), and the SUSP specification clearly says in 5.3:

"Only one "SP" System Use Entry shall be recorded within a single Directory Hierarchy."

Further, even relaxing that check to allow it to get by, I hit a second exception:

Traceback (most recent call last):
  File "/home/clalancette/upstream/pycdlib/isoparse.py", line 10, in <module>
    iso.open(sys.argv[1])
  File "/home/clalancette/upstream/pycdlib/pycdlib/pycdlib.py", line 4065, in open
    self._open_fp(fp)
  File "/home/clalancette/upstream/pycdlib/pycdlib/pycdlib.py", line 2235, in _open_fp
    ic_level, lastbyte = self._walk_directories(self.pvd, extent_to_ptr,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/clalancette/upstream/pycdlib/pycdlib/pycdlib.py", line 1128, in _walk_directories
    block = self.pvd.track_rr_ce_entry(ce_record.bl_cont_area,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/clalancette/upstream/pycdlib/pycdlib/headervd.py", line 492, in track_rr_ce_entry
    block.track_entry(offset, length)
  File "/home/clalancette/upstream/pycdlib/pycdlib/rockridge.py", line 3693, in track_entry
    raise pycdlibexception.PyCdlibInvalidISO('Overlapping CE regions on the ISO')
pycdlib.pycdlibexception.PyCdlibInvalidISO: Overlapping CE regions on the ISO

Pycdlib should probably accept this, but it is going to be somewhat complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants