-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Binwalk 3.1.0 does not detect SquashFS in firmware files on Arch Linux #799
Comments
I have tested Binwalk v3 on XZ-compressed SquashFS images successfully, so it seems that there is a bug in identifying the SquashFS image in that particular firmware file. If you can provide a copy of the problematic firmware I can take a look at it, it may be an easy fix. Thanks! |
I have Binwalk installed via Pacman directly on Arch Linux, and I am unsure if this is the optimal installation method. The same firmware has been tested on a different machine running Ubuntu with Binwalk 2.3.3, and it successfully detects and extracts SquashFS without any manual intervention. The output that I get is this: The file is this: |
Ah, an interesting case. The very first XZ compression stream at offset This has been fixed in the master branch, output now looks like: |
Wow, thank you so much. This is an absolutly amazing tool, and you are doing an incredible job, thank you so much! When will the Pacman package get updated? |
Title: Binwalk 3.1.0 does not detect SquashFS in firmware files on Arch Linux
Description:
I encountered an issue with Binwalk 3.1.0 on Arch Linux where it fails to detect embedded SquashFS file systems in firmware files, even though it detects and extracts XZ-compressed layers correctly. On another machine running Ubuntu with Binwalk 2.3.3, the same firmware file is processed correctly, and SquashFS is identified and extracted successfully.
Steps to Reproduce:
Use a firmware file that contains XZ-compressed data and an embedded SquashFS file system.
Run the following command on Arch Linux with Binwalk 3.1.0:
Observe the output, which only shows multiple XZ-compressed sections but does not identify SquashFS.
Perform the same process on an Ubuntu machine with Binwalk 2.3.3, where SquashFS is detected and extracted properly.
Expected Behavior:
Binwalk should detect the embedded SquashFS file system after decompressing the XZ layers and extract it properly.
Actual Behavior:
Binwalk only detects and extracts XZ-compressed layers but does not identify SquashFS, stopping further extraction at the decompressed XZ layers.
Environment:
Logs and Output:
Here is an example output from the firmware file:
The extraction log shows success in extracting XZ layers but does not recurse further to detect SquashFS.
Troubleshooting Attempts:
Verified dependencies (e.g., squashfs-tools and xz-utils) are installed and functional.
Used the
--matryoshka
flag to force recursive extraction:Result: Same issue persists; SquashFS is not detected.
Extracted XZ layers manually using
dd
andunxz
, then inspected the extracted files with Binwalk, which still fails to detect SquashFS.Compared results with Binwalk 2.3.3 on Ubuntu, where SquashFS is detected successfully.
Reinstalled Binwalk and rebuilt it from source, but the issue remains.
Potential Cause:
This issue could be due to changes in how Binwalk 3.1.0 processes signatures or handles recursive extraction. It might also be related to Arch Linux’s handling of dependencies or configurations for Binwalk.
Request:
Please investigate the issue and provide a fix or guidance on properly configuring Binwalk 3.1.0 to detect SquashFS after decompressing XZ layers. If possible, clarify whether this is a regression or a configuration problem specific to Arch Linux.
Additional Information:
If required, I can provide the problematic firmware file or additional logs to assist with debugging. Thank you for your help!
The text was updated successfully, but these errors were encountered: