I have a clean machine, with only puppet.conf configured (using --genconfig) and /etc/puppet/ssl/certs/ca.pem. I now run for the first time puppetd and connect to a server that has a different CA.
I believe the expected behavior should be that puppetd will abort the connection because it connects to an unauthorized server. Instead, puppetd continues to communicate with the unauthorized master and generates a new certificate request.
Unless I'm mistaken, this scenario could lead to a security breach: if an attacker gains control over the DNS, it can redirect new machines to its own malicious master. The master will make the node install a rootkit for example. Afterwards the attacker will redirect the DNS back to the original master. The node will then retrieve from the original (unsuspecting) master sensitive information, information that now the attacker can access.
I'm running puppet version 2.6.2.