Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

towards ncm-ncd in -T #82

Open
stdweird opened this issue Sep 27, 2016 · 5 comments
Open

towards ncm-ncd in -T #82

stdweird opened this issue Sep 27, 2016 · 5 comments

Comments

@stdweird
Copy link
Member

stdweird commented Sep 27, 2016

currently, ncm-ncd has -t shebang, meaning any taint errors will be reported as warning, but nothing fatal.
there are a few paths towards running ncm-ncd in -T

  • via ncm-cdispd config file, and run ncm-ncd as perl -Tw /usr/sbin/ncm-ncd is some config is set
  • use something like Taint::Runtime and
    • enable taint via a config option in ncm-ncd.conf
    • enable/disable tainting per component (and in ncm-ncd itself in shebang), similar to NoActionSupported

this also requires that the unit tests for the components run in -T

@stdweird stdweird added this to the 16.10 milestone Sep 27, 2016
@ned21
Copy link
Contributor

ned21 commented Sep 30, 2016

@ajf8 can you check how many of our internal components this would break please?

@stdweird
Copy link
Member Author

most our failures were related to LC chown, we could switch to CAF::Path and untaint there (but CAF::Path currently does not untaint)

@piojo-zz
Copy link
Member

piojo-zz commented Oct 4, 2016

Discussion from the workshop: the profile should be untainted automatically. No amount of untainting will protect us from a profile that setuids /bin/bash. If a profile is hostile it's game over.

However, components should untaint inputs from the file system or from subprocesses.

Workshop seems to like the idea of Taint::Runtime, but it is not available on EL5 (only on rpmforge).

The first step could be to use Test::Taint during tests. If this is the path to go, please remember that the Test::Quattor modules should taint their parameters (i.e, mocked command outputs must be tainted).

@piojo-zz
Copy link
Member

piojo-zz commented Oct 4, 2016

Morgan Stanley would appreciate if Taint::Runtime didn't become a dependency to be installed on all their hosts.

Something like

if ($do_taint_that_comes_from_some_config) {
    eval "use Taint::Runtime;";
}

somewhere.

@jrha jrha removed this from the 16.10 milestone Oct 19, 2016
@jrha
Copy link
Member

jrha commented Oct 19, 2016

Discussed at workshop, does not look like it will happen for 16.10, will leave @stdweird to decide if he wants to set a new milestone.

ttyS4 pushed a commit to ttyS4/ncm-ncd that referenced this issue Dec 15, 2017
Configuration: getTree clears any error causing the failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants