After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 87291 - gdm should not open tcp ports by default
gdm should not open tcp ports by default
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.4.0.x
Other other
: Normal major
: ---
Assigned To: GDM maintainers
Trevor Curtis
Depends on:
Blocks:
 
 
Reported: 2002-07-03 22:29 UTC by Rui Miguel Seabra
Modified: 2003-07-08 08:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rui Miguel Seabra 2002-07-03 22:29:56 UTC
I have no real statistics but I'd bet most people using gdm are using it on
personal computers, not targeted (by default) at exporting X to other users.

That way, gdm should not launch X and allowing X to listen to tcp connections.

Proposed Correction:

Instead of using:

[servers]
0=Standard

[server-Standard]
name=Standard server
command=/usr/X11R6/bin/X
flexible=true

Use:

[servers]
0=Standard
#0=AllowRemote

[server-Standard]
name=Standard server
command=/usr/X11R6/bin/X -nolisten tcp
flexible=true

[server-AllowRemote]
name=Standard server
command=/usr/X11R6/bin/X
flexible=true

in /etc/X11/gdm/gdm.conf
Comment 1 George Lebl 2002-07-08 23:06:07 UTC
It would be nice to do this with some config option rather then
defining  a new server.  That is, if an option is set, then always add
-nolisten tcp to the X command line.
Comment 2 Rui Miguel Seabra 2002-07-09 19:13:26 UTC
The two server options proposed were provided simply with the
intention of giving a clear example of how to allow remote connections
to an administrator who's not had experience with gdm.

A normal desktop user not only lacks the skill to manage his
workstation, but also has little to no notions of security.

That said, I don't think an option is needed here for 4 reasons:

1. this is a sane and safe default
2. only root can change this file or configure the system to use, or
not, gdm
3. normal desktop users don't log to X remotely (so there's no need to
expose them to unnecessary risks)
4. those that do usually have the systems set by professionals, who at
least should have an idea of how to change the gdm.conf by editing the
text file


Finally, if an option is added to automatically add the '-nolisten
tcp' flag, then that flag should have the default like:
   Allow remote user connections: [ ]  <-- note that it's off

or

   Do not allow remote user connections: [x] <-- note that it's on

But I really think that there is no need for an option here. Setting
remote user connections is a more advanced capability and can lay
safely hidden in the human readable text config file.
Comment 3 George Lebl 2003-05-15 08:20:44 UTC
Fixing this in cvs
Comment 4 Toni Willberg 2003-07-07 17:19:59 UTC
Is this really fixed in recent version? Atleast RedHat still ships
their gdm without "nolisten tcp" in current Rawhide. I'll check their
bugzilla soon too.

Perhaps this could be implemented in GDM Setup GUI, under "Security" tab?
Comment 5 Rui Miguel Seabra 2003-07-07 17:36:14 UTC
Right. So I added
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98697 to RedHat's
bugzilla. Nice to know there is one less security risk on account of
default settings :)
Comment 6 George Lebl 2003-07-07 22:10:47 UTC
the fix is adding the DisableTCP option and not adding -nolisten tcp
to the command line.  it is in the development version only and won't
be backported to the stable version.  When is the last time this
really was a problem?  The remote user still needs to have the correct
cookie.  A security hole would have to exist in X for this to be a
problem.
Comment 7 Rui Miguel Seabra 2003-07-08 08:30:44 UTC
A bug exploitable through a listening TCP port in some application.
That's not exactly something rare... You need a cookie to be able to
share an X connection, but not to gain advantage from a bug in the X
server's socket for remote X clients...