Skip to content

Commit 0308a74

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

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From e5db42e32d99478b5f123a78f9e93b9a69e32abc Mon Sep 17 00:00:00 2001
2+
From: AllSpark <[email protected]>
3+
Date: Tue, 18 Nov 2025 15:59:55 +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+
Reviewed-by: backport
17+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
18+
Upstream-reference: AI Backport of https://github.com/golang/crypto/commit/559e062ce8bfd6a39925294620b50906ca2a6f95.patch
19+
---
20+
vendor/golang.org/x/crypto/ssh/agent/client.go | 6 ++++--
21+
1 file changed, 4 insertions(+), 2 deletions(-)
22+
23+
diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go
24+
index fecba8e..6dc73e0 100644
25+
--- a/vendor/golang.org/x/crypto/ssh/agent/client.go
26+
+++ b/vendor/golang.org/x/crypto/ssh/agent/client.go
27+
@@ -430,8 +430,9 @@ func (c *client) List() ([]*Key, error) {
28+
return keys, nil
29+
case *failureAgentMsg:
30+
return nil, errors.New("agent: failed to list keys")
31+
+ default:
32+
+ return nil, fmt.Errorf("agent: failed to list keys, unexpected message type %T", msg)
33+
}
34+
- panic("unreachable")
35+
}
36+
37+
// Sign has the agent sign the data using a protocol 2 key as defined
38+
@@ -462,8 +463,9 @@ func (c *client) SignWithFlags(key ssh.PublicKey, data []byte, flags SignatureFl
39+
return &sig, nil
40+
case *failureAgentMsg:
41+
return nil, errors.New("agent: failed to sign challenge")
42+
+ default:
43+
+ return nil, fmt.Errorf("agent: failed to sign challenge, unexpected message type %T", msg)
44+
}
45+
- panic("unreachable")
46+
}
47+
48+
// unmarshal parses an agent message in packet, returning the parsed
49+
--
50+
2.45.4
51+

SPECS/docker-buildx/docker-buildx.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Summary: A Docker CLI plugin for extended build capabilities with BuildKi
44
Name: docker-buildx
55
# update "commit_hash" above when upgrading version
66
Version: 0.14.0
7-
Release: 7%{?dist}
7+
Release: 8%{?dist}
88
License: ASL 2.0
99
Group: Tools/Container
1010
Vendor: Microsoft Corporation
@@ -16,6 +16,7 @@ Patch1: CVE-2024-45338.patch
1616
Patch2: CVE-2025-22869.patch
1717
Patch3: CVE-2025-0495.patch
1818
Patch4: CVE-2025-22872.patch
19+
Patch5: CVE-2025-47913.patch
1920

2021
BuildRequires: bash
2122
BuildRequires: golang < 1.25
@@ -49,6 +50,9 @@ install -m 755 buildx "%{buildroot}%{_libexecdir}/docker/cli-plugins/docker-buil
4950
%{_libexecdir}/docker/cli-plugins/docker-buildx
5051

5152
%changelog
53+
* Tue Nov 18 2025 Azure Linux Security Servicing Account <[email protected]> - 0.14.0-8
54+
- Patch for CVE-2025-47913
55+
5256
* Sun Aug 31 2025 Andrew Phelps <[email protected]> - 0.14.0-7
5357
- Set BR for golang to < 1.25
5458

0 commit comments

Comments
 (0)