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

Infinite loop during extraction #778

Open
AndrewFasano opened this issue Feb 18, 2024 · 5 comments
Open

Infinite loop during extraction #778

AndrewFasano opened this issue Feb 18, 2024 · 5 comments
Assignees
Labels
bug Something isn't working format:filesystem

Comments

@AndrewFasano
Copy link
Contributor

AndrewFasano commented Feb 18, 2024

Unblob can get stuck in an infinite loop extracting and recursing into the same file. Observed extracting https://dlcdnets.asus.com/pub/ASUS/wireless/RT-AC68R/GPL_RT_AC68R_300438520633.zip with the current head of main 727c385.

This filesystem seems to include some sort of "bad directory" test within itself which is breaking unblob at:

GPL_RT_AC68R_300438520633.zip_extract/GPL_RT-AC68U_3.0.0.4.385.20633-g593a8ef.tgz_extract/GPL_RT-AC68U_3.0.0.4.385.20633-g593a8ef.tar_extract/asuswrt/release/src/router/e2fsprogs/tests/f_baddir

In that directory unblob just keeps repeatedly extracting the same file forever leading to paths like:

./image.gz_extract/image_extract/0-102400.extfs_extract/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/test/root/
@qkaiser qkaiser self-assigned this Feb 19, 2024
@qkaiser qkaiser added bug Something isn't working format:filesystem labels Feb 19, 2024
@qkaiser
Copy link
Contributor

qkaiser commented Feb 19, 2024

It's a bug in debugfs, probably similar to tytso/e2fsprogs#149

@qkaiser
Copy link
Contributor

qkaiser commented Feb 19, 2024

More specifically, the filesystem should either be ignored or fixed prior to running debugfs. File was checked in e2fsprogs at tytso/e2fsprogs@19c78dc

@qkaiser
Copy link
Contributor

qkaiser commented Feb 19, 2024

Be extremely cautious with e2fsprogs test files by the way, endless loops and endless directory creations by debugfs can lead to all sorts of problems on Linux systems.

@AndrewFasano
Copy link
Contributor Author

Thanks for the info! Is this something that should change in unblob or should I be doing something different when running unblob (or parsing the resulting file system?). Thanks!

@qkaiser
Copy link
Contributor

qkaiser commented Feb 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format:filesystem
Projects
None yet
Development

No branches or pull requests

2 participants