konsole leaks file descriptors for /tmp/kde-$USER/konsole*.tmp

Bug #385999 reported by Warren E. Downs
264
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KDE Base
Fix Released
Medium
kdelibs
Fix Released
Medium
kde4libs (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Jaunty by Jonathan Thomas
kdebase (Fedora)
Fix Released
Medium

Bug Description

Binary package hint: konsole

Description: Ubuntu 9.04
Release: 9.04
Version: konsole 4:4.2.2-0ubuntu4
Expected behavior:

Programs executed by user within a konsole shell will only have file descriptors 0 (stdin), 1 (stdout), and 2 (stderr) open when they begin.

Actual behavior:

/usr/bin/konsole leaves multiple open file descriptors pointing to files in:

/tmp/kde-$USER/konsole*.tmp

when executing programs from within it.

It should perform a:

fcntl(fd, F_SETFD, FD_CLOEXEC)

on each of these file descriptors prior to exec'ing the program.

This is apparently also in other distributions as noted in this RedHat bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=466087

Security risk:
Leaving open file descriptors could potentially cause a sudo'ed process to dump privileged information to a non-root user file.

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

This is the one bug to rule them all.

Description of problem:

SELinux AVC warnings are being issued due to Konsole leaking open file descriptors

Will report this upstream, and all existing bugs and new bugs re this topic will be duped to this one.

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

*** Bug 471344 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

*** Bug 480569 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

*** Bug 466087 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

*** Bug 474819 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

*** Bug 477508 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Kevin (kevin-redhat-bugs) wrote :

*** Bug 490751 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

*** Bug 492916 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Kevin (kevin-redhat-bugs) wrote :

*** Bug 492608 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

Starting to think this isn't limited to konsole, per a recent comment I made to upstream report on this,

Interestingly,
launching konsole from yakuake (started as part of session management)
    -> no socket file descriptors
launching konsole from kickoff or krunner or yakuake (after login, not part of
session management)
    -> open socket file descriptors

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

*** Bug 495353 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

*** Bug 491462 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

Should be addressed in kdelibs-4.2.2-7

* Sun Apr 19 2009 Rex Dieter <email address hidden> 4.2.2-7
- fix and simplify the child struct disposal (kde#180785)

* Sat Apr 18 2009 Rex Dieter <email address hidden> 4.2.2-6
- squash leaky file descriptors in kdeinit (kde#180785,rhbz#484370)

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

kdeutils-4.2.2-2.fc10, kdetoys-4.2.2-2.fc10, kdesdk-4.2.2-2.fc10, kdeplasma-addons-4.2.2-2.fc10, kdeedu-4.2.2-1.fc10, kdebase-4.2.2-2.fc10, kdeartwork-4.2.2-3.fc10, kdeadmin-4.2.2-2.fc10, kdeaccessibility-4.2.2-1.fc10, sigen-0.1.1-1.fc10, qgit-2.2-4.fc10.1, psi-0.12.1-2.fc10, kde-plasma-weather-1.0.0-3.fc10, arora-0.6-1.fc10, kde-l10n-4.2.2-1.fc10, kdegraphics-4.2.2-3.fc10, kde-i18n-3.5.10-4.fc10, kdepimlibs-4.2.2-3.fc10, oxygen-icon-theme-4.2.2-1.fc10, kdebindings-4.2.2-2.fc10, kdepim-4.2.2-3.fc10, konq-plugins-4.2.2-1.fc10, kdemultimedia-4.2.2-2.fc10, kdenetwork-4.2.2-1.fc10, kdegames-4.2.2-6.fc10, kdebase-workspace-4.2.2-3.fc10, qt-4.5.0-14.fc10, kdebase-runtime-4.2.2-4.fc10, qjackctl-0.3.4-1.fc10, qsynth-0.3.3-6.fc10, kdelibs-4.2.2-7.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Rex (rex-redhat-bugs) wrote :

*** Bug 495353 has been marked as a duplicate of this bug. ***

visibility: private → public
Changed in kdebase (Fedora):
status: Unknown → Invalid
affects: kdebase (Ubuntu) → kdelibs (Ubuntu)
Changed in kdelibs (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
affects: kdelibs (Ubuntu) → kde4libs (Ubuntu)
Changed in kdebase (Fedora):
status: Invalid → Unknown
Changed in kdelibs:
status: Unknown → Fix Released
Changed in kdebase:
status: Unknown → Fix Released
Changed in kdebase (Fedora):
status: Unknown → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fixed in Karmic. Security team might want to SRU this.

Changed in kde4libs (Ubuntu):
status: Confirmed → Fix Released
Changed in kdelibs:
importance: Unknown → Medium
Changed in kde-baseapps:
importance: Unknown → Medium
Changed in kdebase (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.