Error connecting to X server via IPv6

Bug #1575200 reported by Patrick Monnerat
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Medium
Unassigned
1.10
Fix Committed
Medium
Unassigned
1.16
Fix Committed
Medium
Unassigned
1.18
Fix Released
Medium
Unassigned
lightdm (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Committed
Medium
Unassigned
Wily
Fix Committed
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned

Bug Description

[Impact]
LightDM doesn't pick the best IPv6 address on offer from clients (picks link-local addresses over non link-local).

[Test Case]
1. Start LightDM with XDMCP server enabled
2. Connect XDMCP client that sends IPv6 link-local addresses to LightDM

Expected result:
LightDM picks a non link-local address and is able to connect to the client

Observed result:
LightDM picks the link-local address address if it is first

[Regression Potential]
Small risk of behaviour change due to new IP selection method.

Original report:

I've discovered a problem in lightdm XDMCP using link-local IPv6 addresses without interface index to connect to X server.
It has been originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=1322775.

The problem can be fixed by having the XDMCP client not transmitting link-local addresses in the request, but if it does, lightdm XDMCP server can be a lot smarter if the attached patch is applied.

It changes the X server address selection order to set the lowest preference to link-local addresses, even if matching the source address or family.

This is not 100% full-proof: if only link-local addresses have been received, one of them is used anyway. In this case, a complete solution would be to determine and set the address interface index if not ambiguous.

However, this patch fixes the problem for most of the non-pathological
cases.

Revision history for this message
Patrick Monnerat (monnerat) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Would you be able to convert this to a merge proposal? Also, you will need to sign the contributor agreement before I can take the change - http://www.ubuntu.com/legal/contributors/submit. You can set me as the project contact.

Changed in lightdm:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Patrick Monnerat (monnerat) wrote :

I don't know how to do it: on launchpad, I've only reported bugs and patches to various projects.
Maybe you can link me to a "howto"?

Revision history for this message
Patrick Monnerat (monnerat) wrote :

Contributor agreement signed.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

The steps to make a merge proposal are essentially:

$ bzr branch lp:lightdm lp1575200
$ cd lp1575200
(make changes)
$ bzr commit --fixes lp:1575200
$ bzr push lp:~pm-datasphere/lightdm/lp1575200

In your browser go to https://code.launchpad.net/~pm-datasphere/lightdm/lp1575200 and select "Propose for merging"

Revision history for this message
Patrick Monnerat (monnerat) wrote :

Thanks for the info: this is very new for me.

Done: https://code.launchpad.net/~pm-datasphere/lightdm/lp1575200/+merge/292975

I don't know what branch will be updated by this: the patch applied without complaint to the checkout but I think it should be (back)ported to other branches too.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Thanks Patrick! Looks great. This will update trunk, which will become the 1.20 series. I cherry-pick changes back to the stable branches once it lands into trunk.

Changed in lightdm:
status: Triaged → Fix Committed
milestone: none → 1.19.0
Changed in lightdm (Ubuntu Xenial):
status: New → Fix Committed
Changed in lightdm (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Changed in lightdm (Ubuntu Xenial):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Trusty):
status: New → Fix Committed
Changed in lightdm (Ubuntu Wily):
status: New → Fix Committed
Changed in lightdm (Ubuntu Trusty):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Wily):
importance: Undecided → Medium
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for 1.10.6 as described in text" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in lightdm:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
lightdm (1.19.0-0ubuntu1) yakkety; urgency=medium

  * New upstream release:
    - Use /dev/tty0 instead of /dev/console for VT operations (LP: #1566073)
    - Don't quit on SIGUSR1, SIGUSR2 or SIGHUP (LP: #960157)
    - Improve XDMCP IPv6 address selection (LP: #1575200)
    - Set XDMCP hostname field in to system hostname or configured value
      (LP: #1578442)
    - Allow fcitx and mozc to run in guest session (LP: #1509829)
    - Fix lxsession running in guest session
    - Drop support for legacy XMir
    - Fix g_spawn compiler warning
  * debian/rules:
    - Fix usage of dh_installinit (LP: #1292990)

 -- Robert Ancell <email address hidden> Thu, 05 May 2016 12:23:45 +1200

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Patrick, or anyone else affected,

Accepted lightdm into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lightdm/1.18.2-0ubuntu1 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
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
lightdm (1.18.2-0ubuntu1) xenial; urgency=medium

  * New upstream release:
    - Don't quit on SIGUSR1, SIGUSR2 or SIGHUP (LP: #960157)
    - Use MIR_SERVER_HOST_SOCKET instead of MIR_SOCKET to report compositor
      socket to sessions. This used to work but no longer works in Mir 0.21
      (LP: #1583624)
    - Use only a single compositor on xlocal seats (LP: #1594229)
    - Fix Mir greeter log filename having "(null)" in the name (LP: #1590582)
    - Set XDMCP hostname field in to system hostname or configured value
      (LP: #1578442)
    - Improve XDMCP IPv6 address selection (LP: #1575200)
    - Allow fcitx and mozc to run in guest session (LP: #1509829)
    - Fix uninitialized memory errors
  * debian/lightdm.dirs:
    - Ensure user configuration directories /etc/lightdm/lightdm.conf.d and
      /etc/guest-session exist
  * debian/guest-account.sh:
  * debian/guest-session-setup.sh:
    - Source prefs.sh as privileged user to allow user modification
      (LP: #1581853)

 -- Robert Ancell <email address hidden> Tue, 21 Jun 2016 12:49:01 +1200

Changed in lightdm (Ubuntu Xenial):
status: Fix Committed → 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.