PDA

Bekijk Volledige Versie : A short warning on the X11 Editres protocol



Florian Weimer
01/06/05, 18:55
The xterm manual page contains a strongly worded warning about the
allowSendEvents configuration option:

| allowSendEvents (class AllowSendEvents)
| Specifies whether or not synthetic key and button events
| (generated using the X protocol SendEvent request) should be
| interpreted or discarded. The default is =E2=80=98=E2=80=98false=E2=
=80=99=E2=80=99 meaning they
| are discarded. Note that allowing such events creates a very
| large security hole. The default is =E2=80=98=E2=80=98false.=E2=80=99=
=E2=80=99

However, xterm is an Xt application and therefore speaks a
long-forgotten protocol called Editres. As a result, any Editres
client (such as "editres") can instruct an xterm window to change its
allowSendEvents setting. After that, it's possible to send
synthesized events to the xterm window and hijack the terminal.

Other Xt applications may have similar issues. If an application is
SUID or SGID and does not drop privileges early in the startup
process, a privilege escalation vulnerability might exist (but it's
probably easier to exploit it by providing carefully constructed
resource settings from the beginning).

I'm not sure that the author of the paragraph was right to label this
as a security hole; certainly it's just a minor one. However, the
xterm documentation should be updated. (A previous attempt to resolve
this issue quietly had failed.)

Frank v Waveren
02/06/05, 20:55
--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 31, 2005 at 11:37:37PM +0200, Florian Weimer wrote:
> However, xterm is an Xt application and therefore speaks a
> long-forgotten protocol called Editres. As a result, any Editres
> client (such as "editres") can instruct an xterm window to change its
> allowSendEvents setting. After that, it's possible to send
> synthesized events to the xterm window and hijack the terminal.
And even if it weren't toggleable with editres, there's still the
XTEST extension which seems to be pretty omnipresent these days.
Basically, you shouldn't be mixing privileges in one X session (even
using the security extension it's generally something you want to
avoid, design-wise).


--=20
Frank v Waveren Fingerprint: BDD7 D61E
fvw@[var.cx|stack.nl] ICQ#10074100 5D39 CF05 4BFC F57A
Public key: hkp://wwwkeys.pgp.net/468D62C8 FA00 7D51 468D 62C8


--2fHTh5uZTiUOsy+g
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCntqD+gB9UUaNYsgRAot1AJ9UzPNX96T5vAnsQrF7PT 252/WxVQCfVi7T
zdKlKxygmN2zDYQQ0a36IAU=
=pX4o
-----END PGP SIGNATURE-----

--2fHTh5uZTiUOsy+g--