DynamoRIO / DynamoRIO/dynamorio

Multi-data-section page protection assumes 4K pages

Open
#5,565 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

DR sets up a number of different data sections with different frequencies of self-protection and uses page protection syscalls to mark them read-only at certain points. However, we noticed that the section alignment has a hardcoded assumption of 4K pages, which is likely to lead to problems:

```
define DECLARE_DATA_SECTION(name, wx) \
asm(".section " name ", \"a" wx "\""); \
asm(".align 12"); /* 2^12 */
```

The data protection is currently only enabled on Windows IIRC which is likely why we never hit an issue on say an AArch64 machine with 64K pages.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.