From 9e08548ca3046bd6af7e8d68784808f391321f55 Mon Sep 17 00:00:00 2001 From: yxw <3360776475@qq.com> Date: Mon, 17 Feb 2025 15:16:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=B3=E9=A2=86=20syzkaller/strace.md=20?= =?UTF-8?q?=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/syzkaller/strace.md | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/sources/syzkaller/strace.md b/sources/syzkaller/strace.md index 0ac5f95..3b13663 100644 --- a/sources/syzkaller/strace.md +++ b/sources/syzkaller/strace.md @@ -1,31 +1,26 @@ --- -status: collected +status: translated title: "Strace" author: Syzkaller Community collector: jxlpzqc +translator: CAICAIIs collected_date: 20240314 +translated_date: 20250217 priority: 10 link: https://github.com/google/syzkaller/blob/master/docs/strace.md --- # Strace -Syzkaller can be instructed to execute programs under -[strace](https://strace.io/) and capture the output. +Syzkaller 可以配置为在 [strace](https://strace.io/) 下执行程序并捕获输出。 -If the `strace_bin` is set to an `strace` binary, syzkaller will automatically -run each reproducer it managed to find under the `strace` binary. -* If a syz-manager is attached to a `dashboard`, syzkaller will upload the - resulting output as a normal log file if the generated reproducer still - managed to produce the same crash. -* Otherwise, the output of strace will be saved to a separate file and will be - accessible through the syz-manager's web interface. +若将 `strace_bin` 设置为某个 `strace` 二进制文件,syzkaller 将自动使用该`strace` 二进制文件运行所有成功获取的复现器。 +* 若 syz-manager 已关联至某个「信息中心」,当生成的复现器仍能触发相同崩溃时,syzkaller 会将 strace 输出作为普通日志文件上传。 +* 若未关联信息中心,strace 的输出将被保存至独立文件,并可通过 syz-manager 的网页界面访问。 -## How to compile the strace binary +## 如何编译 strace 二进制文件 -It is safer to compile `strace` as a statically linked binary in order to -prevent problems with mismatching libc versions on the kernel image used for -fuzzing. +为避免因模糊测试所用内核镜像中的 libc 版本不匹配导致问题,建议将 `strace` 编译为静态链接二进制文件。 ``` git clone https://github.com/strace/strace.git @@ -35,16 +30,14 @@ cd strace make -j`nproc` ``` -The resulting binary can be found at `src/strace`. +编译生成的二进制文件位于 `src/strace` 路径下。 ## syz-crush -It's possible to instruct `syz-crush` to run the attached repro under strace. In -order to do so, make sure `strace_bin` is specified in the syz-manager config -file and pass an extra `-strace` argument to the command arguments. +可配置 `syz-crush` 在 strace 下运行关联的复现器。具体操作时, +请确保 syz-manager 配置文件中已指定 `strace_bin` 参数,并在命令行参数中额外添加 `-strace` 参数。 ## syz-repro -If `-strace file-name.log` is appended to the `syz-repro`'s arguments, the tool -will run the resulting repro (if it managed to generate one) under strace and -save its output. +若在 `syz-repro` 的参数后追加 `-strace file-name.log`,该工具将在 strace 下运行生成的复现器(若成功生成),并保存其输出。 + From dcc309ddea39e1883f3de1395594cc353b2ae85a Mon Sep 17 00:00:00 2001 From: yxw <3360776475@qq.com> Date: Mon, 17 Feb 2025 16:18:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=B3=E9=A2=86=20syzkaller/strace.md=20?= =?UTF-8?q?=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/syzkaller/strace.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/syzkaller/strace.md b/sources/syzkaller/strace.md index 3b13663..cf5356f 100644 --- a/sources/syzkaller/strace.md +++ b/sources/syzkaller/strace.md @@ -14,8 +14,8 @@ link: https://github.com/google/syzkaller/blob/master/docs/strace.md Syzkaller 可以配置为在 [strace](https://strace.io/) 下执行程序并捕获输出。 -若将 `strace_bin` 设置为某个 `strace` 二进制文件,syzkaller 将自动使用该`strace` 二进制文件运行所有成功获取的复现器。 -* 若 syz-manager 已关联至某个「信息中心」,当生成的复现器仍能触发相同崩溃时,syzkaller 会将 strace 输出作为普通日志文件上传。 +若将 `strace_bin` 设置为某个 `strace` 二进制文件,syzkaller 将自动使用该 `strace` 二进制文件运行所有成功获取的重现用例。 +* 若 syz-manager 已关联至某个「信息中心」,当生成的重现用例仍能触发相同崩溃时,syzkaller 会将 strace 输出作为普通日志文件上传。 * 若未关联信息中心,strace 的输出将被保存至独立文件,并可通过 syz-manager 的网页界面访问。 ## 如何编译 strace 二进制文件 @@ -34,10 +34,10 @@ make -j`nproc` ## syz-crush -可配置 `syz-crush` 在 strace 下运行关联的复现器。具体操作时, +可配置 `syz-crush` 在 strace 下运行关联的重现用例。具体操作时, 请确保 syz-manager 配置文件中已指定 `strace_bin` 参数,并在命令行参数中额外添加 `-strace` 参数。 ## syz-repro -若在 `syz-repro` 的参数后追加 `-strace file-name.log`,该工具将在 strace 下运行生成的复现器(若成功生成),并保存其输出。 +若在 `syz-repro` 的参数后追加 `-strace file-name.log`,该工具将在 strace 下运行生成的重现用例(若成功生成),并保存其输出。