Bug #4648
closed
CVE-2014-0135 - Kafo does not handle default_values.yaml securely
Added by Marek Hulán over 10 years ago.
Updated over 6 years ago.
Description
/tmp/default_values.yaml file has world readable permissions and does not check for existence when it's being created. Therefore it's prone to race-condition attacks. This file contains default values for all parameters (usually autogenerated passwords)
Proposed fix steps:
- we'll use mktmpdir which will be passed to kafo_configure puppet module as a parameter
- kafo_configure puppet module will safely create file (check for non-existence, create file with 0600, then dumps data)
- packages (rpm, deb, gem) will remove any existing /tmp/default_values.yaml
Files
- Description updated (diff)
We could create a tempfile in puppet process but after the process finishes it would be removed. So we could create it rather from kafo but then in puppet process we can't be sure about the origin, therefore I think we should be happy with tmp dir only.
Good catch with File.open Dominic, I'm attaching fixed version for re-review.
- Subject changed from Kafo does not handle default_values.yaml securely to CVE-2014-0135 - Kafo does not handle default_values.yaml securely
- Status changed from Ready For Testing to Pending
Yep, the predictable filename is required too, but since it's in a safely created temporary directory, that's cool.
ACK, patch looks good.
- Target version changed from 1.9.0 to 1.8.4
- Private changed from Yes to No
- Status changed from Pending to Closed
- % Done changed from 0 to 100
Fixes released in Kafo 0.3.17 and 0.5.2.
Also available in: Atom
PDF