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

Review fluentbitextension from security perspective #6721

Closed
tigrannajaryan opened this issue Dec 13, 2021 · 6 comments
Closed

Review fluentbitextension from security perspective #6721

tigrannajaryan opened this issue Dec 13, 2021 · 6 comments

Comments

@tigrannajaryan
Copy link
Member

tigrannajaryan commented Dec 13, 2021

fluentbitextension allows executing flientbit executable and accepts the command line to execute.

This is potentially a security problem, especially coupled with upcoming remote configuration capabilities. We need to make sure the Collector cannot be compelled to execute arbitrary code.

@tigrannajaryan
Copy link
Member Author

See also related #6722

@tigrannajaryan
Copy link
Member Author

tigrannajaryan commented Dec 13, 2021

This is similar to what I posted in #6722

@open-telemetry/collector-contrib-approvers I think we have a dangerous functionality in fluentbitextension. It allows executing arbitrary commands with arbitrary parameters.

Some possible ways we can reduce the risks:

  • Disallow executing arbitrary commands. Limit them to a certain directory location and/or filename pattern, which can match only Fluentbit executable.
  • Disallow passing command line parameters. Is this necessary for Fluentbit?

A more radical approach if we do not think the above is sufficient:

  • Remove the component from the default build. If someone needs it they can custom-build a Collector and take the responsibility for the consequences. We have native log collection capabilities in the Collector so Fluentbit extension may not be as useful as it was in the past anymore.

@jpkrohling
Copy link
Member

This specially sensitive after the log4j CVE. I'll take a look at this extension and provide my feedback soon.

@Aneurysm9
Copy link
Member

This is similar to what I posted in #6697

@tigrannajaryan is this the right link? I don't see anything related there.

@tigrannajaryan
Copy link
Member Author

This is similar to what I posted in #6697

@tigrannajaryan is this the right link? I don't see anything related there.

Wrong link. It should be #6722

@jpkrohling
Copy link
Member

As discussed during the SIG meeting yesterday, the code owners are expected to present a design for making this component secure. If none is provided by 0.46.0, we'll place this component behind a feature gate, eventually removing it.

@bogdandrutu also mentioned that, for the short-term, it might make sense to add a log entry when this component is constructed, stating that this component is under security review and that it should be used with caution.

@dmitryax mentioned that he might work on this if the code owners aren't available.

codeboten pushed a commit to codeboten/opentelemetry-collector-contrib that referenced this issue Apr 4, 2022
After many discussions it seems the community is leaning towards removing the components that execute subprocesses. As such, marking the fluentbit exception as deprecated.

Fixes open-telemetry#6721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants