Package: python3-binwalk
Version: 2.3.4+dfsg1-1
Severity: normal
Tags: upstream
X-Debbugs-Cc: shor...@yandex.by

Dear Maintainer,

While trying to unpack everything from a blob that contains a cramfs
using the "binwalk -e blob_name.bin" I've encountered an error:

WARNING: Extractor.execute failed to run external extractor 'cramfsck -x 
'cramfs-root' '%e'': [Errno 2] No such file or directory: 'cramfsck', 'cramfsck 
-x 'cramfs-root' '%e'' might not be installed correctly

Sure enough, there truly is no "cramfsck" executable, neither in /usr/bin
nor in /usr/sbin. I've found it in "cramfs-tools" repository
(https://github.com/npitre/cramfs-tools/blob/master/cramfsck.c) but
there is no such package in Debian. There is an "fsck.cramfs" from the
"util-linux" package that is doing what "cramfsck" is, albeit with
a different arguments: "-x" is "--extract" in "fsck.cramfs".

The bug was reported upstream some time ago
(https://github.com/ReFirmLabs/binwalk/issues/623) with not much
attention (and latest commit in the repository was around 7 months ago).
Issue is also present with two other Linux distributions: Arch Linux
(tested by myself right now) and it's derivative Manjaro (encountered by
at least one user 2.5 years ago
https://forum.manjaro.org/t/how-to-install-cramfsswap/48970)

While so far it seems that this is the problem of the upstream to adapt
to distributions using "util-linux"'s "fsck.cramfs" instead of
"cramfsck" the issue is also in the fact that "fsck.cramfs" is in
/usr/sbin, which is not in the PATH of non-root users on Debian by
default. As I don't think anyone would try to install a whole another
package for functionality that is present in "util-linux" and neither
it is possible to just symlink "cramfsck" to "fsck.cramfs" due to
argument incompatibility, the only probable way of this is to patch
"binwalk" to try "fsck.cramfs" and maybe symlink "fsck.cramfs" to
/usr/bin for non-root users to see.

However, of course, maybe you can see a better resolution of this. I
will try to figure out some way of patching the "binwalk" for the new
utility in the meantime, if nobody beats me to it.

-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-11-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-binwalk depends on:
ii  libmagic1  1:5.44-3
ii  python3    3.11.2-1+b1

Versions of packages python3-binwalk recommends:
ii  arj                3.10.22-26
ii  bzip2              1.0.8-5+b1
ii  cramfsswap         1.4.2
ii  mtd-utils          1:2.1.5-1
ii  ncompress          4.2.4.6-6
ii  p7zip              16.02+dfsg-8
ii  p7zip-full         16.02+dfsg-8
ii  python3-pyqtgraph  0.13.1-4
ii  sleuthkit          4.11.1+dfsg-1+b1
ii  squashfs-tools     1:4.5.1-1

python3-binwalk suggests no packages.

-- no debconf information

Reply via email to