Bug 7572 - dbus privilege escalation in KDE 4
Summary: dbus privilege escalation in KDE 4
Status: RESOLVED DUPLICATE of bug 3310
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 1
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 18:32 CEST by Aragorn Son of Arathorn
Modified: 2012-09-27 01:10 CEST (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Aragorn Son of Arathorn 2012-09-25 18:32:05 CEST
Description of problem:

When accessing/browsing the Login Screen section under the System Administration "chapter" in KDE's System Settings, even without changing any settings, the styling tweaks and settings of one's personal desktop change - i.e. color scheme, single-click versus double-click, etc. - to those of the root account.

As a side problem, this completely screwed up my Power Management settings in System Settings.  There were no power profiles defined by name anymore in the list, the settings were all set for a laptop, and changing them had no effect, because upon a next visit of the Power Management settings, they had all reverted to these laptop settings.  Creating a new power profile was not possible, because it did not show up in the list.

Logging out of KDE - I have my system running in runlevel 3 - and starting KDE again did not make any difference.  I found that there was a root-owned dbus session file in my home directory, under the directory ~/.dbus/session-bus/.  Deleting the file and running a "sudo chown -R aragorn:aragorn" on my home directory didn't make any change, presumably because the dbus session file was still being kept open.  So upon starting up KDE again, everything was still as screwed-up as it was.

Later on I rebooted the machine, and I found that after the reboot, everything was back to normal.  The Performance profile had returned to the list of power profiles in Power Management, and even the auxiliary new profile which I had attempted to create but which had previously not showed up in the list was there now.

My conclusion is that there is some privilege escalation situation in KDE4 - probably upstream - which propagates through dbus.

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

Version-Release number of selected component (if applicable):

All KDE4 versions in Mageia 1 are afflicted with this problem.  I already noticed this when I installed Mageia 1 for the first time.  Presumably - but I'm no developer - this ties in with the creation of a .config directory which gets created in the root directory - i.e. /, not /root - with a file called Trolltech.conf inside of it, and which all KDE4 versions seem to be afflicted by, in all distributions.  I've got confirmation that this directory also gets created in Debian and in openSUSE.

The creation of this directory is a separate bug of course, but the upstream KDE developers don't seem too concerned with hunting it down, and I believe that it ties in with this particular dbus/KDE bug which I am reporting here and now.

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

How reproducible:

Set your KDE theme to something other than the default Mageia theme.  Make it sufficiently different, i.e. colors, single-click mouse, different mouse acceleration settings, et al.  You may log out and back in, because style changes et al will normally only apply to newly opened windows, I believe.

Next, open up the KDE System Settings application and click on Login Screen in the System Administration section.  Browse around in that, click a few tabs, but don't make any changes.  As soon as you exit that Login Screen section, you will find that the color of the mouse selection will have changed back to the Mageia default - or whatever you have chosen as the color scheme for the root user - and back to a double-click mouse.  If you don't make any changes to the styling again, logging out of KDE and back in will completely reset your desktop to the default (root) Mageia style.

With or without a logout, changes made to the Power Management section of the System Settings will not stick, and you are not able to create any power profiles.

If you check ~/.dbus/session-bus/, you will find a root-owned session file there.

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

Note: This problem is KDE-specific, because there is no such contamination or dbus take-over when using the Mageia Control Center.  Within the Mageia Control Center itself, one does of course see the root user's color scheme and style - which is the Mageia default scheme and style - but once you exit the Mageia Control Center, or if you switch to any other window while the MCC is open, there is no contamination or escalation of privileges.
Comment 1 Aragorn Son of Arathorn 2012-09-25 18:37:20 CEST
Temporary workaround: As mentioned higher up already, a reboot remedied the issue.  A simple logout/login wouldn't do the trick, not even after completely logging out - by which I mean "not just shutting down KDE, but also logging out of your user account".
David Walser 2012-09-25 22:51:59 CEST

CC: (none) => balcaen.john

David Walser 2012-09-25 22:52:22 CEST

CC: (none) => nicolas.lecureuil

Comment 2 John Balcaen 2012-09-27 01:10:23 CEST
This is https://bugs.kde.org/show_bug.cgi?id=254430 & duplicate of #3310

*** This bug has been marked as a duplicate of bug 3310 ***

Status: NEW => RESOLVED
Resolution: (none) => DUPLICATE


Note You need to log in before you can comment on or make changes to this bug.