~lightdm-team/lightdm/1.18

Viewing all changes in revision 2352.

  • Committer: Robert Ancell
  • Author(s): Tyler Hicks
  • Date: 2017-04-04 21:28:11 UTC
  • Revision ID: robert.ancell@canonical.com-20170404212811-xclbt4matqkvpwhu
Detect existing malicious guest user home dirs

It was discovered that a local attacker could watch for lightdm's
guest-account script to create a /tmp/guest-XXXXXX file and then quickly
create the lowercase representation of the guest user's home directory
before lightdm could. This allowed the attacker to have control of the
guest user's home directory and, subsequently, gain control of an
arbitrary directory in the filesystem which could lead to privilege
escalation.

This patch fixes the issue by detecting failures in creating a directory
for the guest user's home directory. If the file (directory, symlink,
etc.) already exists at the path, mkdir will fail and the script will
exit. This means that it is still possible for a local user to carry out
a denial of service on the guest user login feature.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: