DynamoRIO / DynamoRIO/dynamorio

CRASH: writable app code written by client

Open
#404 0 comments 0 reactions 0 assignees View on GitHub
Migrated Priority-Medium
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on March 04, 2011 11:56:09_

this was hit by Dr. Memory issue #319

Dr. Memory allocates +rwx memory via dr_nonheap_alloc() and generates code
there that is treated as app code.
later it wants to add more code to that page.
but DR made the writable code page read-only.
Dr. Memory doesn't know that, and its write faults.
DR says "here's a write while on the dstack, that's an unrecoverable DR or
client fault", and so doesn't even make it to check_for_modified_code().

for now, Dr. Memory could keep read-only and make writable just when need
to add new code: dr_memory_protect() will flush the cache on the +w, but
should work.
perhaps there should be a DR API for client app gencode that's added to or
changed during execution?

_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=404_

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.