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

[fuzz] Fixed divide by zero bug #13545

Merged
merged 4 commits into from
Oct 19, 2020

Conversation

zasweq
Copy link
Contributor

@zasweq zasweq commented Oct 13, 2020

Signed-off-by: Zach Reyes [email protected]

Commit Message: Fixed divide by zero bug in admission control filter for HTTP.
Additional Description: Fixes issues: https://oss-fuzz.com/testcase-detail/5914972389113856
Risk Level: Low
Testing: Added regression test
Docs Changes: N/A
Release Notes: N/A

@zasweq zasweq requested a review from mattklein123 as a code owner October 13, 2020 16:53
@@ -52,6 +52,11 @@ double AdmissionControlFilterConfig::aggression() const {

double AdmissionControlFilterConfig::successRateThreshold() const {
const double pct = sr_threshold_ ? sr_threshold_->value() : defaultSuccessRateThreshold;
// The threshold value should not be 0. Since you cannot add a validation on a widely used Runtime
// percent value, simply map a 0 percent for the field to the default success rate threshold.
if (pct == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we instead throw during config ingest? (not here)

@htuch htuch self-assigned this Oct 13, 2020
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@htuch htuch merged commit 9f10cfe into envoyproxy:master Oct 19, 2020
mpuncel added a commit to mpuncel/envoy that referenced this pull request Oct 21, 2020
* master: (22 commits)
  ci: various improvements (envoyproxy#13660)
  dns: fix defunct fd bug in apple resolver (envoyproxy#13641)
  build: support ppc64le with wasm (envoyproxy#13657)
  [fuzz] Added random load balancer fuzz (envoyproxy#13400)
  dependencies: compute and check release dates via GitHub API. (envoyproxy#13582)
  mac ci: try ignoring update failure (envoyproxy#13658)
  watchdog: Optimize WatchdogImpl::touch in preparation to more frequent petting of the watchdog. (envoyproxy#13103)
  typos: fix a couple 'enovy' mispellings (envoyproxy#13645)
  lua: Expose stream info downstreamLocalAddress and downstreamDirectRemoteAddress for Lua filter (envoyproxy#13536)
  tap: fix upstream streamed transport socket taps (envoyproxy#13638)
  Revert "delay health checks until transport socket secrets are ready. (envoyproxy#13516)" (envoyproxy#13639)
  Watchdog: use abort action as a default if killing is enabled. (envoyproxy#13523)
  [fuzz] Fixed divide by zero bug (envoyproxy#13545)
  wasm: flip the meaning of the "repository" in envoy_wasm_cc_binary(). (envoyproxy#13621)
  fix: record recovered local address (envoyproxy#13581)
  docs: fix incorrect compressor filter doc (envoyproxy#13611)
  docs: clean up docs for azp migration (envoyproxy#13558)
  wasm: fix building Wasm example. (envoyproxy#13619)
  test: Refactor flood tests into a separate test file (envoyproxy#13556)
  wasm: re-enable tests with precompiled modules. (envoyproxy#13583)
  ...

Signed-off-by: Michael Puncel <[email protected]>
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.

3 participants