gdm-signal segfaults if passed bad arguments

Bug #45680 reported by Chris Moore
10
Affects Status Importance Assigned to Milestone
powermanagement-interface (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

$ gdm-signal -help

(gdm-signal:7645): Gdk-CRITICAL **: gdk_display_get_name: assertion `GDK_IS_DISPLAY (display)' failed
Segmentation fault

The problem is that the call to g_option_context_parse() in autodown.c doesn't have its return value checked.

Then, in gdm-logout-action.c, gdk_display_get_default() returns NULL, and so does gdk_display_get_name(), which is then passed into strchr(), which dereferences the NULL pointer it was passed causing the crash.

I know I should use "--help", not "-help", but the effect of me missing a '-' shouldn't be a segfault.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

Confirmed in gutsy, powermanagement-interface version: 0.3.15.

Changed in powermanagement-interface:
status: Unconfirmed → Confirmed
Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package powermanagement-interface - 0.3.19

---------------
powermanagement-interface (0.3.19) jaunty; urgency=low

  * Use pmi.stub for any architecture not explicitly listed, not just hppa
    and sparc. (Conditional syntax used requires make >= 3.80+3.81.b3.)
  * Strip gdm-signal binary.
  * Generate shared library dependencies for gdm-signal so that it can't be
    installed on a system with an unsuitable libc (LP: #182651).
  * Depend on ucf (LP: #149678).
  * Don't segfault if argument parsing fails (LP: #45680).
  * Make gdm-signal/Makefile quieter on clean.

 -- Colin Watson <email address hidden> Fri, 14 Nov 2008 09:31:20 +0000

Changed in powermanagement-interface:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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