Skip to content

Commit 4f09a16

Browse files
Patch moby-engine for CVE-2026-39882
1 parent 395c8c7 commit 4f09a16

2 files changed

Lines changed: 59 additions & 1 deletion

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From 7f1cb3338a73160ce9e13abc7c2ba1324e5e6dd6 Mon Sep 17 00:00:00 2001
2+
From: AllSpark <allspark@microsoft.com>
3+
Date: Wed, 15 Apr 2026 07:25:48 +0000
4+
Subject: [PATCH] vendor(otel): limit response body size for OTLP HTTP exporter
5+
(backport of #8108)
6+
7+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
8+
Upstream-reference: AI Backport of https://github.com/open-telemetry/opentelemetry-go/commit/5e363de517dba6db62736b2f5cdef0e0929b4cd0.patch
9+
---
10+
.../otlp/otlptrace/otlptracehttp/client.go | 14 +++++++++++++-
11+
1 file changed, 13 insertions(+), 1 deletion(-)
12+
13+
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
14+
index 3a3cfec..05fc139 100644
15+
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
16+
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
17+
@@ -18,6 +18,7 @@ import (
18+
"bytes"
19+
"compress/gzip"
20+
"context"
21+
+ "errors"
22+
"fmt"
23+
"io"
24+
"net"
25+
@@ -40,6 +41,13 @@ import (
26+
27+
const contentTypeProto = "application/x-protobuf"
28+
29+
+// maxResponseBodySize is the maximum number of bytes to read from a response
30+
+// body. It is set to 4 MiB per the OTLP specification recommendation to
31+
+// mitigate excessive memory usage caused by a misconfigured or malicious
32+
+// server. If exceeded, the response is treated as a not-retryable error.
33+
+// This is a variable to allow tests to override it.
34+
+var maxResponseBodySize int64 = 4 * 1024 * 1024
35+
+
36+
var gzPool = sync.Pool{
37+
New: func() interface{} {
38+
w := gzip.NewWriter(io.Discard)
39+
@@ -169,7 +177,11 @@ func (d *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
40+
// Success, do not retry.
41+
// Read the partial success message, if any.
42+
var respData bytes.Buffer
43+
- if _, err := io.Copy(&respData, resp.Body); err != nil {
44+
+ if _, err := io.Copy(&respData, http.MaxBytesReader(nil, resp.Body, maxResponseBodySize)); err != nil {
45+
+ var maxBytesErr *http.MaxBytesError
46+
+ if errors.As(err, &maxBytesErr) {
47+
+ return fmt.Errorf("response body too large: exceeded %d bytes", maxBytesErr.Limit)
48+
+ }
49+
return err
50+
}
51+
52+
--
53+
2.45.4
54+

SPECS/moby-engine/moby-engine.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Summary: The open-source application container engine
44
Name: moby-engine
55
Version: 25.0.3
6-
Release: 15%{?dist}
6+
Release: 16%{?dist}
77
License: ASL 2.0
88
Group: Tools/Container
99
URL: https://mobyproject.org
@@ -31,6 +31,7 @@ Patch13: CVE-2024-51744.patch
3131
Patch14: CVE-2025-58183.patch
3232
#This can be removed when upgraded to v25.0.15
3333
Patch15: fix-multiarch-image-push-tag.patch
34+
Patch16: CVE-2026-39882.patch
3435

3536
%{?systemd_requires}
3637

@@ -126,6 +127,9 @@ fi
126127
%{_unitdir}/*
127128

128129
%changelog
130+
* Wed Apr 15 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 25.0.3-16
131+
- Patch for CVE-2026-39882
132+
129133
* Wed Jan 21 2025 Kavya Sree Kaitepalli <kkaitepalli@microsoft.com> - 25.0.3-15
130134
- Fix multiarch image push tag
131135

0 commit comments

Comments
 (0)