|
|
Subscribe / Log in / New account

Ripples from Stack Clash

Ripples from Stack Clash

Posted Jul 2, 2017 3:07 UTC (Sun) by immibis (subscriber, #105511)
In reply to: Ripples from Stack Clash by jem
Parent article: Ripples from Stack Clash

With segmentation, you can have separation between stack and non-stack data pages - such that even if you have an address that points to the heap, if you try to use that address to access the stack, you get a segfault. (A *literal* segfault, not one of those pagefaults that we now call segfaults for historical reasons)


to post comments

Ripples from Stack Clash

Posted Jul 2, 2017 3:39 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

You can do this with the current architecture. Just use bit 62 of the address to indicate heap/stack and set the mappings accordingly.

Ripples from Stack Clash

Posted Jul 2, 2017 17:04 UTC (Sun) by dtlin (subscriber, #36537) [Link]

You shouldn't be able to change the segment selector through pointer arithmetic. In a flat address space, you have to somehow check that any pointer offset (that could conceivably be controlled by user input) doesn't cause the pointer to change that bit...


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds