Bug 1489359 - SIGSEGV in GDM when SELinux PAM setup fails (Unable to get valid context for USERNAME)
SIGSEGV in GDM when SELinux PAM setup fails (Unable to get valid context for ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gdm (Show other bugs)
7.4
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Ray Strode [halfline]
Desktop QE
:
Depends On:
Blocks: 1479818
  Show dependency treegraph
 
Reported: 2017-09-07 05:23 EDT by Carl Henrik Lunde
Modified: 2018-05-17 10:39 EDT (History)
5 users (show)

See Also:
Fixed In Version: gdm-3.26.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 09:04:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Bugzilla 781413 None None None 2017-09-08 10:35 EDT
Red Hat Product Errata RHBA-2018:0770 None None None 2018-04-10 09:05 EDT

  None (edit)
Description Carl Henrik Lunde 2017-09-07 05:23:27 EDT
Description of problem:
GDM crashes on some login failure scenarios.  This makes it harder to debug the real issue.  I've opened this issue so you can consider checking this pointer.

Version-Release number of selected component (if applicable):
gdm-3.22.3-12.el7.x86_64

How reproducible:
Currently unknown

Steps to Reproduce:
1. Upgrade from 7.3 to 7.4, and get an SELinux issue :)  pam_selinux(gdm-password:session): Unable to get valid context for USERNAME
2. Try to log in
3.

Actual results:
GDM crashes in remove_user_session because manager->priv->user_sessions is null.

Expected results:
GDM should not crash when PAM setup fails

Additional info:

Core was generated by `/usr/sbin/gdm'.
Program terminated with signal 11, Segmentation fault.
#0  0x00005622e431e872 in remove_user_session (manager=0x5622e5361e00, session=0x5622e5348100) at gdm-manager.c:1959
1959            node = g_list_find (manager->priv->user_sessions, session);



(gdb) print manager->priv->user_sessions
$2 = (GList *) 0x0



#0  0x00005622e431e872 in remove_user_session (manager=0x5622e5361e00, session=0x5622e5348100) at gdm-manager.c:1959
#1  0x00007f720de6edcc in ffi_call_unix64 () from /lib64/libffi.so.6
#2  0x00007f720de6e6f5 in ffi_call () from /lib64/libffi.so.6
#3  0x00007f720f1ec1a8 in g_cclosure_marshal_generic () from /lib64/libgobject-2.0.so.0
#4  0x00007f720f1eb968 in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#5  0x00007f720f1fda7d in signal_emit_unlocked_R () from /lib64/libgobject-2.0.so.0
#6  0x00007f720f205af1 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#7  0x00007f720f205ddf in g_signal_emit () from /lib64/libgobject-2.0.so.0
#8  0x00005622e432766b in on_opened (worker=<optimized out>, res=<optimized out>, user_data=0x5622e535d9c0) at gdm-session.c:918
#9  0x00007f720f4b6f64 in g_task_return_now () from /lib64/libgio-2.0.so.0
#10 0x00007f720f4b760e in g_task_return () from /lib64/libgio-2.0.so.0
#11 0x00007f720f4f5eb9 in reply_cb () from /lib64/libgio-2.0.so.0
#12 0x00007f720f4b6f64 in g_task_return_now () from /lib64/libgio-2.0.so.0
#13 0x00007f720f4b760e in g_task_return () from /lib64/libgio-2.0.so.0
#14 0x00007f720f4ea9d9 in g_dbus_connection_call_done () from /lib64/libgio-2.0.so.0
#15 0x00007f720f4b6f64 in g_task_return_now () from /lib64/libgio-2.0.so.0
#16 0x00007f720f4b6f99 in complete_in_idle_cb () from /lib64/libgio-2.0.so.0
#17 0x00007f720ef110d7 in g_idle_dispatch () from /lib64/libglib-2.0.so.0
#18 0x00007f720ef144c9 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#19 0x00007f720ef14818 in g_main_context_iterate.isra.21 () from /lib64/libglib-2.0.so.0
#20 0x00007f720ef14aea in g_main_loop_run () from /lib64/libglib-2.0.so.0
#21 0x00005622e4314914 in main (argc=1, argv=0x7ffed8fbf678) at main.c:404



journal: gnome-shell: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
journal: Name taken or bus went away - shutting down
gnome-session: gnome-session-binary[2167]: WARNING: Lost name on bus: org.gnome.SessionManager
gnome-session-binary[2167]: WARNING: Lost name on bus: org.gnome.SessionManager
journal: gnome-settings-daemon: Fatal IO error 2 (No such file or directory) on X server :0.
gdm: Child process -2167 was already dead.
kernel: traps: gdm[1445] general protection ip:55b7d246d872 sp:7ffd19f6de20 error:0 in gdm[55b7d2454000+5e000]
abrt-hook-ccpp: Process 1445 (gdm) of user 0 killed by SIGSEGV - dumping core
systemd: gdm.service: main process exited, code=dumped, status=11/SEGV
systemd: Unit gdm.service entered failed state.
systemd: Triggering OnFailure= dependencies of gdm.service.
systemd: gdm.service failed.
Comment 2 Ray Strode [halfline] 2017-09-07 09:59:22 EDT
NULL is a valid GList, so there must be more to the story here.

Do you mind attaching the core file?
Comment 3 Carl Henrik Lunde 2017-09-08 09:30:57 EDT
Sent directly
Comment 4 Ray Strode [halfline] 2017-09-08 10:35:15 EDT
Thanks, it looks like the problem is fixed with this commit:

https://git.gnome.org/browse/gdm/commit/?id=0ab4f63
Comment 5 gjisbzirpva 2017-09-18 02:02:09 EDT
I have this problem. How can I fix it? Now I can only login with root account. Creating a new account also doesn't work.
Comment 10 errata-xmlrpc 2018-04-10 09:04:05 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0770

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