process and memory access
Can a process's parent write into its memory (code segment) ?!
|
well i think generally the parents memory all becomes copy on write and both the parent and child get copies if they try to write.
might be different if you create child with clone() ? you can always share memory either thru shared memory or mmap but not executable code section i don't think. I mean really does any process have write access to it's code ? accept for the fact that all linux segments are overlapping and all start at the same place. isn't all code segments either execute only or execute/read. |
My question is can I fork a process and call exec then change codesegment of the child process?
If I can do this, I can do this scenario on a program with root's suid such as passwd then run my own program with root's permission! :D |
No surprise... you can't do that.
|
I can't do what?
|
All times are GMT -5. The time now is 03:33 AM. |