Skip to content

fix(collectd): secure PMT expression evaluation - #276

Open
jaywsk wants to merge 2 commits into
mainfrom
fix/collectd-safe-expr-eval
Open

fix(collectd): secure PMT expression evaluation#276
jaywsk wants to merge 2 commits into
mainfrom
fix/collectd-safe-expr-eval

Conversation

@jaywsk

@jaywsk jaywsk commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Replace eval-based transformation handling with a restricted AST evaluator. Allow only required arithmetic and bitwise operations, and enforce limits on expression complexity and numeric computation.

Replace eval-based transformation handling with a restricted AST evaluator.
Allow only required arithmetic and bitwise operations, and enforce limits on
expression complexity and numeric computation.

Signed-off-by: Jedrzej Wasiukiewicz <jedrzej.wasiukiewicz@intel.com>
Prevalidate transformation expressions during XML parsing and evaluate
them using direct parameter lookup, avoiding repeated parsing and string
substitution while preserving sandbox restrictions.

Signed-off-by: Jedrzej Wasiukiewicz <jedrzej.wasiukiewicz@intel.com>
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

Successfully merging this pull request may close these issues.

1 participant