Skip to content

Commit 07feaa4

Browse files
[AutoPR- Security] Patch docker-compose for CVE-2025-47913 [HIGH] (microsoft#15118)
Co-authored-by: jslobodzian <[email protected]>
1 parent f44bc8c commit 07feaa4

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From 3a083d7126710d186760b49c440ce07bdb9a0f27 Mon Sep 17 00:00:00 2001
2+
From: AllSpark <[email protected]>
3+
Date: Tue, 18 Nov 2025 15:58:07 +0000
4+
Subject: [PATCH] ssh/agent: return an error for unexpected message types
5+
6+
Previously, receiving an unexpected message type in response to a key
7+
listing or a signing request could cause a panic due to a failed type
8+
assertion.
9+
10+
This change adds a default case to the type switch in order to detect
11+
and explicitly handle unknown or invalid message types, returning a
12+
descriptive error instead of crashing.
13+
14+
Fixes golang/go#75178
15+
16+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
17+
Upstream-reference: AI Backport of https://github.com/golang/crypto/commit/559e062ce8bfd6a39925294620b50906ca2a6f95.patch
18+
---
19+
vendor/golang.org/x/crypto/ssh/agent/client.go | 6 ++++--
20+
1 file changed, 4 insertions(+), 2 deletions(-)
21+
22+
diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go
23+
index fecba8e..6dc73e0 100644
24+
--- a/vendor/golang.org/x/crypto/ssh/agent/client.go
25+
+++ b/vendor/golang.org/x/crypto/ssh/agent/client.go
26+
@@ -430,8 +430,9 @@ func (c *client) List() ([]*Key, error) {
27+
return keys, nil
28+
case *failureAgentMsg:
29+
return nil, errors.New("agent: failed to list keys")
30+
+ default:
31+
+ return nil, fmt.Errorf("agent: failed to list keys, unexpected message type %T", msg)
32+
}
33+
- panic("unreachable")
34+
}
35+
36+
// Sign has the agent sign the data using a protocol 2 key as defined
37+
@@ -462,8 +463,9 @@ func (c *client) SignWithFlags(key ssh.PublicKey, data []byte, flags SignatureFl
38+
return &sig, nil
39+
case *failureAgentMsg:
40+
return nil, errors.New("agent: failed to sign challenge")
41+
+ default:
42+
+ return nil, fmt.Errorf("agent: failed to sign challenge, unexpected message type %T", msg)
43+
}
44+
- panic("unreachable")
45+
}
46+
47+
// unmarshal parses an agent message in packet, returning the parsed
48+
--
49+
2.45.4
50+

SPECS/docker-compose/docker-compose.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Define and run multi-container applications with Docker
22
Name: docker-compose
33
Version: 2.27.0
4-
Release: 5%{?dist}
4+
Release: 6%{?dist}
55
License: ASL 2.0
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
@@ -17,6 +17,7 @@ Patch1: CVE-2024-45338.patch
1717
Patch2: CVE-2025-22869.patch
1818
Patch3: CVE-2024-10846.patch
1919
Patch4: CVE-2025-22872.patch
20+
Patch5: CVE-2025-47913.patch
2021
BuildRequires: golang
2122
Requires: docker-cli
2223
Obsoletes: moby-compose < %{version}-%{release}
@@ -49,6 +50,9 @@ install -D -m0755 bin/build/docker-compose %{buildroot}/%{_libexecdir}/docker/cl
4950
%{_libexecdir}/docker/cli-plugins/docker-compose
5051

5152
%changelog
53+
* Tue Nov 18 2025 Azure Linux Security Servicing Account <[email protected]> - 2.27.0-6
54+
- Patch for CVE-2025-47913
55+
5256
* Wed Apr 23 2025 Jyoti Kanase <[email protected]> - 2.27.0-5
5357
- Patch CVE-2025-22872
5458

0 commit comments

Comments
 (0)