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]: fix oss fuzz bug 34515, limit maglev table size #16671

Merged
merged 4 commits into from
Jun 22, 2021

Conversation

chaoqin-li1123
Copy link
Member

Commit Message: In fuzz test, to large a maglev table trigger a vector length exception(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34515), fix by setting limit to maglev table size.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]

chaoqin-li1123 added 3 commits May 26, 2021 02:59
Signed-off-by: chaoqin-li1123 <chaoqinli@google.com>
Signed-off-by: chaoqin-li1123 <chaoqinli@google.com>
Signed-off-by: chaoqin-li1123 <chaoqinli@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #16671 was opened by chaoqin-li1123.

see: more, trace.

@chaoqin-li1123
Copy link
Member Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16671 (comment) was created by @chaoqin-li1123.

see: more, trace.

Copy link
Contributor

@asraa asraa left a comment

Choose a reason for hiding this comment

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

small drive-by:
should this maybe be enforced in code where non-primes are rejected?

@@ -412,8 +412,8 @@ message Cluster {
// The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee.
// Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same
// upstream as it was before. Increasing the table size reduces the amount of disruption.
// The table size must be prime number. If it is not specified, the default is 65537.
google.protobuf.UInt64Value table_size = 1;
// The table size must be prime number limited to 4M. If it is not specified, the default is 65537.
Copy link
Member

Choose a reason for hiding this comment

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

5M? the constraints below doesn't match comment here.

Copy link
Member Author

Choose a reason for hiding this comment

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

just a random prime number larger than 4M, nothing special here.

Copy link
Member

Choose a reason for hiding this comment

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

Since we publish this documentation separately from the proto source, it should contain the actual, exact limit.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

Signed-off-by: chaoqin-li1123 <chaoqinli@google.com>
@chaoqin-li1123
Copy link
Member Author

/restest

@chaoqin-li1123
Copy link
Member Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16671 (comment) was created by @chaoqin-li1123.

see: more, trace.

@lizan
Copy link
Member

lizan commented Jun 22, 2021

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16671 (comment) was created by @lizan.

see: more, trace.

@yanavlasov yanavlasov merged commit 9aca65c into envoyproxy:main Jun 22, 2021
baojr added a commit to baojr/envoy that referenced this pull request Jun 23, 2021
…bridge-stream

* upstream/main: (268 commits)
  tools: adding dio,better comments (envoyproxy#17104)
  doc: fix misplaced #[extension-category] for Wasm runtimes (envoyproxy#17078)
  ci: Speedup deps precheck (envoyproxy#17102)
  doc: fix wrong link on wasm network filter. (envoyproxy#17079)
  docs: Added v3 API reference. (envoyproxy#17095)
  docs: Update include paths in repo (envoyproxy#17098)
  exception: make Ipv6Instance and Ipv4Instance not throw and remove some try catch pattern (envoyproxy#16122)
  tools: adding reminders for API shephards (envoyproxy#17081)
  ci: Fix wasm verify example (envoyproxy#17086)
  [fuzz]: fix oss fuzz bug 34515, limit maglev table size (envoyproxy#16671)
  test: silencing flaky test (envoyproxy#17084)
  Set `validate` flag when the SAN(SubjectAltName) matching is performed (envoyproxy#16816)
  Listener: reset the file event when destroying listener filters (envoyproxy#16952)
  docs: link additional filters that emit dynamic metadata (envoyproxy#17059)
  rds: add config reload time stat for rds (envoyproxy#17033)
  bazel: Use color by default for build and run commands (envoyproxy#17077)
  ci: Add timing for docker pull (envoyproxy#17074)
  [Windows] Adding note section in Original Source HTTP Filter (envoyproxy#17058)
  quic: add quic version counters in http3 codec stats. (envoyproxy#16943)
  quiche: change crypto stream factory interfaces (envoyproxy#17046)
  ...

Signed-off-by: Garrett Bourg <bourg@squareup.com>
chrisxrepo pushed a commit to chrisxrepo/envoy that referenced this pull request Jul 8, 2021
…6671)


Signed-off-by: chaoqin-li1123 <chaoqinli@google.com>
Signed-off-by: chris.xin <xinchuantao@qq.com>
@chaoqin-li1123 chaoqin-li1123 deleted the limit_maglev_table_size branch July 16, 2021 02:57
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
…6671)


Signed-off-by: chaoqin-li1123 <chaoqinli@google.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.

5 participants