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

Linux make fpicker-linux frid-core.h fault #24

Open
ZERO-A-ONE opened this issue Apr 15, 2023 · 0 comments
Open

Linux make fpicker-linux frid-core.h fault #24

ZERO-A-ONE opened this issue Apr 15, 2023 · 0 comments

Comments

@ZERO-A-ONE
Copy link

ZERO-A-ONE commented Apr 15, 2023

My current directory structure is:

syc@ubuntu:~/Downloads/fpicker-main$ tree ./
./
├── aflpp-ios.patch
├── assets
│   └── fpicker_logo.png
├── examples
│   ├── protocol_example
│   │   ├── in
│   │   │   └── 1
│   │   ├── protocol_example.c
│   │   ├── README.md
│   │   ├── test-fuzzer.js
│   │   └── wisec21_tutorial_frida_fuzzing.pdf
│   ├── test
│   │   ├── in
│   │   │   ├── 0
│   │   │   └── 1
│   │   ├── Makefile
│   │   ├── test.c
│   │   └── test-fuzzer.js
│   └── test-network
│       ├── in
│       │   ├── 0
│       │   └── 1
│       ├── Makefile
│       ├── test-network.c
│       └── test-network-fuzzer.js
├── fp_afl_mode.c
├── fp_communication.c
├── fpicker.c
├── fpicker.h
├── fp_standalone_mode.c
├── frida-core-linux.h
├── harness
│   ├── darwin-shm.js
│   ├── fuzzer.js
│   └── stalker-instrumentation.js
├── libfrida-core-linux.a
├── LICENSE
├── Makefile
└── README.md

A compile error occurs, indicating that there is no frida-core.h

syc@ubuntu:~/Downloads/fpicker-main$ make fpicker-linux
cc -fPIC -m64 -ffunction-sections -fdata-sections -Wall -Wno-format -Os -pipe -g3 fpicker.c fp_communication.c fp_standalone_mode.c fp_afl_mode.c -o fpicker -L. -lfrida-core-linux -ldl -lm -lresolv -lrt -Wl,--export-dynamic -Wl,--gc-sections,-z,noexecstack -pthread
fpicker.c:2:10: fatal error: frida-core.h: No such file or directory
    2 | #include "frida-core.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
In file included from /usr/include/string.h:495,
                 from frida-core-linux.h:22131,
                 from fpicker.h:2,
                 from fp_communication.c:1:
In function ‘strncpy’,
    inlined from ‘create_communication_map’ at fp_communication.c:257:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 12 bytes from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:11: fpicker-linux] Error 1

I can compile it successfully if I re-patch it (frida-core-devkit-15.2.2-linux-x86_64)

./
├── aflpp-ios.patch
├── assets
│   └── fpicker_logo.png
├── examples
│   ├── protocol_example
│   │   ├── in
│   │   │   └── 1
│   │   ├── protocol_example.c
│   │   ├── README.md
│   │   ├── test-fuzzer.js
│   │   └── wisec21_tutorial_frida_fuzzing.pdf
│   ├── test
│   │   ├── in
│   │   │   ├── 0
│   │   │   └── 1
│   │   ├── Makefile
│   │   ├── test.c
│   │   └── test-fuzzer.js
│   └── test-network
│       ├── in
│       │   ├── 0
│       │   └── 1
│       ├── Makefile
│       ├── test-network.c
│       └── test-network-fuzzer.js
├── fp_afl_mode.c
├── fp_communication.c
├── fpicker.c
├── fpicker.h
├── fp_standalone_mode.c
├── frida-core.h
├── frida-core-linux.h
├── harness
│   ├── darwin-shm.js
│   ├── fuzzer.js
│   └── stalker-instrumentation.js
├── libfrida-core-linux.a
├── LICENSE
├── Makefile
└── README.md

syc@ubuntu:~/Downloads/fpicker-main$ make fpicker-linux
cc -fPIC -m64 -ffunction-sections -fdata-sections -Wall -Wno-format -Os -pipe -g3 fpicker.c fp_communication.c fp_standalone_mode.c fp_afl_mode.c -o fpicker -L. -lfrida-core-linux -ldl -lm -lresolv -lrt -Wl,--export-dynamic -Wl,--gc-sections,-z,noexecstack -pthread
In file included from /usr/include/string.h:495,
                 from frida-core-linux.h:22131,
                 from fpicker.h:2,
                 from fp_communication.c:1:
In function ‘strncpy’,
    inlined from ‘create_communication_map’ at fp_communication.c:257:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 12 bytes from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Is this right?

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

No branches or pull requests

1 participant