Skip to content

Commit 078f944

Browse files
Patch rust for CVE-2024-11738
1 parent 7edaec6 commit 078f944

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

SPECS/rust/CVE-2024-11738.patch

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 874dd834f5444394deda1f7fcc19cc09afebf6bd Mon Sep 17 00:00:00 2001
2+
From: Kevin Wang <[email protected]>
3+
Date: Fri, 22 Nov 2024 20:48:01 +0800
4+
Subject: [PATCH] Record and restore the processed cursor in
5+
first_handshake_message
6+
7+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
8+
Upstream-reference: https://github.com/rustls/rustls/pull/2231.patch
9+
---
10+
vendor/rustls-0.23.13/src/conn.rs | 2 ++
11+
1 file changed, 2 insertions(+)
12+
13+
diff --git a/vendor/rustls-0.23.13/src/conn.rs b/vendor/rustls-0.23.13/src/conn.rs
14+
index 60b597ba5..d45d71fd0 100644
15+
--- a/vendor/rustls-0.23.13/src/conn.rs
16+
+++ b/vendor/rustls-0.23.13/src/conn.rs
17+
@@ -655,6 +655,7 @@ impl<Data> ConnectionCommon<Data> {
18+
/// `process_handshake_messages()` path, specialized for the first handshake message.
19+
pub(crate) fn first_handshake_message(&mut self) -> Result<Option<Message<'static>>, Error> {
20+
let mut buffer_progress = BufferProgress::default();
21+
+ buffer_progress.add_processed(self.deframer_buffer.processed);
22+
23+
let res = self
24+
.core
25+
@@ -665,6 +666,7 @@ impl<Data> ConnectionCommon<Data> {
26+
)
27+
.map(|opt| opt.map(|pm| Message::try_from(pm).map(|m| m.into_owned())));
28+
29+
+ self.deframer_buffer.processed = buffer_progress.processed();
30+
match res? {
31+
Some(Ok(msg)) => {
32+
self.deframer_buffer
33+
--
34+
2.45.4
35+

SPECS/rust/rust.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Summary: Rust Programming Language
1010
Name: rust
1111
Version: 1.86.0
12-
Release: 3%{?dist}
12+
Release: 4%{?dist}
1313
License: (ASL 2.0 OR MIT) AND BSD AND CC-BY-3.0
1414
Vendor: Microsoft Corporation
1515
Distribution: Azure Linux
@@ -42,6 +42,7 @@ Source5: https://static.rust-lang.org/dist/%{release_date}/cargo-%{stage0
4242
Source6: https://static.rust-lang.org/dist/%{release_date}/rustc-%{stage0_version}-aarch64-unknown-linux-gnu.tar.xz
4343
Source7: https://static.rust-lang.org/dist/%{release_date}/rust-std-%{stage0_version}-aarch64-unknown-linux-gnu.tar.xz
4444
Patch0: CVE-2025-4574.patch
45+
Patch1: CVE-2024-11738.patch
4546
BuildRequires: binutils
4647
BuildRequires: cmake
4748
# make sure rust relies on curl from CBL-Mariner (instead of using its vendored flavor)
@@ -179,6 +180,9 @@ rm %{buildroot}%{_docdir}/docs/html/.lock
179180
%{_mandir}/man1/*
180181

181182
%changelog
183+
* Fri Aug 08 2025 Azure Linux Security Servicing Account <[email protected]> - 1.86.0-4
184+
- Patch for CVE-2024-11738
185+
182186
* Fri Jun 13 2025 Kavya Sree Kaitepalli <[email protected]> - 1.86.0-3
183187
- Patch CVE-2025-4574
184188

0 commit comments

Comments
 (0)