2 ms·
If we are writing programs to write to arbitrary memory, wouldn't it be easier to write them in C? :) int main(int argc, char *argv) { *((char *)addr_to_
by onlydnaq 13y ago
If we are writing programs to write to arbitrary memory, wouldn't it be easier to write them in C? :)
int main(int argc, char *argv) {
*((char *)addr_to_write) = val_to_write;
}
On a more serious note: this is a fun compiler bug, but I wouldn't call it a valid exploit. If you have the power to run your own binary on a system, then of course you can write to any memory the process has access to.
- tptacek 13y agoIt's valid in the sense of, if you tried to use an in-language sandbox to keep people from running arbitrary code on your machine, this would bypass it.