Skip to content

lzma data error on a seemingly problematic squashfs filesystem #652

@brainstorm

Description

@brainstorm

I'm seeing a lot of errors while running backhand(-cli) against a Flash memory I dumped from a home router:

% cargo run --bin unsquashfs-backhand squashfs_part1.sqsh
(...)
          Failed squashfs-root/usr/lib/libiptext6.so : lzma data error
          Failed squashfs-root/usr/lib/libmmdbdtests.so : lzma data error
          Failed squashfs-root/usr/lib/libwlctl.so : lzma data error
          Failed squashfs-root/usr/lib/libiqctl.so : lzma data error
          Failed squashfs-root/usr/lib/libmmdevcallstate.so : lzma data error
          Failed squashfs-root/usr/lib/lua/socket/url.lua : lzma data error
(...)

While a lot of files decompress successfully and their contents are legit, a lot of other files are 0-byte sized, i.e:

% ls -alh squashfs-root/bin
total 0
drwxr-xr-x 60 rvalls staff 1.9K Aug 23  2017 .
drwxr-xr-x 20 rvalls staff  640 Sep 25  2017 ..
lrwxr-xr-x  1 rvalls staff    7 Sep 25  2017 ash -> busybox
lrwxr-xr-x  1 rvalls staff    7 Sep 25  2017 base64 -> busybox
-rw-r--r--  1 rvalls staff    0 Dec  5 15:30 board_detect
-rw-r--r--  1 rvalls staff    0 Dec  5 15:30 busybox
lrwxr-xr-x  1 rvalls staff    7 Sep 25  2017 cat -> busybox

I've tried other tools before such as unsquashfs, sasquatch and sqsh-tools, but none of them handle this filesystem particularly well, perhaps yours yields the most output though...

Here's the full context and how to obtain (and slice) the aforementioned squashfs_part1.sqsh file if you are curious: Gottox/sqsh-tools#298

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions