Skip to content

security: test masking using rounding algorithm may cause denial of service (DoS) risk#2271

Merged
yhilmare merged 1 commit into
dev/4.2.xfrom
bugfix/gaoda_42x_fix_security_issue_for_bigdecimal
Apr 22, 2024
Merged

security: test masking using rounding algorithm may cause denial of service (DoS) risk#2271
yhilmare merged 1 commit into
dev/4.2.xfrom
bugfix/gaoda_42x_fix_security_issue_for_bigdecimal

Conversation

@smallsheeeep
Copy link
Copy Markdown
Contributor

What type of PR is this?

type-bug

What this PR does / why we need it:

When I test masking using rounding algorithm, and input a big decimal such as 100e999999, then it occupied large CPU usage. And if I mock many these request at same time ,then DoS may occur.
This PR fix it by adding a OdcBigDecimalChecker to check if the BigDecimal value passed in has a denial of service risk.

Which issue(s) this PR fixes:

Fixes #2270

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@smallsheeeep smallsheeeep added this to the ODC 4.2.4-bp2 milestone Apr 22, 2024
@smallsheeeep smallsheeeep self-assigned this Apr 22, 2024
@smallsheeeep smallsheeeep changed the title fix(security): Test masking using rounding algorithm may cause denial of service (DoS) risk fix(security): test masking using rounding algorithm may cause denial of service (DoS) risk Apr 22, 2024
@yizhouxw
Copy link
Copy Markdown
Contributor

title may start with security:

@smallsheeeep smallsheeeep changed the title fix(security): test masking using rounding algorithm may cause denial of service (DoS) risk security: test masking using rounding algorithm may cause denial of service (DoS) risk Apr 22, 2024
@smallsheeeep
Copy link
Copy Markdown
Contributor Author

title may start with security:

okay, done!

@smallsheeeep smallsheeeep requested a review from yhilmare April 22, 2024 09:26
Copy link
Copy Markdown
Contributor

@yhilmare yhilmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yhilmare yhilmare merged commit fca5e9f into dev/4.2.x Apr 22, 2024
@yhilmare yhilmare deleted the bugfix/gaoda_42x_fix_security_issue_for_bigdecimal branch April 22, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants