Bug 446760 - Ark fails to open ISO that can be mounted otherwise
Summary: Ark fails to open ISO that can be mounted otherwise
Status: RESOLVED UPSTREAM
Alias: None
Product: ark
Classification: Applications
Component: plugins (show other bugs)
Version: 21.08.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Ragnar Thomsen
URL: https://github.com/libarchive/libarch...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-10 00:01 UTC by Steve Zakulec
Modified: 2021-12-15 00:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Zakulec 2021-12-10 00:01:17 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Download ISO from here: https://archive.org/details/Power-Drive-DOS-1994 
2. Try to open ISO with Ark
3. 

OBSERVED RESULT
Ark says "The archive you're trying to open is corrupt."
Even if you tell it to open read-only, it doesn't show anything.

EXPECTED RESULT
This is a valid ISO that should be capable of being opened normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.23
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88
Qt Version: 5.15.3

ADDITIONAL INFORMATION
The blog post here: https://multimedia.cx/eggs/iso-9660-compromise-part-2-finding-root/ actually diagnoses the problem, and figures out why some software fails on loading the ISO, and others don't.
The actual files are also available as a ZIP file in the download link above.

You can successfully mount the ISO using the right click menu option in KDE "Mount ISO".

Here's the file listing I got using that option:
ls -la
total 705
dr-x------  1 steve steve   2048 Nov 21  1994 .
drwxr-x---+ 3 root  root    4096 Dec  9 18:54 ..
-r--------  1 steve steve     14 Nov  8  1991 batch1.bat
-r--------  1 steve steve    148 Nov  8  1991 batch2.bat
dr-x------  1 steve steve   2048 Nov  2  1994 cd
-r--------  1 steve steve  10080 Dec 22  1993 emuset.exe
dr-x------  1 steve steve   2048 Nov  8  1991 g
-r--------  1 steve steve  19128 Nov  2  1994 install.exe
-r--------  1 steve steve  92571 Dec 22  1993 megaem.exe
-r--------  1 steve steve     44 Nov  1  1991 pd.bat
-r--------  1 steve steve 566031 Nov 21  1991 pdrive.exe
dr-x------  1 steve steve   2048 Nov 17  1994 s
-r--------  1 steve steve  19128 Nov  2  1994 sound.exe

Mounting as a loop device also works:
sudo mount -t iso9660 -o loop ~/Downloads/Power-Drive.iso ~/games/iso
Comment 1 2wxsy58236r3 2021-12-11 05:32:29 UTC
I am wondering whether this is upstream's (libarchive / bsdtar) problem...

The author (Mike) of the blog post [1] reported an issue regarding ISO in libarchive in the past [2].
Although the issue ([2]) is not the same as this one (libarchive reports "Invalid length of directory record" for Power-Drive.iso), maybe he has some ideas about ISO support in libarchive.

Perhaps you can try contacting Mike (and maybe also open an issue in libarchive repo and "@" (mention) Mike)?

[1] https://multimedia.cx/eggs/iso-9660-compromise-part-2-finding-root/
[2] https://github.com/libarchive/libarchive/issues/954
Comment 2 Nate Graham 2021-12-14 18:26:55 UTC
Yep, looks like https://github.com/libarchive/libarchive/issues/954.
Comment 3 2wxsy58236r3 2021-12-15 00:37:15 UTC
(In reply to Nate Graham from comment #2)
> Yep, looks like https://github.com/libarchive/libarchive/issues/954.

I tried the patch in that issue (multimediamike@abb59bd) but it does not solve the problem for the file Power-Drive.iso.

Also, that issue is opened several years ago (2017), while Mike's "ISO-9660 Compromise, Part 2: Finding Root" is posted in October 2021:
> I recently discovered another bit of compromise in the ISO-9660 spec

So I guess this may be a different issue. But anyway I agree that this issue should probably be forwarded to upstream (libarchive).