1、 Background
In the previous article, the research group needs to encapsulate AFL as a web API with docker in order to make a visual display of AFL on the web side. When the script is redeployed, the AFL boot fails when calling AFL for fuzzing. Because before executing AFL fuzzy
, if the system is configured to send core dump file (core) notification to external programs, the delay between sending crash information to fuzzer will increase, and the crash may be falsely reported as timeout. So you have to modify the core temporarily_ Pattern
file, as follows:
echo core > /proc/sys/kernel/core_pattern
However, an error occurs when executing the above command in the docker container:
bash: /proc/sys/kernel/core_pattern: Read-only file system
Core_ Pattern is a system read-only file and cannot be modified
2、 Doubt
When docker is executed, the root user executes various commands internally. Why can’t you change the files with read-only permission?With this question, baidu found it again and again, but it didn’t find one. Therefore, it checked a machine turned post, which is also ambiguous.
Since Baidu can’t, then Google. After checking for two minutes, I found a blog of compatriots across the Strait and found a solution.
3、 Solution
Direct code:
# Add the --privileged parameter when building the container
docker run -idt -p xx:xx --privileged afl-api:0.0.3
As with the above command, the problem can be solved by adding an additional -- privileged
parameter when building the container.
4、 Cause
About version 0.6, privileged was introduced into docker
with this parameter, the root in the container has real root permissions
otherwise, the root in the container is only an external ordinary user permission
with the container started by privileged, you can see many devices on the host and execute mount
it even allows you to start the docker container in the docker container
That is, the container with the -- privileged
parameter can really execute root permission.
Read More:
- [Solved] Doris 5 Doris_core Run make Error: bk_messages.hh:214:26 error: invalid conversion from ‘char‘ …
- docker-compose -version Run Error [How to Fix]
- ERROR conda.core.link:_execute(699): An error occurred while installing package ‘‘Rolling back trans
- [Solved] ubuntu Run jupyter Error: print(‘Error in generated code:‘, file=sys.stderr) SyntaxError: invalid syntax
- The docker export container cannot be run after being imported: error response from daemon: no command specified
- Linux apt-get update Error: Error in `appstreamcli‘: double free or corruption … Aborted (core dumped)
- [Solved] linux kernel load driver Error: module verification failed: signature and/or required key missing – tainting kernel
- [ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: “configs“
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [Solved] Docker Staratup Error: Failed to start Docker Application Container Engineadsafdsad.
- [Solved] Docker Download Mirror Error: Cannot connect to the Docker daemon at…
- [Solved] Win 10 VS Code Connect to the container of the server error: Cannot connect to the Docker daemon at … Is the docker daemon running
- Docker Error: error invoking remote method ‘docker-start-container‘: error: (http code 500) server error –
- [Solved] docker Error: System has not been booted with systemd as init system (PID 1). Can‘t operate. Failed to con
- Docker pull Command Error response from daemon: Head https://registry-1.docker.io/v2/library/
- [Solved] Job for docker.service failed because the control process exited with error code. After changing the docker configuration
- [Solved] docker Startup Error: Job for docker.service failed because the control process exited with error code
- Docker -v Directory Mount (How to Use)
- [Solved] failed to start remount root and kernel file system
- [Solved] sys.stderr.write(f“ERROR: {exc}“) SyntaxError: invalid syntax