[SRU] Azure Datasource writes user password in plain text
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-init (Ubuntu) |
Medium
|
Unassigned | ||
| Precise |
High
|
Unassigned | ||
| Trusty |
High
|
Unassigned | ||
| Utopic |
High
|
Unassigned | ||
| Vivid |
High
|
Unassigned |
Bug Description
SRU Justification
[IMPACT] When provisioning a virtual machine on Azure, a user password may be provided. Cloud-init retrieves the password via ovf-env.xml (stored on a CDROM) which is then written to /var/lib/
While the password is stored in plain text on disk, the password is _NOT_ accessible to a non-privelaged user. Both the directory and the file
itself are read-only:
$ stat /var/lib/waagent/
File: ‘/var/lib/waagent/’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 2532 Links: 2
Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-04-13 11:44:08.021992200 +0000
Modify: 2015-04-13 11:44:11.341805500 +0000
Change: 2015-04-13 11:44:11.341805500 +0000
Birth: -
$ sudo stat /var/lib/
File: ‘/var/lib/
Size: 1633 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 2556 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-04-13 11:44:08.021992200 +0000
Modify: 2015-04-13 11:44:08.021992200 +0000
Change: 2015-04-13 11:44:08.021992200 +0000
Birth: -
[GUIDANCE STATEMENT] Canonical's guidance on this matter is that any password provided by a fabric is inherently insecure; users should leverage SSH keys.
[Regression Potential] As this is a backport of the 15.10 Datasource, there is a medium regression potential. The 15.10 Datasource fixes a number of Azure provisioning bugs and is thus desirable.
The updated Datasource includes additional automated testing to confirm code quality.
[TEST Case 1] Upgrade from proposed
1. Install cloud-init from -proposed
2. Shutdown and capture VM
3. Launch captured VM
4. Confirm that the user password is set to "REDACTED" in /var/lib/
[TEST Case 2] New build from proposed
1. Build image from proposed
2. Launch new VM
3. Confirm that the user password is set to "REDACTED" in /var/lib/
Jamie Strandboge (jdstrand) wrote : | #2 |
This was committed to a public repo already:
http://
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Jamie Strandboge (jdstrand) wrote : | #3 |
Per Ben, precise - wily is affected. 14.04 and higher should be able to use the attached patch. 12.04 likely needs a different patch.
Jamie Strandboge (jdstrand) wrote : | #4 |
Per IRC:
- Ben will atach patch for precise
- security team will alert oss-security prior to USN publication and get a CVE
- security team will prepare patches for stable releases and release USNs
- server team has SRU fixes and will build those on top of our USN packages
- server team will update wily
Attached patch for 12.04. Tested and validated.
description: | updated |
Seth Arnold (seth-arnold) wrote : | #12 |
We've decided this is a "security hardening" measure rather than a security issue, and thus won't apply for a CVE and won't attempt an embargoed coordination with other vendors: any process that has sufficient privileges to read this file and thus the password has every opportunity to perform dozens of other privileged operations that would expose or reset this password.
Ben said he'd follow through with the SRU process; this makes sense to us.
Thanks
information type: | Private Security → Public Security |
tags: | added: patch |
Changed in cloud-init (Ubuntu Vivid): | |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu Utopic): | |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu Trusty): | |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu Precise): | |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu Vivid): | |
status: | New → Fix Released |
assignee: | nobody → Ben Howard (utlemming) |
Changed in cloud-init (Ubuntu Utopic): | |
assignee: | nobody → Ben Howard (utlemming) |
Changed in cloud-init (Ubuntu Trusty): | |
assignee: | nobody → Ben Howard (utlemming) |
Changed in cloud-init (Ubuntu Precise): | |
assignee: | nobody → Ben Howard (utlemming) |
summary: |
- Azure Datasource writes user password in plain text + [SRU] Azure Datasource writes user password in plain text |
Changed in cloud-init (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in cloud-init (Ubuntu Vivid): | |
status: | Fix Released → In Progress |
Changed in cloud-init (Ubuntu): | |
status: | Fix Released → Triaged |
Hello Ben, or anyone else affected,
Accepted cloud-init into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
Changed in cloud-init (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in cloud-init (Ubuntu Vivid): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed |
Brian Murray (brian-murray) wrote : | #14 |
Hello Ben, or anyone else affected,
Accepted cloud-init into utopic-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
Changed in cloud-init (Ubuntu Utopic): | |
status: | New → Fix Committed |
Changed in cloud-init (Ubuntu Trusty): | |
status: | New → Fix Committed |
Brian Murray (brian-murray) wrote : | #15 |
Hello Ben, or anyone else affected,
Accepted cloud-init into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
Ran through the verification steps. Marking as verification-done.
tags: |
added: verification-done removed: verification-needed |
Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.6
---------------
cloud-init (0.7.5-0ubuntu1.6) trusty; urgency=medium
* d/patches/
Backport of 15.10 Azure Datasource to fix various issues:
- Azure Datasource writes user password in plain text (LP: #1458052).
- Hostname not preserved across Azure reboots (LP: #1375252).
-- Ben Howard <email address hidden> Mon, 25 May 2015 09:30:20 -0600
Changed in cloud-init (Ubuntu Trusty): | |
status: | Fix Committed → Fix Released |
Adam Conrad (adconrad) wrote : Update Released | #18 |
The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package cloud-init - 0.7.6~bzr1022-
---------------
cloud-init (0.7.6~
* d/patches/
Backport of 15.10 Azure Datasource to fix various issues:
- Azure Datasource writes user password in plain text (LP: #1458052).
- Hostname not preserved across Azure reboots (LP: #1375252).
-- Ben Howard <email address hidden> Mon, 25 May 2015 08:53:25 -0600
Changed in cloud-init (Ubuntu Utopic): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package cloud-init - 0.7.7~bzr1091-
---------------
cloud-init (0.7.7~
* Backport of 15.10 Azure Datasource to fix various issues:
- Azure Datasource writes user password in plain text (LP: #1458052).
- Hostname not preserved across Azure reboots (LP: #1375252).
- Allow provisioning of Ubuntu Snappy w/out WALinuxAgent (LP: #1448885).
-- Ben Howard <email address hidden> Mon, 25 May 2015 09:38:58 -0600
Changed in cloud-init (Ubuntu Vivid): | |
status: | Fix Committed → Fix Released |
Stephen A. Zarkos (stevez) wrote : | #21 |
Ben, is it possible to SRU this fix back to Precise as well? At least on Azure we still have plenty of folks that use and love this version.
Thanks,
Steve
Changed in cloud-init (Ubuntu): | |
status: | Fix Released → Fix Committed |
Hello Ben, or anyone else affected,
Accepted cloud-init into precise-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
Changed in cloud-init (Ubuntu Precise): | |
status: | New → Fix Committed |
tags: | removed: verification-done |
tags: | added: verification-needed |
Performed validation steps for 12.04. Marking as verification-done.
tags: |
added: verification-done removed: verification-needed |
Launchpad Janitor (janitor) wrote : | #24 |
This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.22
---------------
cloud-init (0.6.3-0ubuntu1.22) precise; urgency=medium
* debian/
- redact plain text password in /var/lib/
[ Vincent Bernat ]
* debian/
- support CloudStack's basic networking (LP: #1382481).
-- Ben Howard <email address hidden> Thu, 17 Sep 2015 12:57:16 -0600
Changed in cloud-init (Ubuntu Precise): | |
status: | Fix Committed → Fix Released |
Changed in cloud-init (Ubuntu): | |
status: | Fix Committed → Fix Released |
Patch in Cloud-init REV 1109.