Skip to content

Commit

Permalink
Merge pull request #126 from hust-open-atom-club/mudongliang-patch-1
Browse files Browse the repository at this point in the history
Proofread sources/syzkaller/linux/setup_linux-host_isolated.md
  • Loading branch information
mudongliang committed Jul 23, 2024
2 parents 7133a92 + 29767fe commit 0e79022
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions sources/syzkaller/linux/setup_linux-host_isolated.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
status: translated
status: proofread
title: "Setup: Linux isolated host"
author: Syzkaller Community
collector: jxlpzqc
collected_date: 20240314
translator: xiaobor123
translated_date: 20240317
proofreader: mudongliang
proofread_date: 20240723
link: https://github.com/google/syzkaller/blob/master/docs/linux/setup_linux-host_isolated.md
---

Expand All @@ -22,14 +24,16 @@ link: https://github.com/google/syzkaller/blob/master/docs/linux/setup_linux-hos
考虑到可能只有 SSH 可用,我们将使用反向 SSH 代理来允许模糊实例和管理器进行通信。

确保目标机器上的 sshd 配置中 AllowTcpForwarding 设置为 yes。

```
machine:~# grep Forwarding /etc/ssh/sshd_config
AllowTcpForwarding yes
```

## 内核

被隔离的虚拟机不部署内核映像,因此确保目标机器上的内核是使用以下选项构建的:
被隔离的虚拟机不部署内核映像,因此,请确保目标机器上的内核使用以下选项构建:

```
CONFIG_KCOV=y
CONFIG_DEBUG_INFO=y
Expand All @@ -38,6 +42,7 @@ CONFIG_KASAN_INLINE=y
```

当 KASLR 被禁用时,代码覆盖率效果更好:

```
# CONFIG_RANDOMIZE_BASE is not set
```
Expand All @@ -49,6 +54,7 @@ CONFIG_KASAN_INLINE=y
如果您无法使用 SSH 密钥,您应该配置您的管理机器以重用现有的 SSH 连接。

将以下行添加到您的 ~/.ssh/config 文件中:

```
Host *
ControlMaster auto
Expand All @@ -59,7 +65,6 @@ Host *

# 可选:Pstore 支持


如果被测试的设备(DUT)支持 Pstore,则可以配置 syzkaller 从 /sys/fs/pstore 获取崩溃日志。您可以在 syzkaller 配置文件的 `vm` 节中设置 `"pstore": true` 来实现这一点。

# 可选:启动脚本
Expand All @@ -71,6 +76,7 @@ Host *
按照[这里](/docs/linux/setup.md#go-and-syzkaller)描述的步骤构建 syzkaller。

使用以下配置:

```
{
"target": "linux/amd64",
Expand Down Expand Up @@ -101,7 +107,9 @@ Host *
- `vm.target_reboot` 如果远程进程挂起,则重新启动机器(对于广泛模糊测试很有用,默认情况下为false)

运行 syzkaller manager:

``` bash
./bin/syz-manager -config=my.cfg
```

如果在启动 syz-manager 后遇到问题,请考虑使用 -debug 标志运行它。同时参阅[此页面](/docs/troubleshooting.md)以获取故障排除提示。

0 comments on commit 0e79022

Please sign in to comment.