Earlier quoted context omitted.
> If these programs want to spy on each other's memory contents, they already can. No, they cannot. As an unprivileged process, you cannot access other processes' memory, with major distributions' default settings, even if the two processes share the same UID. The only way to achieve that would be to modify some execution path (e.g. .bashrc) to launch an evil wrapper which runs the target process in a way that allows…
Which distributions and which settings are you talking about? If you can run gdb on that distribution, then you can definitely do it, even if it's just because they whitelist gdb in selinux/aa (in which case you can just script gdb). And I rather doubt it is a default, since ptrace-based sandboxing is a thing (even Firefox was using it). And as for the second method, that's why I said same home directory. But there i…
kernel.yama.ptrace_scope = 1
> If you can run gdb on that distribution, then you can definitely do it, even if it's just because they whitelist gdb in selinux/aa (in which case you can just script gdb).
No, you can't. Try it.
> And I rather doubt it is a default, since ptrace-based sandboxing is a thing (even Firefox was using it).
You can trace child processes, but not any other process.