Skip to content

Commit 61fb513

Browse files
committed
Merge branch 'main' into 2.0
2 parents 2cdd0f1 + efe620c commit 61fb513

63 files changed

Lines changed: 2245 additions & 781 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SPECS-SIGNED/kernel-signed/kernel-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Summary: Signed Linux Kernel for %{buildarch} systems
1111
Name: kernel-signed-%{buildarch}
1212
Version: 5.15.148.2
13-
Release: 1%{?dist}
13+
Release: 2%{?dist}
1414
License: GPLv2
1515
Vendor: Microsoft Corporation
1616
Distribution: Mariner
@@ -153,6 +153,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg
153153
%exclude /module_info.ld
154154

155155
%changelog
156+
* Wed Feb 14 2024 Rachel Menge <rachelmenge@microsoft.com> - 5.15.148.2-2
157+
- Bump release to match kernel
158+
156159
* Thu Feb 08 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 5.15.148.2-1
157160
- Auto-upgrade to 5.15.148.2
158161

SPECS/application-gateway-kubernetes-ingress/application-gateway-kubernetes-ingress.spec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ Source0: %{name}-%{version}.tar.gz
2525
#
2626
Source1: %{name}-%{version}-vendor.tar.gz
2727

28-
# patches for vendored code >= 1000
2928
# If upstream ever upgrades client_goland to 1.11.1, we can get rid of this patch.
30-
Patch1000: CVE-2022-21698.patch
31-
Patch1001: CVE-2023-44487.patch
32-
Patch1002: CVE-2021-44716.patch
29+
Patch0: CVE-2022-21698.patch
30+
Patch1: CVE-2023-44487.patch
31+
Patch2: CVE-2021-44716.patch
3332

3433
BuildRequires: golang >= 1.13
3534
%if %{with_check}

SPECS/cf-cli/cf-cli.spec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ Source0: https://github.com/cloudfoundry/cli/archive/refs/tags/v%{version
2727
# See: https://reproducible-builds.org/docs/archives/
2828
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
2929
Source1: cli-%{version}-vendor.tar.gz
30-
31-
# patches for vendored code >= 1000
32-
Patch1000: CVE-2023-44487.patch
33-
Patch1001: CVE-2021-44716.patch
30+
Patch0: CVE-2023-44487.patch
31+
Patch1: CVE-2021-44716.patch
3432

3533
BuildRequires: golang >= 1.18.3
3634
%global debug_package %{nil}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From 7c96c9cd9318e816ce4564b58a2c98271363c447 Mon Sep 17 00:00:00 2001
2+
From: Brett Holman <brett.holman@canonical.com>
3+
Date: Mon, 29 Jan 2024 12:03:36 -0700
4+
Subject: [PATCH] ci: Pin pytest<8.0.0. (#4816)
5+
6+
The latest pytest release broke some tests in non-obvious ways. Pin
7+
the version for now so that CI passes.
8+
---
9+
integration-requirements.txt | 2 +-
10+
test-requirements.txt | 2 +-
11+
2 files changed, 2 insertions(+), 2 deletions(-)
12+
13+
diff --git a/integration-requirements.txt b/integration-requirements.txt
14+
index dc17759a..208a0c6a 100644
15+
--- a/integration-requirements.txt
16+
+++ b/integration-requirements.txt
17+
@@ -7,7 +7,7 @@ pycloudlib>=5.10.0,<1!6
18+
# test/unittests/conftest.py to be loaded by our integration-tests tox env
19+
# resulting in an unmet dependency issue:
20+
# https://github.com/pytest-dev/pytest/issues/11104
21+
-pytest!=7.3.2
22+
+pytest!=7.3.2,<8.0.0
23+
24+
packaging
25+
passlib
26+
diff --git a/test-requirements.txt b/test-requirements.txt
27+
index 46a98b4c..3d2480fd 100644
28+
--- a/test-requirements.txt
29+
+++ b/test-requirements.txt
30+
@@ -4,7 +4,7 @@
31+
# test/unittests/conftest.py to be loaded by our integration-tests tox env
32+
# resulting in an unmet dependency issue:
33+
# https://github.com/pytest-dev/pytest/issues/11104
34+
-pytest!=7.3.2
35+
+pytest!=7.3.2,<8.0.0
36+
37+
pytest-cov
38+
pytest-mock
39+
--
40+
2.33.8
41+

SPECS/cloud-init/cloud-init.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Cloud instance init scripts
22
Name: cloud-init
33
Version: 23.4.1
4-
Release: 2%{?dist}
4+
Release: 3%{?dist}
55
License: GPLv3
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -10,6 +10,7 @@ URL: https://launchpad.net/cloud-init
1010
Source0: https://launchpad.net/cloud-init/trunk/%{version}/+download/%{name}-%{version}.tar.gz
1111
Source1: 10-azure-kvp.cfg
1212
Patch0: Retain-exit-code-in-cloud-init-status-for-recoverabl.patch
13+
Patch1: ci-Pin-pytest-8.0.0.patch
1314
%define cl_services cloud-config.service cloud-config.target cloud-final.service cloud-init.service cloud-init.target cloud-init-local.service
1415
BuildRequires: automake
1516
BuildRequires: dbus
@@ -145,6 +146,9 @@ make check %{?_smp_mflags}
145146
%config(noreplace) %{_sysconfdir}/cloud/cloud.cfg.d/10-azure-kvp.cfg
146147

147148
%changelog
149+
* Fri Feb 09 2024 Chris Co <chrco@microsoft.com> - 23.4.1-3
150+
- Add patch to pin pytest to <8.0.0 so cloud-init tests run correctly
151+
148152
* Fri Jan 19 2024 Chris Co <chrco@microsoft.com> - 23.4.1-2
149153
- Add patch to retain exit code for recoverable errors
150154

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
diff -urN b/cri-tools-1.28.0/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go a/cri-tools-1.28.0/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go
2+
--- cri-tools-1.28.0/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go 2023-08-11 06:45:27.000000000 -0700
3+
+++ cri-tools-1.28.0/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go 2024-02-13 15:41:56.671537200 -0800
4+
@@ -7,6 +7,7 @@
5+
"fmt"
6+
"os"
7+
"strconv"
8+
+ _ "unsafe" // for go:linkname
9+
10+
"golang.org/x/sys/unix"
11+
)
12+
@@ -23,9 +24,11 @@
13+
return nil
14+
}
15+
16+
-// CloseExecFrom applies O_CLOEXEC to all file descriptors currently open for
17+
-// the process (except for those below the given fd value).
18+
-func CloseExecFrom(minFd int) error {
19+
+type fdFunc func(fd int)
20+
+
21+
+// fdRangeFrom calls the passed fdFunc for each file descriptor that is open in
22+
+// the current process.
23+
+func fdRangeFrom(minFd int, fn fdFunc) error {
24+
fdDir, err := os.Open("/proc/self/fd")
25+
if err != nil {
26+
return err
27+
@@ -50,15 +53,60 @@
28+
if fd < minFd {
29+
continue
30+
}
31+
- // Intentionally ignore errors from unix.CloseOnExec -- the cases where
32+
- // this might fail are basically file descriptors that have already
33+
- // been closed (including and especially the one that was created when
34+
- // os.ReadDir did the "opendir" syscall).
35+
- unix.CloseOnExec(fd)
36+
+ // Ignore the file descriptor we used for readdir, as it will be closed
37+
+ // when we return.
38+
+ if uintptr(fd) == fdDir.Fd() {
39+
+ continue
40+
+ }
41+
+ // Run the closure.
42+
+ fn(fd)
43+
}
44+
return nil
45+
}
46+
47+
+// CloseExecFrom sets the O_CLOEXEC flag on all file descriptors greater or
48+
+// equal to minFd in the current process.
49+
+func CloseExecFrom(minFd int) error {
50+
+ return fdRangeFrom(minFd, unix.CloseOnExec)
51+
+}
52+
+
53+
+//go:linkname runtime_IsPollDescriptor internal/poll.IsPollDescriptor
54+
+
55+
+// In order to make sure we do not close the internal epoll descriptors the Go
56+
+// runtime uses, we need to ensure that we skip descriptors that match
57+
+// "internal/poll".IsPollDescriptor. Yes, this is a Go runtime internal thing,
58+
+// unfortunately there's no other way to be sure we're only keeping the file
59+
+// descriptors the Go runtime needs. Hopefully nothing blows up doing this...
60+
+func runtime_IsPollDescriptor(fd uintptr) bool //nolint:revive
61+
+
62+
+// UnsafeCloseFrom closes all file descriptors greater or equal to minFd in the
63+
+// current process, except for those critical to Go's runtime (such as the
64+
+// netpoll management descriptors).
65+
+//
66+
+// NOTE: That this function is incredibly dangerous to use in most Go code, as
67+
+// closing file descriptors from underneath *os.File handles can lead to very
68+
+// bad behaviour (the closed file descriptor can be re-used and then any
69+
+// *os.File operations would apply to the wrong file). This function is only
70+
+// intended to be called from the last stage of runc init.
71+
+func UnsafeCloseFrom(minFd int) error {
72+
+ // We must not close some file descriptors.
73+
+ return fdRangeFrom(minFd, func(fd int) {
74+
+ if runtime_IsPollDescriptor(uintptr(fd)) {
75+
+ // These are the Go runtimes internal netpoll file descriptors.
76+
+ // These file descriptors are operated on deep in the Go scheduler,
77+
+ // and closing those files from underneath Go can result in panics.
78+
+ // There is no issue with keeping them because they are not
79+
+ // executable and are not useful to an attacker anyway. Also we
80+
+ // don't have any choice.
81+
+ return
82+
+ }
83+
+ // There's nothing we can do about errors from close(2), and the
84+
+ // only likely error to be seen is EBADF which indicates the fd was
85+
+ // already closed (in which case, we got what we wanted).
86+
+ _ = unix.Close(fd)
87+
+ })
88+
+}
89+
+
90+
// NewSockPair returns a new unix socket pair
91+
func NewSockPair(name string) (parent *os.File, child *os.File, err error) {
92+
fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM|unix.SOCK_CLOEXEC, 0)
93+
Binary files b/v1.28.0.tar.gz and a/v1.28.0.tar.gz differ

SPECS/cri-tools/cri-tools.spec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
Summary: CRI tools
88
Name: cri-tools
99
Version: 1.28.0
10-
Release: 4%{?dist}
10+
Release: 5%{?dist}
1111
License: Apache-2.0
1212
Vendor: Microsoft Corporation
1313
Distribution: Mariner
1414
Group: Development/Tools
1515
URL: https://github.com/kubernetes-sigs/cri-tools
1616
Source0: https://github.com/kubernetes-sigs/cri-tools/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
17+
Patch0: CVE-2024-21626.patch
1718
BuildRequires: glib-devel
1819
BuildRequires: glibc-devel
1920
BuildRequires: golang
@@ -44,9 +45,12 @@ install -p -m 755 -t %{buildroot}%{_bindir} "${BUILD_FOLDER}/critest"
4445
%{_bindir}/critest
4546

4647
%changelog
47-
* Fri Feb 02 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.28.0-4
48+
* Thu Feb 15 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.28.0-5
4849
- Bump release to rebuild with go 1.21.6
4950

51+
* Wed Feb 14 2024 Riken Maharjan <rmaharjan@microsoft.com> - 1.28.0-4
52+
- Patch runc for CVE-2024-21626
53+
5054
* Mon Oct 16 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.28.0-3
5155
- Bump release to rebuild with go 1.20.9
5256

SPECS/csi-driver-lvm/csi-driver-lvm.spec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ Source0: https://github.com/metal-stack/%{name}/archive/refs/tags/v%{vers
2020
# -cf %%{name}-%%{version}-govendor.tar.gz vendor
2121
Source1: %{name}-%{version}-govendor.tar.gz
2222

23-
# patches for vendored code >= 1000
24-
Patch1000: CVE-2021-44716.patch
23+
Patch0: CVE-2021-44716.patch
2524

2625
BuildRequires: golang
2726
Requires: %{name}-csi-lvmplugin-provisioner

SPECS/git-lfs/git-lfs.spec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ Source0: https://github.com/git-lfs/git-lfs/archive/v%{version}.tar.gz#/%{
2828
# See: https://reproducible-builds.org/docs/archives/
2929
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
3030
Source1: %{name}-%{version}-vendor.tar.gz
31-
32-
# patches for vendored code >= 1000
33-
Patch1000: CVE-2023-44487.patch
34-
Patch1001: CVE-2021-44716.patch
31+
Patch0: CVE-2023-44487.patch
32+
Patch1: CVE-2021-44716.patch
3533

3634
BuildRequires: golang
3735
BuildRequires: which

SPECS/jx/jx.spec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ Source0: https://github.com/jenkins-x/jx/archive/v%{version}.tar.gz#/%{na
2727
# See: https://reproducible-builds.org/docs/archives/
2828
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
2929
Source1: %{name}-%{version}-vendor.tar.gz
30-
31-
# patches for vendored code >= 1000
32-
Patch1000: CVE-2023-44487.patch
33-
Patch1001: CVE-2021-44716.patch
30+
Patch0: CVE-2023-44487.patch
31+
Patch1: CVE-2021-44716.patch
3432

3533
BuildRequires: golang >= 1.17.1
3634
%global debug_package %{nil}

0 commit comments

Comments
 (0)