Skip to content

Commit 271b7dc

Browse files
CBL-Mariner-Botjiriarikenm1
authored
[AUTO-CHERRYPICK] Update openssl to 3.3.2 under cloud-hypervisor-cvm in order to address CVE-2024-6119 - branch main (#10530)
Co-authored-by: Jiri Appl <jiria@microsoft.com> Co-authored-by: Riken Maharjan <rmaharjan@microsoft.com>
1 parent 0ce7d66 commit 271b7dc

3 files changed

Lines changed: 38 additions & 10 deletions

File tree

SPECS/cloud-hypervisor-cvm/cloud-hypervisor-cvm.signatures.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
3-
"cloud-hypervisor-cvm-38.0.72.2-cargo.tar.gz": "12190a4f2fbd29b2c6c197388a958eab5dff91e8d75927841669d81d794eadf4",
3+
"cloud-hypervisor-cvm-38.0.72.2-2-cargo.tar.gz": "68d1dc8f2a70fddad934e9131ccad7ce2c96323869433419e2f488062396bcc8",
44
"cloud-hypervisor-cvm-38.0.72.2.tar.gz": "1a357a0805f7b6d90993d5ae246c2dedff88cf98c9c0eab0903dc8071be0dae2",
55
"config.toml": "74c28b7520c157109b8990b325fe8f13504e56561a9bac51499d4c6bf4a66e52"
66
}

SPECS/cloud-hypervisor-cvm/cloud-hypervisor-cvm.spec

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name: cloud-hypervisor-cvm
66
Summary: Cloud Hypervisor CVM is an open source Virtual Machine Monitor (VMM) that enables running SEV SNP enabled VMs on top of MSHV using the IGVM file format as payload.
77
Version: 38.0.72.2
8-
Release: 2%{?dist}
8+
Release: 3%{?dist}
99
License: ASL 2.0 OR BSD-3-clause
1010
Vendor: Microsoft Corporation
1111
Distribution: Mariner
@@ -15,15 +15,23 @@ Source0: https://github.com/microsoft/cloud-hypervisor/archive/refs/tags/
1515
%if 0%{?using_vendored_crates}
1616
# Note: the %%{name}-%%{version}-cargo.tar.gz file contains a cache created by capturing the contents downloaded into $CARGO_HOME.
1717
# To update the cache and config.toml run:
18-
# tar -xf %{name}-%{version}.tar.gz
19-
# cd %{name}-%{version}
18+
# tar -xf %%{name}-%%{version}.tar.gz
19+
# cd %%{name}-%%{version}
20+
# patch -u -p0 < ../upgrade-openssl-to-3.3.2-to-address-CVE-2024-6119.patch
2021
# cargo vendor > config.toml
21-
# tar -czf %{name}-%{version}-cargo.tar.gz vendor/
22-
# rename the tarball to %{name}-%{version}-cargo.tar.gz when updating version
23-
Source1: %{name}-%{version}-cargo.tar.gz
22+
# tar -czf %%{name}-%%{version}-cargo.tar.gz vendor/
23+
# rename the tarball to %%{name}-%%{version}-2-cargo.tar.gz when updating version
24+
# (feel free to drop -2 and this comment on version change)
25+
Source1: %{name}-%{version}-2-cargo.tar.gz
2426
Source2: config.toml
2527
%endif
26-
Patch0: 0001-hypervisor-mshv-Fix-panic-when-rejecting-extended-gu.patch
28+
# Generated using:
29+
# tar -xf %%{name}-%%{version}.tar.gz
30+
# cd %%{name}-%%{version}
31+
# cargo update -p openssl-src --precise 300.3.2+3.3.2
32+
# diff -u ../cloud-hypervisor-msft-v38.0.72.2.backup/Cargo.lock Cargo.lock > ../upgrade-openssl-to-3.3.2-to-address-CVE-2024-6119.patch
33+
Patch0: upgrade-openssl-to-3.3.2-to-address-CVE-2024-6119.patch
34+
Patch1: 0001-hypervisor-mshv-Fix-panic-when-rejecting-extended-gu.patch
2735

2836
Conflicts: cloud-hypervisor
2937

@@ -72,12 +80,15 @@ Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on to
7280

7381
%prep
7482

75-
%autosetup -p1 -n cloud-hypervisor-msft-v%{version}
83+
%setup -q -n cloud-hypervisor-msft-v%{version}
7684
%if 0%{?using_vendored_crates}
7785
tar xf %{SOURCE1}
7886
mkdir -p .cargo
7987
cp %{SOURCE2} .cargo/
8088
%endif
89+
# The vendored archive has been populated based on the patch, so we need to
90+
# repatch here as well in order to use the same versions
91+
%autopatch -p1
8192

8293
%install
8394
install -d %{buildroot}%{_bindir}
@@ -139,9 +150,12 @@ cargo build --release --target=%{rust_musl_target} %{cargo_pkg_feature_opts} %{c
139150
%license LICENSE-BSD-3-Clause
140151

141152
%changelog
142-
* Fri Aug 23 2024 Manuel Huber <mahuber@microsoft.com> - 38.0.72.2-2
153+
* Mon Sep 23 2024 Manuel Huber <mahuber@microsoft.com> - 38.0.72.2-3
143154
- Add upstream patch to prevent crash
144155

156+
* Tue Sep 17 2024 Jiri Appl <jiria@microsoft.com> - 38.0.72.2-2
157+
- Patch openssl in the vendored archive to 3.3.2 to address CVE-2024-6119
158+
145159
* Thu Jul 04 2024 Archana Choudhary <archana1@microsoft.com> - 38.0.72.2-1
146160
- Upgrade to v38.0.72.2
147161
- Fixes CVE-2023-45853, CVE-2018-25032, CVE-2023-5363, CVE-2023-5678, CVE-2023-6129, CVE-2023-6237, CVE-2024-0727, CVE-2024-4603
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/../cloud-hypervisor-msft-v38.0.72.2.backup/Cargo.lock 2024-09-17 12:55:41.269905595 -0700
2+
+++ b/Cargo.lock 2024-09-17 13:49:15.579003678 -0700
3+
@@ -1421,9 +1421,9 @@
4+
5+
[[package]]
6+
name = "openssl-src"
7+
-version = "300.3.1+3.3.1"
8+
+version = "300.3.2+3.3.2"
9+
source = "registry+https://github.com/rust-lang/crates.io-index"
10+
-checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91"
11+
+checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b"
12+
dependencies = [
13+
"cc",
14+
]

0 commit comments

Comments
 (0)