Variables defined twice in config files lead to crash

Bug #1377373 reported by Roland (Rolandixor) Taylor on 2014-10-04
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Critical
Robert Ancell
1.10
Critical
Robert Ancell
1.12
Critical
Robert Ancell
lightdm (Debian)
Fix Released
Unknown
lightdm (Ubuntu)
Critical
Robert Ancell
Trusty
Critical
Robert Ancell
Utopic
Critical
Robert Ancell

Bug Description

[Impact]
Having the same configuration variable defined in two places causes LightDM to a double free and potentially crash.

[Test Case]
1. Install two configuration files in /etc/lightdm/lightdm.conf.d which both define the same variable.
2. Run LightDM
Expected result:
LightDM runs correctly.
Observed result:
LightDM double frees a variable (seen with valgrind) and can crash.

[Regression Potential]
Low. The fix is not to double free the variable.

Changed in lightdm (Debian):
status: Unknown → Incomplete
Vlad Orlov (monsta) wrote :

You've probably chose to keep your current configuration file (/etc/lightdm/lightdm.conf) on LightDM upgrade.
If it's so, comment/erase these lines there:

greeter-session=lightdm-greeter
session-wrapper=/etc/X11/Xsession

Those lines do not exist. I purged and reinstalled LightDM and the same
error occurred.

 <http://about.me/rolandixor/>
Roland L. Taylor
about.me/rolandixor
  [image: Roland L. Taylor on about.me]
    <http://about.me/rolandixor>

On Wed, Oct 8, 2014 at 3:24 AM, Monsta <email address hidden> wrote:

> You've probably chose to keep your current configuration file
> (/etc/lightdm/lightdm.conf) on LightDM upgrade.
> If it's so, comment/erase these lines there:
>
> greeter-session=lightdm-greeter
> session-wrapper=/etc/X11/Xsession
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1377373
>
> Title:
> Lightdm crashes on startup
>
> Status in Light Display Manager:
> New
> Status in “lightdm” package in Debian:
> Incomplete
>
> Bug description:
> Lightdm crashes on startup for me, on Ubuntu 14.10.
>
> This is the offending error:
>
> *** Error in `lightdm': double free or corruption (fasttop):
> 0x0000000002535ca0 ***
> Aborted
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lightdm/+bug/1377373/+subscriptions
>

Note that this is a regression.

summary: - Lightdm crashes on startup
+ Variables defined twice in config files lead to crash
Changed in lightdm:
importance: Undecided → Critical
status: New → Fix Committed
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu Trusty):
status: New → Triaged
Changed in lightdm (Ubuntu Utopic):
status: New → In Progress
Changed in lightdm (Ubuntu Trusty):
status: Triaged → In Progress
importance: Undecided → Critical
Changed in lightdm (Ubuntu Utopic):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu Trusty):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu Utopic):
importance: Undecided → Critical
Changed in lightdm:
milestone: none → 1.13.0
Changed in lightdm (Debian):
status: Incomplete → Fix Released

Ok, this seem to have fixed the double or free corruption issue, however, lightdm still doesn't start for me:

[+0.26s] DEBUG: Session pid=1890: Greeter connected version=1.10.2
[+0.53s] DEBUG: Session pid=1890: Greeter closed communication channel
[+0.53s] DEBUG: Session pid=1890: Exited with return value 6
[+0.53s] DEBUG: Seat: Session stopped
[+0.53s] DEBUG: Seat: Stopping; failed to start a greeter
[+0.53s] DEBUG: Seat: Stopping
[+0.53s] DEBUG: Seat: Stopping display server

Seems like lightdm-gtk-greeter needs to be updated as well.

Adrian

Addendum:

From /var/log/lightdm/x-0-greeter.log:

*** Error in `/usr/sbin/lightdm-gtk-greeter': double free or corruption (fasttop): 0x00007f22865207c0 ***

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.12.1-0ubuntu1

---------------
lightdm (1.12.1-0ubuntu1) utopic; urgency=medium

  * New upstream release:
    - Fix crash when having configuration keys defined in multiple places
      (LP: #1377373)
    - Allow user switching in multi-seat until bug stopping greeter showing on
      logout is fixed
    - Disable log message when AccountsService users change (LP: #1376357)
 -- Robert Ancell <email address hidden> Thu, 09 Oct 2014 08:59:27 +1300

Changed in lightdm (Ubuntu Utopic):
status: In Progress → Fix Released
Robert Ancell (robert-ancell) wrote :

John - we you running the updated liblightdm? Both the daemon and this library use the same code and so should both be fixed on update.

description: updated
Changed in lightdm:
status: Fix Committed → Fix Released

Hello Roland, or anyone else affected,

Accepted lighdm into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/lighdm/1.10.3-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Changed in lightdm (Ubuntu Trusty):
status: In Progress → Fix Committed
Robert Ancell (robert-ancell) wrote :

Confirmed fixed in 1.10.3-0ubuntu2

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.10.3-0ubuntu2

---------------
lightdm (1.10.3-0ubuntu2) trusty; urgency=medium

  * Refresh patches
 -- Robert Ancell <email address hidden> Fri, 10 Oct 2014 21:24:51 +1300

Changed in lightdm (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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