Bug 1265813 - sddm-helper segfaults on login, returns to login screen
Summary: sddm-helper segfaults on login, returns to login screen
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sddm
Version: 23
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Martin Bříza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-23 20:16 UTC by Orion Poplawski
Modified: 2015-10-03 17:45 UTC (History)
7 users (show)

Fixed In Version: sddm-0.12.0-3.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-03 17:45:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2015-09-23 20:16:12 UTC
Description of problem:

Fresh F23 install in VM with NFS home directories.  sddm-helper segfaults on login returning you directly to the login screen.

Core was generated by `/usr/libexec/sddm-helper --socket /tmp/sddm-authae2bc886-67e5-4ff1-b306-9998e4b'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  SDDM::UserSession::setupChildProcess (this=0x5632a15c0490)
    at /usr/src/debug/sddm-0.12.0/src/helper/UserSession.cpp:115
115             if (setgid(pw->pw_gid) != 0) {

(gdb) list
110                 }
111             }
112
113             const char  *username = qobject_cast<HelperApp*>(parent())->user().toLocal8Bit();
114             struct passwd *pw = getpwnam(username);
115             if (setgid(pw->pw_gid) != 0) {
116                 qCritical() << "setgid(" << pw->pw_gid << ") failed for user: " << username;
117                 exit(Auth::HELPER_OTHER_ERROR);
118             }
119             if (initgroups(pw->pw_name, pw->pw_gid) != 0) {
(gdb) print username
$1 = 0x5632a15ee9e8 "ion"

username should be "orion" so something is getting corrupted.

Version-Release number of selected component (if applicable):
sddm-0.12.0-2.fc23.x86_64

How reproducible:
Most of the time, but not 100%.

Comment 1 Pier Luigi Fiorini 2015-09-23 20:26:03 UTC
Looks like this bug -> https://github.com/sddm/sddm/issues/489

We have a PR but I asked a change so the fix has not been applied yet.

Comment 2 Kevin Kofler 2015-09-23 23:39:02 UTC
See https://github.com/sddm/sddm/issues/489#issuecomment-142760373 for the bug that clobbers the string and the one-line fix.

Comment 3 Fedora Update System 2015-09-24 14:17:57 UTC
sddm-0.12.0-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16608

Comment 4 Kevin Kofler 2015-09-24 15:07:14 UTC
Uh, the other upstream fix you applied worries me a bit: Why bother filtering environment variables if you let LD_LIBRARY_PATH and QT_PLUGIN_PATH through? If environment variables are untrusted, then this is a blatant security hole. If they're not, why do they bother using a whitelist?

Comment 5 Rex Dieter 2015-09-24 17:14:20 UTC
Good points, excellent questions for sddm upstream (since these were commits already made, and will be included in subsequent sddm releases)

Comment 6 Fedora Update System 2015-09-25 16:33:06 UTC
sddm-0.12.0-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update sddm'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16608

Comment 7 Fedora Update System 2015-10-03 17:45:05 UTC
sddm-0.12.0-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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