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

Revert "Reclaim one byte from HeaderString. (#6826)" #6864

Merged
merged 1 commit into from
May 9, 2019

Conversation

htuch
Copy link
Member

@htuch htuch commented May 8, 2019

This is failing header_map_impl_fuzz due to memcpy heap buffer overflow and should be considered a
serious security issue. Given this was only introduced in the last day and does not affect any
release, a revert and bump is the consensus of Envoy security team.

This reverts commit 977907d.

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

Risk level: Low
Testing: Corpus entry added, bazel test //test/common/http:header_map_impl_fuzz_test --test_output=all -c dbg --config=clang-asan

Signed-off-by: Harvey Tuch [email protected]

This is failing header_map_impl_fuzz due to memcpy heap buffer overflow and should be considered a
serious security issue. Given this was only introduced in the last day and does not affect any
release, a revert and bump is the consensus of Envoy security team.

This reverts commit 977907d.

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

Risk level: Low
Testing: Corpus entry added, bazel test //test/common/http:header_map_impl_fuzz_test --test_output=all -c dbg --config=clang-asan

Signed-off-by: Harvey Tuch <[email protected]>
@htuch htuch requested review from dnoe and mattklein123 May 8, 2019 23:22
@htuch htuch merged commit 3c76057 into envoyproxy:master May 9, 2019
@htuch htuch deleted the fuzz-memcpy branch May 9, 2019 02:27
@htuch
Copy link
Member Author

htuch commented May 9, 2019

Tagging #6826 and #6580 for posterity.

@htuch
Copy link
Member Author

htuch commented May 9, 2019

I think the problematic line is

buffer_.dynamic_[size] = 0;
. We're essentially clobbering memory beyond the buffer; it's not memcpy but the line after. This limits the possible exploit, since you can only clobber adjacent memory with a NUL rather than header defined content, but this still should be considered serious enough to bump forward given that header content is under remote control and we're writing to unrelated heap.

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.

4 participants