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

outguess fails with 'Empty input file" in some architectures, including ARM, for jpg only #7

Open
eribertomota opened this issue Aug 21, 2021 · 1 comment
Labels
arm64 Bug in arm64 bug Something isn't working help wanted Extra attention is needed

Comments

@eribertomota
Copy link
Collaborator

On Debian Sid, the command outguess fails when doing dist check on arm64, armel, armhf, ppc64el and s390x when doing tests with jpg. outguess works fine on amd64 and i386 and in all archs if testing .ppm files. I think fixing for arm will solve for all archs.

The message when failing is:

FAIL: embed_extract_jpg.sh
==========================


Embedding a message...
Reading test.jpg....
JPEG compression quality set to 75
Extracting usable bits:   4611 bits
./embed_extract_jpg.sh: line 9: 30181 Trace/breakpoint trap   ../src/outguess -k "secret-key-001" -d message.txt test.jpg test-with-message.jpg

Extracting a message...
Reading test-with-message.jpg....
Empty input file
ERROR
FAIL embed_extract_jpg.sh (exit status: 1)

I have access to all architectures and I can make tests. From GDB in ARM64:

(gdb) run
Starting program: /home/eriberto/outguess-0.3/src/outguess -k secret-key-001 -d message.txt test.jpg test-with-message.jpg
Reading test.jpg....
JPEG compression quality set to 75
Extracting usable bits:   4611 bits

Program received signal SIGTRAP, Trace/breakpoint trap.
preserve_jpg (bitmap=0xffffffffed40, off=<optimized out>) at jpg.c:183
183     jpg.c: No such file or directory.

On my local machine, amd64 (NOT ARM), the result is:

(gdb) run
Starting program: /PKGS/outguess/outguess/src/outguess -k secret-key-001 -d message.txt test.jpg test-with-message.jpg
Reading test.jpg....
JPEG compression quality set to 75
Extracting usable bits:   4611 bits
Correctable message size: 2396 bits, 51.96%
Encoded 'message.txt': 344 bits, 43 bytes
Finding best embedding...
    0:   178(47.3%)[51.7%], bias   177(0.99), saved:     0, total:  3.86%
    1:   178(47.3%)[51.7%], bias   160(0.90), saved:     0, total:  3.86%
    6:   169(44.9%)[49.1%], bias   138(0.82), saved:     0, total:  3.67%
  180:   159(42.3%)[46.2%], bias   140(0.88), saved:     1, total:  3.45%
180, 299: Embedding data: 344 in 4611
Bits embedded: 376, changed: 159(42.3%)[46.2%], bias: 140, tot: 4596, skip: 4220
Foiling statistics: corrections: 61, failed: 4, offset: 23.333333 +- 33.018711
Total bits changed: 299 (change 159 + bias 140)
Storing bitmap into data...
Writing test-with-message.jpg....
[Inferior 1 (process 18261) exited normally]
(gdb) 

@hoijui, do you have any time to help?

Thanks in advance.

@eribertomota eribertomota added arm64 Bug in arm64 bug Something isn't working help wanted Extra attention is needed labels Aug 21, 2021
@eribertomota
Copy link
Collaborator Author

Complementing, this is an old bug. I disabled a CI check[1] in Debian in 07 Feb 2020 to avoid issues in ARM64.

[1] https://salsa.debian.org/pkg-security-team/outguess/-/blame/debian/master/debian/tests/control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64 Bug in arm64 bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant