From d9959cf07286c80736045362fa4b9e8b75a11d30 Mon Sep 17 00:00:00 2001 From: birenroy Date: Fri, 16 Feb 2024 17:16:30 -0500 Subject: [PATCH] [bp/1.29] Backport deps: updates QUICHE to incorporate fixes (#32443) * Update QUICHE from 83a9e8129 to 9e8759380 https://github.com/google/quiche/compare/83a9e8129..9e8759380 ``` $ git log 83a9e8129..9e8759380 --date=short --no-merges --format="%ad %al %s" 2024-02-15 birenroy Fixes handling of DATA frame padding in OgHttp2Session. 2024-02-15 birenroy Adds a test case demonstrating that OgHttp2Adapter does not consider DATA frame padding as "consumed". 2024-02-14 quiche-dev Fix issues when building more Quiche tests for iOS and Windows 2024-02-14 martinduke Fix test flake in MoqtSubscribeWindows. 2024-02-14 martinduke Remove #ifdef MOQT_AUTH_INFO. Also eliminate an old reference to subscribe_request 2024-02-14 martinduke Fix error in MoQT Relative Location encoding. 2024-02-14 quiche-dev Prospectively fix Chromium build 2024-02-13 quiche-dev No public description 2024-02-13 martinduke Process incoming Unsubscribes. 2024-02-13 quiche-dev Fix issues required to build additional Quiche tests for Chrome 2024-02-12 renjietang Add 2 counters for number of successful multi-port probes. 2024-02-12 dschinazi Remove unused connect-udp-version 2024-02-09 quiche-dev Fix flaky //third_party/quic/core/batch_writer:quic_batch_writer_test 2024-02-09 quiche-dev Fix spelling 2024-02-09 rch Add a comment to kBBRv2 which explains that it's essentially BBRv3 and a TODO to rename it when the implementation is complete. 2024-02-08 danzh Change QuicConnection::cipher_id() to get underlying cipher id differently. 2024-02-08 rch Always disable the QPACK dyanmic table for Hyperloop connections. 2024-02-08 martinduke Handle MoQT Objects that arrive before SUBSCRIBE_OK. 2024-02-07 bnc No public description 2024-02-06 martinduke Deprecate gfe2_restart_flag_quic_receive_ecn3. 2024-02-05 martinduke No public description 2024-02-05 martinduke Update four-pass algorithm to reduce copying and conform to draft-ietf-quic-load-balancers-19. 2024-02-05 vasilvv No public description 2024-02-02 birenroy Demotes some noisy debug logging to VLOG. 2024-02-02 bnc Merge quic_protocol_flags_list.h into quiche_protocol_flags_list.h. 2024-02-02 martinduke MOQT Message formats from draft-02. 2024-02-01 rch Add a QUIC protocol flag to not require the the kSPAD connection option in order to use QUIC server preferred address support. quic_always_support_server_preferred_address defaults to false to match existing behavior but may be set to true. This will make it easier for QUICHE servers to support non-QUICHE clients using server preferred address. 2024-01-31 bnc Remove support for QUICHE protocol flags having different internal and external values. 2024-01-31 rch Disable Huffman encoding for QPACK headers sent over Hyperloop. 2024-01-30 vasilvv Add an option to buffer data unconditionally for WebTransport. 2024-01-26 wub Add gfe2::test::SimpleClient::MaybeConfigureSocket to configure the socket fd after it is created. 2024-01-25 martinduke Report the correct error when parameter length mismatches, and pipe error type code through the ParsingError() functions. 2024-01-25 martinduke Use MOQT standard SubscribeError codes from draft-02. 2024-01-25 martinduke Clean up MoQT error cases: 2024-01-24 birenroy Uses constexpr to improve header validation code generation. Thank you to ricea@google.com for the suggestion! 2024-01-23 vasilvv Fix ODR violtions in quic/core 2024-01-23 wub No public description 2024-01-22 vasilvv Fix standalone QUICHE build 2024-01-22 martinduke Exit function early on QUIC_BUG. Verified to fix the repro. 2024-01-20 dschinazi Allow masque_server to check signature auth on GET requests 2024-01-19 dschinazi Add GET request support to MASQUE client code 2024-01-19 bnc Use NumBytesConsumed() to determine number of bytes associated with request. 2024-01-19 martinduke Reduce QUIC load balancer copies by passing the result as an argument. 2024-01-19 danzh Add a new platform API QuicheScopedDisableExitOnDFatal to allow Envoy's QUIC code switching to use platform API implementation under net/quic/platform_overrides/. 2024-01-18 martinduke Move simple decryption cases out of LoadBalancerConfig. 2024-01-18 vasilvv In WebTransport over HTTP/2, implement basic stream support. 2024-01-17 diannahu Move MetadataFrameSequence from third_party/spdy/core to gfe/gfe2/metadata. 2024-01-17 renjietang Do not send RETIRE_CONNECTION_ID frame when the connection is closed. 2024-01-16 birenroy Refactoring in preparation for some changes to data frame generation. 2024-01-12 vasilvv Add code counts for legacy MESSAGE frame codepoints. ``` Updates to incorporate QUICHE changes. Signed-off-by: Biren Roy --- bazel/external/quiche.BUILD | 12 +++--------- bazel/repository_locations.bzl | 6 +++--- changelogs/1.29.1.yaml | 3 +++ source/common/quic/platform/BUILD | 1 - source/common/quic/platform/quiche_flags_impl.cc | 4 ---- source/common/quic/platform/quiche_flags_impl.h | 4 ---- test/common/quic/envoy_quic_h3_fuzz_helper.cc | 2 +- test/common/quic/platform/quiche_test_impl.h | 2 ++ test/common/quic/test_utils.h | 3 ++- 9 files changed, 14 insertions(+), 23 deletions(-) diff --git a/bazel/external/quiche.BUILD b/bazel/external/quiche.BUILD index 667c1254e3c7..03f9b143274a 100644 --- a/bazel/external/quiche.BUILD +++ b/bazel/external/quiche.BUILD @@ -2906,6 +2906,7 @@ envoy_quic_cc_library( ":quic_core_versions_lib", ":quic_platform_base", ":quiche_common_text_utils_lib", + ":quiche_common_wire_serialization", "@com_google_absl//absl/cleanup", ], ) @@ -2929,6 +2930,7 @@ envoy_cc_library( "quiche/quic/core/frames/quic_path_challenge_frame.cc", "quiche/quic/core/frames/quic_path_response_frame.cc", "quiche/quic/core/frames/quic_ping_frame.cc", + "quiche/quic/core/frames/quic_reset_stream_at_frame.cc", "quiche/quic/core/frames/quic_retire_connection_id_frame.cc", "quiche/quic/core/frames/quic_rst_stream_frame.cc", "quiche/quic/core/frames/quic_stop_sending_frame.cc", @@ -2956,6 +2958,7 @@ envoy_cc_library( "quiche/quic/core/frames/quic_path_challenge_frame.h", "quiche/quic/core/frames/quic_path_response_frame.h", "quiche/quic/core/frames/quic_ping_frame.h", + "quiche/quic/core/frames/quic_reset_stream_at_frame.h", "quiche/quic/core/frames/quic_retire_connection_id_frame.h", "quiche/quic/core/frames/quic_rst_stream_frame.h", "quiche/quic/core/frames/quic_stop_sending_frame.h", @@ -3571,15 +3574,6 @@ envoy_quic_cc_library( ], ) -envoy_cc_library( - name = "quic_core_protocol_flags_list_lib", - hdrs = ["quiche/quic/core/quic_protocol_flags_list.h"], - copts = quiche_copts, - repository = "@envoy", - tags = ["nofips"], - visibility = ["//visibility:public"], -) - envoy_quic_cc_library( name = "quic_core_qpack_blocking_manager_lib", srcs = ["quiche/quic/core/qpack/qpack_blocking_manager.cc"], diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index af45e3fc63f2..65e74866380a 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -1175,12 +1175,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "QUICHE", project_desc = "QUICHE (QUIC, HTTP/2, Etc) is Google‘s implementation of QUIC and related protocols", project_url = "https://github.com/google/quiche", - version = "83a9e81296b36898025bce1110db9f9c4f23afd3", - sha256 = "0bc1ca361439140b8c8add9bceb9478a037e87954bd9d22e819bf73818443026", + version = "9e875938052443c7f51b25012093be59e20598ac", + sha256 = "ae1d45c62b1a0e43384697c1becd8f8d3bf6624ba0dd05a0334b319aafecb1ef", urls = ["https://github.com/google/quiche/archive/{version}.tar.gz"], strip_prefix = "quiche-{version}", use_category = ["controlplane", "dataplane_core"], - release_date = "2024-01-12", + release_date = "2024-02-15", cpe = "N/A", license = "BSD-3-Clause", license_url = "https://github.com/google/quiche/blob/{version}/LICENSE", diff --git a/changelogs/1.29.1.yaml b/changelogs/1.29.1.yaml index 31831f89848b..32f4f32c25d7 100644 --- a/changelogs/1.29.1.yaml +++ b/changelogs/1.29.1.yaml @@ -27,6 +27,9 @@ bug_fixes: Fix crash due to uncaught exception when the operating system does not support an address type (such as IPv6) that is received in an mTLS client cert IP SAN. These SANs will be ignored. This applies only when using formatter ``%DOWNSTREAM_PEER_IP_SAN%``. +- area: deps + change: | + Updated QUICHE dependencies to incorporate fixes for https://github.com/envoyproxy/envoy/issues/32401. removed_config_or_runtime: - area: postgres proxy diff --git a/source/common/quic/platform/BUILD b/source/common/quic/platform/BUILD index ad64a7bc53e9..d10213a60dc9 100644 --- a/source/common/quic/platform/BUILD +++ b/source/common/quic/platform/BUILD @@ -48,7 +48,6 @@ envoy_quiche_platform_impl_cc_library( "//source/common/common:assert_lib", "//source/common/http:utility_lib", "@com_github_google_quiche//:quic_core_flags_list_lib", - "@com_github_google_quiche//:quic_core_protocol_flags_list_lib", "@com_github_google_quiche//:quiche_protocol_flags_list_lib", "@com_google_absl//absl/flags:flag", ], diff --git a/source/common/quic/platform/quiche_flags_impl.cc b/source/common/quic/platform/quiche_flags_impl.cc index 60dc6622a7a7..e9d19e841830 100644 --- a/source/common/quic/platform/quiche_flags_impl.cc +++ b/source/common/quic/platform/quiche_flags_impl.cc @@ -80,10 +80,6 @@ template <> constexpr int32_t maybeOverride(absl::string_view name, int #define PROTOCOL_FLAG_MACRO_CHOOSER(...) \ GET_6TH_ARG(__VA_ARGS__, DEFINE_PROTOCOL_FLAG_TWO_VALUES, DEFINE_PROTOCOL_FLAG_SINGLE_VALUE) -#define QUIC_PROTOCOL_FLAG(...) PROTOCOL_FLAG_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) -#include "quiche/quic/core/quic_protocol_flags_list.h" -#undef QUIC_PROTOCOL_FLAG - #define QUICHE_PROTOCOL_FLAG(...) PROTOCOL_FLAG_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) #include "quiche/common/quiche_protocol_flags_list.h" #undef QUICHE_PROTOCOL_FLAG diff --git a/source/common/quic/platform/quiche_flags_impl.h b/source/common/quic/platform/quiche_flags_impl.h index e65277a3b9e4..e3a8d3f87d7c 100644 --- a/source/common/quic/platform/quiche_flags_impl.h +++ b/source/common/quic/platform/quiche_flags_impl.h @@ -49,10 +49,6 @@ class FlagRegistry { #include "quiche/quic/core/quic_flags_list.h" #undef QUIC_FLAG -#define QUIC_PROTOCOL_FLAG(type, flag, ...) ABSL_DECLARE_FLAG(type, envoy_##flag); -#include "quiche/quic/core/quic_protocol_flags_list.h" -#undef QUIC_PROTOCOL_FLAG - #define QUICHE_PROTOCOL_FLAG(type, flag, ...) ABSL_DECLARE_FLAG(type, envoy_##flag); #include "quiche/common/quiche_protocol_flags_list.h" #undef QUICHE_PROTOCOL_FLAG diff --git a/test/common/quic/envoy_quic_h3_fuzz_helper.cc b/test/common/quic/envoy_quic_h3_fuzz_helper.cc index 1994e83c7f40..30f4f69e66e1 100644 --- a/test/common/quic/envoy_quic_h3_fuzz_helper.cc +++ b/test/common/quic/envoy_quic_h3_fuzz_helper.cc @@ -27,7 +27,7 @@ class Delegate : public quic::QpackEncoder::DecoderStreamErrorDelegate { static std::string encodeHeaders(const spdy::Http2HeaderBlock& headers) { static Delegate delegate; - quic::QpackEncoder encoder(&delegate); + quic::QpackEncoder encoder(&delegate, quic::HuffmanEncoding::kEnabled); return encoder.EncodeHeaderList(0, headers, nullptr); } diff --git a/test/common/quic/platform/quiche_test_impl.h b/test/common/quic/platform/quiche_test_impl.h index 9ba6263bc638..33dc50af9812 100644 --- a/test/common/quic/platform/quiche_test_impl.h +++ b/test/common/quic/platform/quiche_test_impl.h @@ -40,5 +40,7 @@ inline std::string QuicheGetCommonSourcePathImpl() { return absl::StrCat(test_srcdir, "/external/com_github_google_quiche/quiche/common"); } +class QuicheScopedDisableExitOnDFatalImpl {}; + } // namespace test } // namespace quiche diff --git a/test/common/quic/test_utils.h b/test/common/quic/test_utils.h index 7a760158e411..0a1a5938eab4 100644 --- a/test/common/quic/test_utils.h +++ b/test/common/quic/test_utils.h @@ -270,7 +270,8 @@ void setQuicConfigWithDefaultValues(quic::QuicConfig* config) { std::string spdyHeaderToHttp3StreamPayload(const spdy::Http2HeaderBlock& header) { quic::test::NoopQpackStreamSenderDelegate encoder_stream_sender_delegate; quic::NoopDecoderStreamErrorDelegate decoder_stream_error_delegate; - auto qpack_encoder = std::make_unique(&decoder_stream_error_delegate); + auto qpack_encoder = std::make_unique(&decoder_stream_error_delegate, + quic::HuffmanEncoding::kEnabled); qpack_encoder->set_qpack_stream_sender_delegate(&encoder_stream_sender_delegate); // QpackEncoder does not use the dynamic table by default, // therefore the value of |stream_id| does not matter.