fix(deps): update module go.opentelemetry.io/collector/config/configgrpc to v0.102.1 [security] #7219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.96.0->v0.102.1Denial of Service via Zip/Decompression Bomb sent over HTTP or gRPC
CVE-2024-36129 / GHSA-c74f-6mfw-mm4v / GO-2024-2900
More information
Details
Summary
An unsafe decompression vulnerability allows unauthenticated attackers to crash the collector via excessive memory consumption.
Details
The OpenTelemetry Collector handles compressed HTTP requests by recognizing the Content-Encoding header, rewriting the HTTP request body, and allowing subsequent handlers to process decompressed data. It supports the gzip, zstd, zlib, snappy, and deflate compression algorithms. A "zip bomb" or "decompression bomb" is a malicious archive designed to crash or disable the system reading it. Decompression of HTTP requests is typically not enabled by default in popular server solutions due to associated security risks. A malicious attacker could leverage this weakness to crash the collector by sending a small request that, when uncompressed by the server, results in excessive memory consumption.
During proof-of-concept (PoC) testing, all supported compression algorithms could be abused, with zstd causing the most significant impact. Compressing 10GB of all-zero data reduced it to 329KB. Sending an HTTP request with this compressed data instantly consumed all available server memory (the testing server had 32GB), leading to an out-of-memory (OOM) kill of the collector application instance.
The root cause for this issue can be found in the following code path:
Affected File:
https://github.com/open-telemetry/opentelemetry-collector/[...]confighttp/compression.go
Affected Code:
To mitigate this attack vector, it is recommended to either disable support for decompressing client HTTP requests entirely or limit the size of the decompressed data that can be processed. Limiting the decompressed data size can be achieved by wrapping the decompressed data reader inside an io.LimitedReader, which restricts the reading to a specified number of bytes. This approach helps prevent excessive memory usage and potential out-of-memory errors caused by decompression bombs.
PoC
This issue was confirmed as follows:
PoC Commands:
Output:
Server logs:
A similar problem exists for configgrpc when using the zstd compression:
Impact
Unauthenticated attackers can crash the collector via excessive memory consumption, stopping the entire collection of telemetry.
Patches
Workarounds
References
Credits
This issue was uncovered during a security audit performed by 7ASecurity, facilitated by OSTIF, for the OpenTelemetry project.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Denial of Service via Zip/Decompression Bomb sent over HTTP or gRPC in go.opentelemetry.io/collector/config/configgrpc
CVE-2024-36129 / GHSA-c74f-6mfw-mm4v / GO-2024-2900
More information
Details
An unsafe decompression vulnerability allows unauthenticated attackers to crash the collector via excessive memory consumption.
Severity
Unknown
References
This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).
Release Notes
open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/config/configgrpc)
v0.102.1Compare Source
This release addresses GHSA-c74f-6mfw-mm4v for
configgrpc.🧰 Bug fixes 🧰
configrpc: Use own compressors for zstd. Before this change, the zstd compressor we used didn't respect the max message size. This addresses GHSA-c74f-6mfw-mm4v forconfiggrpc(#10323)v0.102.0Compare Source
This release addresses GHSA-c74f-6mfw-mm4v for
confighttp.🛑 Breaking changes 🛑
envprovider: Restricts Environment Variable names. Environment variable names must now be ASCII only and start with a letter or an underscore, and can only contain underscores, letters, or numbers. (#9531)confighttp: Apply MaxRequestBodySize to the result of a decompressed body. This addresses GHSA-c74f-6mfw-mm4v forconfighttp(#10289)When using compressed payloads, the Collector would verify only the size of the compressed payload.
This change applies the same restriction to the decompressed content. As a security measure, a limit of 20 MiB was added, which makes this a breaking change.
For most clients, this shouldn't be a problem, but if you often have payloads that decompress to more than 20 MiB, you might want to either configure your
client to send smaller batches (recommended), or increase the limit using the MaxRequestBodySize option.
💡 Enhancements 💡
mdatagen: auto-generate utilities to test component telemetry (#19783)mdatagen: support setting an AttributeSet for async instruments (#9674)mdatagen: support using telemetry level in telemetry builder (#10234)This allows components to set the minimum level needed for them to produce telemetry. By default, this is set to configtelemetry.LevelBasic. If the telemetry level is below that minimum level, then the noop meter is used for metrics.
mdatagen: add support for bucket boundaries for histograms (#10218)releases: add documentation in how to verify the image signatures using cosign (#9610)🧰 Bug fixes 🧰
batchprocessor: ensure attributes are set on cardinality metadata metric (#9674)batchprocessor: Fixing processor_batch_metadata_cardinality which was broken in v0.101.0 (#10231)batchprocessor: respect telemetry level for all metrics (#10234)exporterhelper: Fix potential deadlocks in BatcherSender shutdown (#10255)v0.101.0Compare Source
💡 Enhancements 💡
mdatagen: generate documentation for internal telemetry (#10170)mdatagen: add ability to use metadata.yaml to automatically generate instruments for components (#10054)The
telemetrysection in metadata.yaml is used to generateinstruments for components to measure telemetry about themselves.
confmap: Allow Converters to write logs during startup (#10135)otelcol: Enable logging during configuration resolution (#10056)🧰 Bug fixes 🧰
mdatagen: Run package tests when goleak is skipped (#10125)v0.100.0Compare Source
🛑 Breaking changes 🛑
service: Thevalidatesub-command no longer validates that each pipeline's type is the same as its component types (#10031)💡 Enhancements 💡
semconv: Add support for v1.25.0 semantic convention (#10072)builder: remove the need to go get a module to address ambiguous import paths (#10015)pmetric: Support parsing metric.metadata from OTLP JSON. (#10026)🧰 Bug fixes 🧰
exporterhelper: Fix enabled config option for batch sender (#10076)v0.99.0Compare Source
🛑 Breaking changes 🛑
builder: Add strict version checking when using the builder. Add the temporary flag--skip-strict-versioningfor skipping this check. (#9896)Strict version checking will error on major and minor version mismatches
between the
otelcol_versionconfigured and the builder version or versionsin the go.mod. This check can be temporarily disabled by using the
--skip-strict-versioningflag. This flag will be removed in a future minor version.
telemetry: Distributed internal metrics across different levels. (#7890)The internal metrics levels are updated along with reported metrics:
basictonormal, which can be overridden withservice::telemetry::metrics::levelconfiguration.normallevel:processor_batch_batch_send_sizeprocessor_batch_metadata_cardinalityprocessor_batch_timeout_trigger_sendprocessor_batch_size_trigger_senddetailedlevel:💡 Enhancements 💡
confighttp: Disable concurrency in zstd compression (#8216)cmd/builder: Allow configuringconfmap.Providers in the builder. (#4759)If no providers are specified, the defaults are used.
The default providers are: env, file, http, https, and yaml.
To configure providers, use the
providerskey in your OCB buildmanifest with a list of Go modules for your providers.
The modules will work the same as other Collector components.
mdatagen: enable goleak tests by default via mdatagen (#9959)cmd/mdatagen: support excluding some metrics based on string and regexes in resource_attributes (#9661)cmd/mdatagen: Generate config and factory tests covering their requirements. (#9940)The tests are moved from cmd/builder.
confmap: AddProviderSettings,ConverterSettings,ProviderFactories, andConverterFactoriesfields toconfmap.ResolverSettings(#9516)This allows configuring providers and converters, which are instantiated by
NewResolverusing the given factories.🧰 Bug fixes 🧰
exporter/otlp: Allow DNS scheme to be used in endpoint (#4274)service: fix record sampler configuration (#9968)service: ensure the tracer provider is configured via go.opentelemetry.io/contrib/config (#9967)otlphttpexporter: Fixes a bug that was preventing the otlp http exporter from propagating status. (#9892)confmap: Fix decoding negative configuration values into uints (#9060)v0.98.0Compare Source
🛑 Breaking changes 🛑
service: emit internal collector metrics with _ instead of / with OTLP export (#9774)This is addressing an issue w/ the names of the metrics generated by the Collector for its
internal metrics. Note that this change only impacts users that emit telemetry using OTLP, which
is currently still in experimental support. The prometheus metrics already replaced
/with_and they will do the same with
_.💡 Enhancements 💡
mdatagen: Adds unsupported platforms to the README header (#9794)confmap: Clarify the use of embedded structs to make unmarshaling composable (#7101)nopexporter: Promote the nopexporter to beta (#7316)nopreceiver: Promote the nopreceiver to beta (#7316)otlpexporter: Checks for port in the config validation for the otlpexporter (#9505)service: Validate pipeline type against component types (#8007)🧰 Bug fixes 🧰
configtls: Fix issue whereIncludeSystemCACertsPoolwas not consistently used betweenServerConfigandClientConfig. (#9835)component: Fix issue where thecomponentscommand wasn't properly printing the component type. (#9856)otelcol: Fix issue where thevalidatecommand wasn't properly printing valid component type. (#9866)receiver/otlp: Fix bug where the otlp receiver did not properly respond with a retryable error code when possible for http (#9357)v0.97.0Compare Source
🛑 Breaking changes 🛑
telemetry: Remove telemetry.useOtelForInternalMetrics stable feature gate (#9752)🚀 New components 🚀
exporter/nop: Add thenopexporterto serve as a placeholder exporter in a pipeline (#7316)This is primarily useful for starting the Collector with only extensions enabled
or to test Collector pipeline throughput.
receiver/nop: Add thenopreceiverto serve as a placeholder receiver in a pipeline (#7316)This is primarily useful for starting the Collector with only extensions enabled.
💡 Enhancements 💡
configtls: Validates TLS min_version and max_version (#9475)Introduces
Validate()method in TLSSetting.configcompression: Mark module as Stable. (#9571)cmd/mdatagen: Use go package name for the scope name by default and add an option to provide the scope name in metadata.yaml. (#9693)cmd/mdatagen: Generate the lifecycle tests for components by default. (#9683)It's encouraged to have lifecycle tests for all components enabled, but they can be disabled if needed
in metadata.yaml with
skip_lifecycle: trueandskip_shutdown: trueundertestssection.cmd/mdatagen: optimize the mdatagen for the case like batchprocessor which use a common struct to implement consumer.Traces, consumer.Metrics, consumer.Logs in the meantime. (#9688)🧰 Bug fixes 🧰
exporterhelper: Fix persistent queue size backup on reads. (#9740)processor/batch: Prevent starting unnecessary goroutines. (#9739)otlphttpexporter: prevent error on empty response body when content type is application/json (#9666)confmap: confmap honorsUnmarshalmethods on config embedded structs. (#6671)otelcol: Respect telemetry configuration when running as a Windows service (#5300)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.