Skip to contentSkip to conversation

Some questions about VM flags

DISCUSSION Robert Hancock 1 participant 1 message Mar 24, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Luca Falavigna

Shouldn't printf generate a segfault trying to read a variabile located in a write-only area?

What architecture is this on? On many CPUs it is not possible to enforce a write-only memory area in most cases (there is no way to give write permissions without giving read permissions).

Quoted 5 lines

Shellcode lies in this segment. It is executed even if VM_EXEC isn't set. I think execution shouldn't be permitted if only VM_READ or VM_WRITE flags are set. Buffer overflows/format string based exploits wouldn't be so popular if we implemented this feaure. Please let me know your opinion.

Likewise, many CPUs cannot enforce execution restrictions separate from read restrictions (x86 CPUs are like this, except for the latest ones with NX support, or if you're using a kernel patch like exec-shield that tries to emulate this support).

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/