Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91453 - x11-terms/xterm: Window Title Input Validation Error
Summary: x11-terms/xterm: Window Title Input Validation Error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL: http://securitytracker.com/alerts/200...
Whiteboard: B2? [noglsa] jaervosz
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-04 09:28 UTC by Jean-François Brunette (RETIRED)
Modified: 2009-09-25 20:30 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-François Brunette (RETIRED) gentoo-dev 2005-05-04 09:28:53 UTC
it's confirmed that version 184 is vulnerable, but for the other versions...?

--------------------------

Description:  David Remahl reported a vulnerability in xterm in the processing of window titles. A remote user may be able to cause arbitrary commands to be executed.

The software does not properly validate user-supplied input. A remote user can provide content that includes specially crafted escape sequences that may cause arbitrary commands to be executed on the target user's system.

The original advisory is available at:

http://remahl.se/david/vuln/012/
Impact:  A remote user may be able to cause arbitrary commands to be executed.
Comment 1 David Remahl 2005-05-04 09:46:00 UTC
According to xterm's maintainer, this is a case of an insecure default configuration on Mac OS X.

// David Remahl
Comment 2 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-04 23:02:19 UTC
X11 please check.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2005-05-04 23:45:00 UTC
Seemant handles this.
Comment 4 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-05-09 23:06:02 UTC
Seemant please advise.
Comment 5 Thomas Dickey 2005-05-18 16:22:29 UTC
Regarding comment #1, something got lost in translation.
The feature is configurable, and is normally enabled,
irregardless of platform. (I've pointed this out in a few
other places, but so far no packager has chosen to disable
it).
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2005-05-31 09:43:03 UTC
Thomas -- what do we have to do to fix this stuff in Gentoo? 
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2005-05-31 09:43:10 UTC
Thomas -- what do we have to do to fix this stuff in Gentoo? 
Comment 8 Thomas Dickey 2005-05-31 10:13:30 UTC
Add "*allowWindowOps:false" to the system's copy of XTerm
in the app-defaults directory.  The same for UXTerm of course.
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2005-06-10 08:12:29 UTC
ok, xterm-200-r2 and xterm-202-r1 are both in portage now.  please make sure,
arches, to mark *XTERM-200-R2* stable and NOT 202.  The 202 is a
development/unstable branch only (and realistically should be package.masked). 
Actually, I will do that.  Once I get Thomas the output from 202 that causes
breakages and we're able to sort it out, we can start looking at 202's unmasking.

With that long-winded thing, I'm done now :)
Comment 10 Thierry Carrez (RETIRED) gentoo-dev 2005-06-10 08:16:11 UTC
Arches, please test and mark xterm-200-r2 stable
Target KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sparc x86"
Comment 11 Ferris McCormick (RETIRED) gentoo-dev 2005-06-10 08:42:16 UTC
sparc done.  Builds and runs fine.
Comment 12 Joe Jezak (RETIRED) gentoo-dev 2005-06-10 10:53:09 UTC
PPC stable.
Comment 13 Aron Griffis (RETIRED) gentoo-dev 2005-06-10 13:29:57 UTC
stable on alpha ia64
Comment 14 Yuta SATOH (RETIRED) gentoo-dev 2005-06-11 01:36:57 UTC
Stable on ppc64.
Comment 15 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-06-12 03:44:27 UTC
Stable on hppa.
Comment 16 Thierry Carrez (RETIRED) gentoo-dev 2005-06-12 06:55:09 UTC
Ready for GLSA vote.
I tend to vote 1/2 NO, as (if I understand correctly) it needs heavy user
interaction to work... But maybe I didn't really understand it.
Comment 17 Thomas Dickey 2005-06-12 07:55:37 UTC
Well yes - it's mostly relying on a contrived example:
user cat's a binary file to his terminal which just happens
to be specially designed to send a "bad" shell command to
be on the title-string of his terminal and then uses the
retrieve-title feature to send the shell command back to
the host - minus the trailing newline (because that doesn't
come with the retrieve-title).  User then is persuaded
(?) to just press enter, completing the "bad" command.
Comment 18 Tavis Ormandy (RETIRED) gentoo-dev 2005-06-12 08:32:14 UTC
definitely NO to glsa, imho.
Comment 19 Matthias Geerdsen (RETIRED) gentoo-dev 2005-06-12 12:22:44 UTC
another no from me as well I guess
Comment 20 Thierry Carrez (RETIRED) gentoo-dev 2005-06-12 13:48:28 UTC
Closing without GLSA
Comment 21 Georgi Georgiev 2005-06-12 17:08:47 UTC
(In reply to comment #9)
> ok, xterm-200-r2 and xterm-202-r1 are both in portage now.  please make sure,
> arches, to mark *XTERM-200-R2* stable and NOT 202.  The 202 is a
> development/unstable branch only (and realistically should be package.masked). 
> Actually, I will do that.  Once I get Thomas the output from 202 that causes
> breakages and we're able to sort it out, we can start looking at 202's unmasking.
> 
> With that long-winded thing, I'm done now :)

I'm guessing that 

    echo "*allowWindowOps:  false" > ${D}/etc/X11/app-defaults/XTerm
    echo "*allowWindowOps:  false" > ${D}/etc/X11/app-defaults/UXTerm

was supposed to be

    echo "*allowWindowOps:  false" >> ${D}/etc/X11/app-defaults/XTerm
    echo "*allowWindowOps:  false" >> ${D}/etc/X11/app-defaults/UXTerm

Comment 22 Thierry Carrez (RETIRED) gentoo-dev 2005-06-13 02:00:24 UTC
Sure, that's bug 95858
Comment 23 Hardave Riar (RETIRED) gentoo-dev 2005-07-02 20:09:51 UTC
Stable on mips.
Comment 24 Samuli Suominen (RETIRED) gentoo-dev 2009-09-24 09:23:03 UTC
Thomas, is this still required for xterm #248? I'm asking because the issue is quite old, and I'd like to drop the hack from the ebuild if it's not required anymore.
Comment 25 Thomas Dickey 2009-09-25 19:51:00 UTC
The source still uses a true as default.  I added menu
entries and symbols (DEF_ALLOW_WINDOW in this case) which
can be #define'd in a build as an alternative to patching
the resource file.
Comment 26 Thomas Dickey 2009-09-25 20:30:16 UTC
Whether to make the resource default to false depends on
the packager's preferences.

For the record, I just checked Debian/testing using vttest,
and see that except for konsole and mlterm, the terminal emulators
I've got allow part or all of this group of escape sequences
(and unlike xterm, that is not configurable ;-).

The others: gnome-terminal, mrxvt, pterm, rxvt, rxvt-unicode