This isn't tmux's fault; this is fundamentally the sort of thing that's possible under the security model of modern Linux desktops.
This isn't tmux's fault; this is fundamentally the sort of thing that's possible under the security model of modern Linux desktops.
Not with most default sudo configurations. Your sudo ticket exists outside your control as a regular user and, by default, is bound to your tty. An attacker controlling another terminal can't convince sudo to execute commands with your ticket.
> manipulate the memory of your terminal emulator
On some distros this might work but you can absolutely flip a switch to disallow processes running as the same user to access each-other's memory. On secure systems this causes devs a lot of annoyance since they cant attach a debugger.
How about controlling not another, but the same root terminal via send keys without tmux with another xorg terminal window?
You do appear to be correct that it's exploitable via other, also trivial, means. That does not make the situation any less bad.
That should be absolutely no one.
You can still attach a debugger on a newly created process, but if you want to attach to an already running process, you just need sudo. It's not really annoying.
The memory modification one sounds truly not possible. In Windows it is possible via OpenProcess and WriteProcessMemory to modify other process memory under some circumstances, but I do not think the same thing is generally possible under Linux (because in most distros ptrace has been mostly locked down for a few years now)
Tmux is part of the OpenBSD base system.
Tmux is not an officially developed program by the OpenBSD community.
It was imported June 1 2009.
Here is Theo de Raadt's post:
> By Theo de Raadt () on 2009-07-07 04:37
> The most impressive thing about tmux, in my view, is how frustrating the code audit was. In 2 hours, I found only one or two nits that had very minor security consequences.
> It was not accepted into the tree based on license alone. It is high quality code.
[1] https://en.wikipedia.org/wiki/OpenBSD#Subprojects
[2] https://undeadly.org/cgi?action=article&sid=20090707041154
[1] https://www.undeadly.org/cgi?action=article&sid=200907121904...
The tmux GitHub repo is the reference implementation. As an example, OpenSSH is developed internally to OpenBSD and the project creates a separate portable version. tmux is the opposite, it is developed independently of OpenBSD and the project maintains its own implementation.
Edit: because there is occasionally confusion on this point I recently documented it here: https://github.com/tmux/tmux/wiki/Contributing
In any event, tmux on OpenBSD also uses libevent as libevent is, naturally, part of the base system. libevent as most people know it was originally a portability fork of OpenBSD's version, similar to the portable versions of tmux, OpenSSH, etc, though unlike those projects core libevent development eventually switched to the portable version and OpenBSD stopped (AFAICT) backporting changes wholesale.