hyperlight-dev / hyperlight-dev/hyperlight

Self-modifying code should crash on modification

Đang mở
#562 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area/security lifecycle/confirmed
Ngôn ngữ chính
Rust
Star
4.7k
Fork
208
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
47

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.