Skip to content

sds/dns: fix late SDS exception throw during c-ares callbacks.#4377

Merged
zuercher merged 1 commit into
envoyproxy:masterfrom
htuch:fix-dns-fuzz-bug
Sep 10, 2018
Merged

sds/dns: fix late SDS exception throw during c-ares callbacks.#4377
zuercher merged 1 commit into
envoyproxy:masterfrom
htuch:fix-dns-fuzz-bug

Conversation

@htuch
Copy link
Copy Markdown
Member

@htuch htuch commented Sep 9, 2018

Previously, we only validated local info in SDS initialize(), which could happen during c-ares
resolution. This is too late to be throwing config validation exceptions, so instead do it at SdsApi
construction time.

Also, make sure we safely copy exception info for EnvoyExceptions; for libc++ in oss-fuzz,
attempting to copy/throw the exception in the post() was causing UBSAN failures.

Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10262.

Risk level: Low
Testing: Corpus entry added.

Signed-off-by: Harvey Tuch htuch@google.com

Previously, we only validated local info in SDS initialize(), which could happen during c-ares
resolution. This is too late to be throwing config validation exceptions, so instead do it at SdsApi
construction time.

Also, make sure we safely copy exception info for EnvoyExceptions; for libc++ in oss-fuzz,
attempting to copy/throw the exception in the post() was causing UBSAN failures.

Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10262.

Risk level: Low
Testing: Corpus entry added.

Signed-off-by: Harvey Tuch <htuch@google.com>
@zuercher zuercher merged commit fedaac9 into envoyproxy:master Sep 10, 2018
htuch added a commit to htuch/envoy that referenced this pull request May 15, 2020
Redux of envoyproxy#4377.

Fixes envoyproxy#10976

Risk level: Low
Testing: Unit/integration test added.

Signed-off-by: Harvey Tuch <htuch@google.com>
htuch added a commit that referenced this pull request May 27, 2020
Similar root cause to #4377 - we can't throw exceptions in initialize().

Fixes #10976

Risk level: Low
Testing: Unit/integration test added.

Signed-off-by: Harvey Tuch <htuch@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.

2 participants