Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520348 - <app-emulation/lxc-2.0.8: default predictable root password in most templates
Summary: <app-emulation/lxc-2.0.8: default predictable root password in most templates
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Default Configs (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: B3 [noglsa]
Keywords:
Depends on: CVE-2017-5985
Blocks:
  Show dependency tree
 
Reported: 2014-08-20 19:51 UTC by Kristian Fiskerstrand (RETIRED)
Modified: 2018-05-14 22:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Fiskerstrand (RETIRED) gentoo-dev 2014-08-20 19:51:44 UTC
From ${URL}:
A Debian bug reported [1] noted that the default Debian template for LXC
(lxc-debian.in) set the root password to 'root' for the newly-created
Debian-based container.  In addition, it was also reported [2] that the default
sshd_config installed set 'PermitRootLogin yes' which, while normally not a
problem to allow root to login with a password, due to the constant and known
root password, makes it easy for any user to obtain root privileges in a new
container where the password has not been changed.

In the Fedora or CentOS templates that do set a random root password, this is
not a problem.  So the second Debian bug is only a security issue when the
first issue is present (it is not a security issue in the other templates).

Looking further at the various templates, when a password is not specified,
other systems also use predictable defaults:

* openmandriva
* gentoo
* altlinux
* archlinux (if unspecified, no password is set)
* opensuse
* oracle
* plamo
* ubuntu (has a predictable password for user ubuntu, which in turn has sudo
access)


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758643
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758647


NOTE: I don't know whether or not this would ever receive a CVE based on these
being configurable (so would require in most cases a person to either a) not
specify a password or b) not change it post-creation), however the way the
Fedora and CentOS templates work (random passwords, stored either in a file or
printed to stdout) is a much safer/secure alternative and it would be ideal if
these other templates could be changed to do something similar.
Comment 1 Kristian Fiskerstrand (RETIRED) gentoo-dev 2014-08-20 20:19:43 UTC
I'm not sure to which extent this affects us, but since Gentoo is mentioned I'm leaving it to @maintainers to decide what they think is appropriate and whether it makes sense to look into the Fedora/CentOS Template. 

Feel free to close this bug report if it is not of interest.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2014-12-21 10:01:17 UTC
I wouldn't be worried about that to be honest. Yes the default password is predictable, but if you expose your container without configuring it properly then you are doomed anyway.
Comment 3 Paul Tobias 2017-06-24 03:53:05 UTC
lxc-2.0.8 fixes this. From https://linuxcontainers.org/lxc/news/#lxc-208-release-announcement-11th-of-may-2017

"All templates have been updated to not set default passwords anymore"
Comment 4 Aaron Bauman (RETIRED) gentoo-dev 2017-07-17 01:15:52 UTC
fix is in 2.0.8.