Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1489359 - SIGSEGV in GDM when SELinux PAM setup fails (Unable to get valid context for USERNAME)
Summary: SIGSEGV in GDM when SELinux PAM setup fails (Unable to get valid context for ...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gdm
Version: 7.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Ray Strode [halfline]
QA Contact: Desktop QE
Depends On:
Blocks: 1479818
TreeView+ depends on / blocked
Reported: 2017-09-07 09:23 UTC by Carl Henrik Lunde
Modified: 2021-06-10 12:58 UTC (History)
5 users (show)

Fixed In Version: gdm-3.26.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-10 13:04:05 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 781413 0 Normal RESOLVED manager: fix crash if session fails to start 2020-11-16 09:06:04 UTC
Red Hat Product Errata RHBA-2018:0770 0 None None None 2018-04-10 13:05:33 UTC

Description Carl Henrik Lunde 2017-09-07 09:23:27 UTC
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):

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

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 13:59:22 UTC
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 13:30:57 UTC
Sent directly

Comment 4 Ray Strode [halfline] 2017-09-08 14:35:15 UTC
Thanks, it looks like the problem is fixed with this commit:


Comment 5 gjisbzirpva 2017-09-18 06:02:09 UTC
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 13:04:05 UTC
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.


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