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

WIP: Support non-standard images #174

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

wcampbell0x2a
Copy link
Owner

@wcampbell0x2a wcampbell0x2a commented Feb 28, 2023

  • Support non standard images. Read and Write!
  • Add Kind for including endian and version information
  • Add Kind: LE_V4_0 for linux kernel and upstream squashfs-tools support
  • Add Kind: BE_V4_0 for custom vendor firmware
  • Add Kind: AVM_BE_V4_0 for Fritz!OS firmware support. Added because it's interesting, as they kept some of it still BE.
  • Change lookup table from u32 to u64. This was working in LE, but is
    very wrong for LE!

See #72

@wcampbell0x2a
Copy link
Owner Author

@qkaiser do you know why the fragment table is broken from this unblob test image?

@qkaiser
Copy link

qkaiser commented Feb 28, 2023

@qkaiser do you know why the fragment table is broken from this unblob test image?

It's a non-standard image built by our fork of sasquatch to create SquashFS v4 in big-endian (see https://github.com/onekey-sec/sasquatch/). Not sure why the fragment table would be broken.

@wcampbell0x2a
Copy link
Owner Author

@qkaiser do you know why the fragment table is broken from this unblob test image?

It's a non-standard image built by our fork of sasquatch to create SquashFS v4 in big-endian (see https://github.com/onekey-sec/sasquatch/). Not sure why the fragment table would be broken.

I currently don't see a mksquashfs in that repo. At least the Makefile build system doesn't build it.

Also getting an error when using that fork with this test bin?

(4.5.1-sasquatch) $ ./sasquatch -be squashfs_v4.bin
Reading a different endian SQUASHFS filesystem on squashfs_v4.bin
FATAL ERROR: Block size too small.  File system is corrupt.

@qkaiser
Copy link

qkaiser commented Feb 28, 2023

I'll investigate and get back to you. May take a few days :)

@wcampbell0x2a wcampbell0x2a force-pushed the 72-support-non-standard-squashfs branch from 025e6c2 to fd9684a Compare March 1, 2023 03:49
@wcampbell0x2a
Copy link
Owner Author

I'll investigate and get back to you. May take a few days :)

All good! I figured it out :)

@wcampbell0x2a wcampbell0x2a force-pushed the 72-support-non-standard-squashfs branch 7 times, most recently from af120cd to ca02a87 Compare March 2, 2023 04:59
- Support non standard images. Read and Write!
- Add Kind for including endian and version information
- Add Kind: LE_V4_0 for linux kernel and upstream squashfs-tools support
- Add Kind: BE_V4_0 for custom vendor firmware
- Add Kind: AVM_BE_V4_0 for Fritz!OS firmware support. Added because
  it's interesting, as they kept some of it still BE.

- Change lookup table from u32 to u64. This was working in LE, but is
  very wrong for LE!

See #72
@wcampbell0x2a wcampbell0x2a force-pushed the 72-support-non-standard-squashfs branch from ca02a87 to 35d1404 Compare March 2, 2023 05:01
@wcampbell0x2a wcampbell0x2a merged commit 663217f into master Mar 5, 2023
@wcampbell0x2a wcampbell0x2a deleted the 72-support-non-standard-squashfs branch March 5, 2023 17:25
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

Successfully merging this pull request may close these issues.

2 participants