hyperlight-dev / hyperlight-dev/hyperlight

Self-modifying code should crash on modification

未关闭
#562 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area/security lifecycle/confirmed
主要语言
Rust
星标
4.7k
派生
208
平均合并
1 天 7 小时
30 天内合并 PR
47

描述

### What happened?

For defense in depth, attempts to write to code segments should abort the guest.

### What did you expect to happen?

I expected a crash, but instead the modification was successful.

### Steps to reproduce the behavior

The following test should crash when run in a guest:

```c
void victim() {}

void should_crash() {
void (*victim_ptr)() = victim;
*((char *)victim_ptr) = 0;
}
```

### Hyperlight Version

0.5.1

### OS version

```console
$ cat /etc/os-release
NAME="Microsoft Azure Linux"
VERSION="3.0.20250521"
ID=azurelinux
VERSION_ID="3.0"
PRETTY_NAME="Microsoft Azure Linux 3.0"
ANSI_COLOR="1;34"
HOME_URL="https://aka.ms/azurelinux"
BUG_REPORT_URL="https://aka.ms/azurelinux"
SUPPORT_URL="https://aka.ms/azurelinux"
$ uname -a
Linux 75b2257d5bbb 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux````

### Additional Information

_No response_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。