X Window System security

The biggest limitation of Plash for GUI programs is that the X Window System (X11) provides almost no security.

The X server allows an X client to:

See:

Existing security mechanisms

The X Security extension has been around for a long time but isn't much used because it is very limited. It divides clients into two protection domains, which it calls "trusted" and "untrusted". X clients within one protection domain can still interfere with each other. You really need a separate protection domain for each application.

SSH was changed to use XSecurity: The "-X" option now makes X clients connecting via ssh into "untrusted" clients. The "-Y" option makes them "trusted" clients. On Debian/Ubuntu systems, however, this feature is normally switched off, because it breaks many applications. See the ForwardX11Trusted setting in the ssh_config man page.

New security mechanisms: XACE

XACE (X Access Control Extension) is being added to the Xorg X server. It generalises the hooks that XSecurity added and makes them available to other extensions. See XACE.

XSELinux

One such extension is XSELinux, which uses SELinux to make security decisions according to SELinux's centralised policy. When a process connects to the X server, XSELinux finds out its identity (security context) using getpeercon(), a SELinux-specific system call. (Plash does not provide anything analgous to getpeercon() because it is not an identity-based security system.)

It is not clear how XSELinux will provide secure labelling of windows (eg. via title bars). This requires changes to window managers. It presumably requires a new X request for getting the "security context" of a window, analagous to getpeercon(). If this is added, will it be SELinux-specific?

References:

Related work

Related problems on Windows

Windows has a similar problem to X11. On Windows, attacks involving sending keypress events to another application are known as "shatter attacks".

X11Security (last edited 2008-06-16 12:44:40 by MarkSeaborn)