Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151214190402.GZ18118@netmeister.org>
Date: Mon, 14 Dec 2015 14:04:02 -0500
From: Jan Schaumann <jschauma@...meister.org>
To: oss-security@...ts.openwall.com
Subject: Chef: knife bootstrap leaks validator privkey into system logs

Hello,

In Opscode Chef, when you 'knife bootstrap' a node, the validator.pem
private RSA key is leaked into the system logs /var/log/messages.

The reason is that 'knife bootstrap' constructs a shell command to run
on the node from a template, filling the private key in as a here-doc
(see
https://github.com/chef/chef/blob/81419cc617091461b8a78c93276e00a7276484df/lib/chef/knife/bootstrap/templates/chef-full.erb#L193).
This command is invoked via (more or less):

ssh node 'sudo sh -c full-command-goes-here'

As a result, the private key ends up on the command-line, in the process
table, and, by way of sudo command logging on most reasonable systems,
in the system logs. The logs may also be forwarded to other places
(possibly in clear text), and possible stored on other systems, making
the private validator key not quite so private any more.

This issue was reported to Opscode here:
https://github.com/chef/chef/issues/3871

Opscode has elected not to request a CVE for this issue (nor fixed it;
a work-around using so-called validatorless bootstrapping exists).  I
think it would still be useful to have a CVE identifier for this issue.

-Jan

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.