Hang / endless loop trying to unpack some Android firmware

Open
#962 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start by obtaining the linked firmware or reduced testcase and reproducing the hang with binwalk -eM. Trace the recursive unpacking path that fails to terminate, then verify that the testcase completes without an endless loop while preserving normal extraction behavior.

Written by the indexing model from the issue text.

Description

While unpacking a certain firmware file that you can find here I discovered that recursive unpacking with binwalk -eM would hang:
https://firmware.center/firmware/Motorola/Android/XT1650%20Moto%20Z%20%28Griffin%29/Stock/XT1650-03/XT1650-03_GRIFFIN_RETEU-EMEA_MPL24.246-17_cid50_subsidy-DEFAULT_regulatory-03_CFC_EMEA.xml.zip

I tried tracking this down to a reduced test case. It's, however, still 700 MB (37MB compressed). Cannot upload due to Github's size limit, will provide it here for a while:
https://files.hboeck.de/binwalk-endlessloop-testcase.tar.xz

Dominant language
Rust
Stars
14.4k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ReFirmLabs/binwalk

All issues in ReFirmLabs/binwalk

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.