Comments (5)
I had a similar issue. The cause wasn't the memory limit but my build/version of qemu. Running inside the docker container, produced by the below Dockerfile, solved the issue for me (since it was able to use the precompiled binary for qemu). The Dockerfile includes an example of setting up a run for the Console
example firmware. All that's left to do is run ./exec.sh
inside the Docker container. I.e., after building the image, enter into the container docker run -ti <CONTAINER>
and then run ./exec.sh
.
FROM ubuntu:16.04
RUN mkdir -p /home/project
WORKDIR /home/project
# Setting up necessary packages
RUN apt-get update && \
apt-get install -y git build-essential gcc-arm-none-eabi zip python3 wget
# Setting up p2im
RUN git clone https://github.com/RiS3-Lab/p2im.git && \
cd p2im/ && \
git submodule update --init && \
git submodule update --remote && \
make -C afl/
# As an example, setting up the Console firmware
RUN WORKING_DIR=/home/project/p2im/fuzzing/Console/0 && \
mkdir -p ${WORKING_DIR} && \
cd ${WORKING_DIR} && \
cp /home/project/p2im/externals/p2im-real_firmware/binary/Console .
WORKDIR /home/project/p2im/fuzzing/Console/0
RUN cp -r /home/project/p2im/fuzzing/templates/seeds inputs && \
cp /home/project/p2im/fuzzing/templates/fuzz.cfg.template fuzz.cfg
# Setting up the seed so doesn't crash immediately
RUN echo "asdf" > inputs/random
# Manually setting up fuzz.cfg too for Console example
RUN sed -i '19s/.*/base = \/home\/project\/p2im/' fuzz.cfg && \
sed -i '21s/.*/program = Console/' fuzz.cfg && \
sed -i '23s/.*/run = 0/' fuzz.cfg && \
sed -i '47s/.*/board = FRDM-K64F/' fuzz.cfg && \
sed -i '48s/.*/mcu = MK64FN1M0VLL12/' fuzz.cfg && \
sed -i '61s/.*/img = %(working_dir)s\/Console/' fuzz.cfg && \
sed -i '68s/.*/objdump = \/usr\/bin\/arm-none-eabi-objdump/' fuzz.cfg
# Creating simple executable script
RUN echo "#!/bin/bash" > exec.sh && \
echo "/home/project/p2im/model_instantiation/fuzz.py -c fuzz.cfg" >> exec.sh && \
chmod +x exec.sh
from p2im.
This problem occurred in several binary tests in the testcase of ubuntu1604 and ubuntu1804. Have you solved it?
from p2im.
@zunlongzhou No, I can not solve this problem.
Same as luke-croak, I think it is not a memory limit problem.
I think this problem is caused by some binaries.
In my case, re-compiling some binaries worked.
from p2im.
It's most likely not a memory limit issue. I guess it's caused by "test cases crash", which causes QEMU crash or exit with a non-zero value (treated as a crash), you can figure out the "crash" reason by ./run_fw.py
following the instructions in https://github.com/RiS3-Lab/p2im#analyzing-crashinghanging-input
from p2im.
I run ./run_fw.py mentioned by @bofeng17 and I figured out that the "crash" is caused by the symbol link in the precompiled qemu provided by the p2im corrupted!
I guess the reason is that I copied the git repository from windows to ubuntu virtual machine.
One solution I found is listed in
https://askubuntu.com/questions/24266/error-while-loading-shared-libraries-file-too-short
from p2im.
Related Issues (20)
- How to get the qemu log information, when afl is running. HOT 1
- me.py error "Stage 1 returned due to unexpected reasons!" HOT 7
- KeyError:255, QEMU's return value is not found HOT 2
- Encounter a problem: get qemu log when fuzzing and then can not find crash anymore HOT 2
- Qemu hangs when running unit test
- What is the "aup" mean? HOT 1
- Generated model can fail validation when loaded HOT 1
- When using cov.py, should I copy my firmware?
- OSError: [Errno 8] Exec format error
- Need some help on 'Analyzing crashing'
- Steering Control stalls on round 0 HOT 2
- Docker Build Script Failed To Fetch HOT 5
- Where to locate peri-mod/peri-mod.h HOT 1
- Cannot find the repo HOT 1
- Crash Analysis HOT 1
- How to compile using ARMCC HOT 4
- Can p2im only be used to test devices with source code? HOT 1
- Dose p2im support the firmware that uses the SD card? HOT 1
- QEMU image librt: undefined symbol: __clock_nanosleep HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p2im.