generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 297
Labels
Priority-Highbreaking changeAny change which may break existing configurations and deploymentsAny change which may break existing configurations and deploymentsbugSomething isn't workingSomething isn't working
Description
Describe the bug
Regex evaluator used is susceptible to exponential backtracking attacks. This can be mitigated by using a non-backtracking evaluator like re2 https://github.com/google/re2j.
To Reproduce
Steps to reproduce the behavior:
- Go to DropEventsProcessorIT
- Create an adversarial case in the test cases
- Replace the value in
my_keyto"a".repeat(256*1024) + "b" - Change the drop_when condition in
drop_when_value_is_empty_string.yamlto/my_key =~ "(a+)+".
- Replace the value in
- Build the drop_events plugin
./gradlew build -p /path/to/workspace/data-prepper/data-prepper-plugins/drop-events-processor - The tests never finish running.
Expected behavior
Regex evaluation should complete.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: MacOS
- Version [e.g. 22]
Additional context
Some things to consider:
- This is an issue only when a service uses data-prepper as a service-side application and accepts inputs/configurations from potentially untrusworthy sources.
- Re2J has some limitations in features in exchange for the linear time complexity guarantee, biggest one being that backreferencing is not supported.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority-Highbreaking changeAny change which may break existing configurations and deploymentsAny change which may break existing configurations and deploymentsbugSomething isn't workingSomething isn't working
Type
Projects
Status
Unplanned