[Pkg-xfce-devel] Bug#658678: lightdm: leaks FDs to child processes
Package: lightdm
Version: 1.0.6-3
Severity: normal
Dear Maintainer,
lightdm appears to leak several file descriptors to the child process
it creates for the session, which propagate to nearly every process
running in an interactive session.
For example, running ls -l /proc/self/fd from a terminal in X yields
lrwx------ 1 amdragon amdragon 64 Feb 4 23:52 0 -> /dev/pts/15
lrwx------ 1 amdragon amdragon 64 Feb 4 23:52 1 -> /dev/pts/15
lr-x------ 1 amdragon amdragon 64 Feb 4 23:52 13 -> pipe:[10098]
l-wx------ 1 amdragon amdragon 64 Feb 4 23:52 14 -> pipe:[10098]
lr-x------ 1 amdragon amdragon 64 Feb 4 23:52 15 -> pipe:[10099]
l-wx------ 1 amdragon amdragon 64 Feb 4 23:52 16 -> pipe:[10099]
lrwx------ 1 amdragon amdragon 64 Feb 4 23:52 2 -> /dev/pts/15
lr-x------ 1 amdragon amdragon 64 Feb 4 23:52 3 -> /proc/27874/fd/
lr-x------ 1 amdragon amdragon 64 Feb 4 23:52 4 -> pipe:[9306]
l-wx------ 1 amdragon amdragon 64 Feb 4 23:52 5 -> pipe:[9306]
l-wx------ 1 amdragon amdragon 64 Feb 4 23:52 6 -> /var/log/lightdm/lightdm.log
FDs 4 through 16 were inherited from the lightdm process, as can be
seen from its open FDs,
$ sudo ls -l /proc/`pidof lightdm`/fd
total 0
lrwx------ 1 root root 64 Feb 4 23:54 0 -> /dev/null
lrwx------ 1 root root 64 Feb 4 23:54 1 -> /dev/null
lr-x------ 1 root root 64 Feb 4 23:54 10 -> pipe:[9315]
l-wx------ 1 root root 64 Feb 4 23:54 11 -> pipe:[9315]
lrwx------ 1 root root 64 Feb 4 23:54 12 -> socket:[10302]
lr-x------ 1 root root 64 Feb 4 23:54 13 -> pipe:[10098]
l-wx------ 1 root root 64 Feb 4 23:54 14 -> pipe:[10098]
lr-x------ 1 root root 64 Feb 4 23:54 15 -> pipe:[10099]
l-wx------ 1 root root 64 Feb 4 23:54 16 -> pipe:[10099]
lrwx------ 1 root root 64 Feb 4 23:54 17 -> socket:[10101]
lrwx------ 1 root root 64 Feb 4 23:54 2 -> /dev/null
lrwx------ 1 root root 64 Feb 4 23:54 3 -> anon_inode:[eventfd]
lr-x------ 1 root root 64 Feb 4 23:54 4 -> pipe:[9306]
l-wx------ 1 root root 64 Feb 4 23:54 5 -> pipe:[9306]
l-wx------ 1 root root 64 Feb 4 23:54 6 -> /var/log/lightdm/lightdm.log
lrwx------ 1 root root 64 Feb 4 23:54 7 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Feb 4 23:54 8 -> socket:[8076]
lrwx------ 1 root root 64 Feb 4 23:54 9 -> anon_inode:[eventfd]
FD 6 is particularly worrisome, as it allows any process to write to
the root-owned lightdm log.
It might be relevant that I use an .xsession script and Xmonad with no
desktop environment.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages lightdm depends on:
ii adduser 3.113
ii consolekit 0.4.5-1
ii dbus 1.4.16-1
ii debconf [debconf-2.0] 1.5.41
ii libc6 2.13-23
ii libglib2.0-0 2.30.2-4
ii libpam0g 1.1.3-6
ii libxcb1 1.7-4
ii libxdmcp6 1:1.1.0-4
ii lightdm-gtk-greeter 1.0.6-3
Versions of packages lightdm recommends:
ii xserver-xorg 1:7.6+10
Versions of packages lightdm suggests:
ii accountsservice 0.6.15-2
-- debconf information:
lightdm/daemon_name: /usr/sbin/lightdm
* shared/default-x-display-manager: lightdm
Reply to: