Skip to content

Commit 15df961

Browse files
authored
Fixed coredns random rebuilds bug. (microsoft#14697)
1 parent d3975f8 commit 15df961

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

SPECS/coredns/CVE-2025-47950.patch

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@ From: Aninda <[email protected]>
33
Date: Mon, 16 Jun 2025 15:03:49 -0400
44
Subject: [PATCH] Address CVE-2025-47950
55
Upstream Patch Reference: https://github.com/coredns/coredns/commit/efaed02c6a480ec147b1f799aab7cf815b17dfe1
6+
7+
Modification from original patch by Pawel Winogrodzki <[email protected]>:
8+
Changed original file order. We want to modify plugin.cfg before
9+
zdirectives.go and zplugin.go to guarantee their mtime is same or newer than
10+
plugin.cfg. Makefile target for the two z*.go files depends on plugin.cfg,
11+
so the original order was causing random runs of the z*.go target.
12+
The target included calling 'go get', which in turn would fail builds with disabled
13+
network access.
14+
615
---
16+
plugin.cfg | 1 +
717
core/dnsserver/config.go | 8 ++
818
core/dnsserver/server_quic.go | 49 +++++--
919
core/dnsserver/zdirectives.go | 1 +
1020
core/plugin/zplugin.go | 1 +
1121
man/coredns-quic.7 | 69 ++++++++++
12-
plugin.cfg | 1 +
1322
plugin/quic/README.md | 48 +++++++
1423
plugin/quic/setup.go | 79 +++++++++++
1524
plugin/quic/setup_test.go | 242 ++++++++++++++++++++++++++++++++++
@@ -20,6 +29,18 @@ Upstream Patch Reference: https://github.com/coredns/coredns/commit/efaed02c6a48
2029
create mode 100644 plugin/quic/setup.go
2130
create mode 100644 plugin/quic/setup_test.go
2231

32+
diff --git a/plugin.cfg b/plugin.cfg
33+
index 532c3dd..a01852b 100644
34+
--- a/plugin.cfg
35+
+++ b/plugin.cfg
36+
@@ -24,6 +24,7 @@ metadata:metadata
37+
geoip:geoip
38+
cancel:cancel
39+
tls:tls
40+
+quic:quic
41+
timeouts:timeouts
42+
reload:reload
43+
nsid:nsid
2344
diff --git a/core/dnsserver/config.go b/core/dnsserver/config.go
2445
index 9e11166..cba5795 100644
2546
--- a/core/dnsserver/config.go
@@ -231,18 +252,6 @@ index 0000000..6301ec2
231252
+.fi
232253
+.RE
233254
+
234-
diff --git a/plugin.cfg b/plugin.cfg
235-
index 532c3dd..a01852b 100644
236-
--- a/plugin.cfg
237-
+++ b/plugin.cfg
238-
@@ -24,6 +24,7 @@ metadata:metadata
239-
geoip:geoip
240-
cancel:cancel
241-
tls:tls
242-
+quic:quic
243-
timeouts:timeouts
244-
reload:reload
245-
nsid:nsid
246255
diff --git a/plugin/quic/README.md b/plugin/quic/README.md
247256
new file mode 100644
248257
index 0000000..63fe56d

SPECS/coredns/coredns.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Fast and flexible DNS server
77
Name: coredns
88
Version: 1.11.4
9-
Release: 9%{?dist}
9+
Release: 10%{?dist}
1010
License: Apache License 2.0
1111
Vendor: Microsoft Corporation
1212
Distribution: Azure Linux
@@ -83,6 +83,9 @@ go install github.com/fatih/faillint@latest && \
8383
%{_bindir}/%{name}
8484

8585
%changelog
86+
* Thu Sep 18 2025 Pawel Winogrodzki <[email protected]> - 1.11.4-10
87+
- Changed patch order to resolve 'make' race condition.
88+
8689
* Thu Sep 11 2025 Azure Linux Security Servicing Account <[email protected]> - 1.11.4-9
8790
- Patch for CVE-2025-58063
8891

0 commit comments

Comments
 (0)