The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #12460

Bug #12463: introduce better, and more secure, file handling abstractions, then use them in our code

Insecure handling of file writes in k5login type

Added by Anonymous about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:02/06/2012
Priority:NormalDue date:
Assignee:Dominic Maraglia% Done:


Target version:2.7.11
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


The k5login type and provider write to an untrusted location, typically a user home direction. They need to be reviewed to make sure they do the right thing around securely handling file replacement; they used to be vulnerable to a symlink attack, and could probably be improved overall.


#1 Updated by Anonymous about 4 years ago

  • Branch set to includes an implementation of replace_file as a helper, and moves from secure_open to replace_file in k5login. It also adds testing – any testing – for the type and provider.

This isn’t much of a change compared to the previous change I made, using secure_open there, but it does make for a more uniform and clear API around behaviour of that type / provider. Needs review, the tests validated, and the code merged.

#2 Updated by Anonymous about 4 years ago

  • Parent task set to #12463

#3 Updated by Jason McKerr about 4 years ago

  • Assignee changed from Jason McKerr to Deepak Giridharagopal

#5 Updated by Matthaus Owens about 4 years ago

  • Status changed from Accepted to Closed
  • Target version set to 2.7.11
  • Private changed from Yes to No

Released in 2.6.14, 2.7.11

Also available in: Atom PDF