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

TypeError: Error while decompressing: 1 #21

Closed
prbluebottle opened this issue Aug 30, 2020 · 1 comment · Fixed by #36
Closed

TypeError: Error while decompressing: 1 #21

prbluebottle opened this issue Aug 30, 2020 · 1 comment · Fixed by #36

Comments

@prbluebottle
Copy link

Hi,

Running master (v0.3 tag) I get this while trying to decompress a big-endian JFFS2 filesystem from a mips_24kc architecture. Debian 10 on x64.

$ jefferson 3A0000.jffs2
duplicate inode use detected!!!
duplicate inode use detected!!!
duplicate inode use detected!!!
duplicate inode use detected!!!
duplicate inode use detected!!!
Traceback (most recent call last):
  File "/usr/local/bin/jefferson", line 513, in <module>
    main()
  File "/usr/local/bin/jefferson", line 484, in main
    fs_list = list(scan_fs(content, cstruct.BIG_ENDIAN, verbose=args.verbose))
  File "/usr/local/bin/jefferson", line 328, in scan_fs
    inode.unpack(content[0 + offset :])
  File "/usr/local/bin/jefferson", line 213, in unpack
    self.data = jffs2_lzma.decompress(node_data, self.dsize)
  File "/usr/local/lib/python3.7/dist-packages/jefferson/jffs2_lzma.py", line 20, in decompress
    decompressed = pylzma.decompress(lzma_data)
TypeError: Error while decompressing: 1
$ binwalk 3A0000.jffs2 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             JFFS2 filesystem, big endian
$ python3 --version
Python 3.7.3
$ pip3 list|egrep 'cstruct|pylzma'
cstruct          1.8           
pylzma           0.5.0
@managerboard
Copy link

managerboard commented Sep 24, 2021

you may try to disable duplicate node check to see if still issues.

src/scripts/jefferson

@@ def scan_fs(content, endianness, verbose=False):
dirent.unpack(content[0 + offset :], offset)
if dirent.ino in dirent_dict:
print("duplicate inode use detected!!!")
#remove below lines
fs_index += 1
fs[fs_index] = {}
fs[fs_index]["endianness"] = endianness
fs[fs_index][JFFS2_NODETYPE_INODE] = []
fs[fs_index][JFFS2_NODETYPE_DIRENT] = []
fs[fs_index][JFFS2_NODETYPE_XATTR] = []
fs[fs_index][JFFS2_NODETYPE_XREF] = []
fs[fs_index][JFFS2_NODETYPE_SUMMARY] = []
dirent_dict = {}

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 a pull request may close this issue.

2 participants