Skip to content

Commit 24d1355

Browse files
[AUTO-CHERRYPICK] Patch CVE-2024-11407 in grpc - branch 3.0-dev (#11985)
Co-authored-by: suresh-thelkar <[email protected]>
1 parent d0515d6 commit 24d1355

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

SPECS/grpc/CVE-2024-11407.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From f3d8e3c99764e1d279326ed1ee7ba9b1bdba7a20 Mon Sep 17 00:00:00 2001
2+
From: Vignesh Babu <[email protected]>
3+
Date: Thu, 12 Sep 2024 11:13:45 -0700
4+
Subject: [PATCH] Fix bug in Tx0cp code path in posix endpoint.
5+
6+
This fix ensures that the iov_base pointers point to the right address.
7+
8+
PiperOrigin-RevId: 673923651
9+
---
10+
src/core/lib/event_engine/posix_engine/posix_endpoint.cc | 2 +-
11+
1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+
diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc
14+
index 019c2a3..048bc54 100644
15+
--- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc
16+
+++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc
17+
@@ -240,7 +240,7 @@ msg_iovlen_type TcpZerocopySendRecord::PopulateIovs(size_t* unwind_slice_idx,
18+
iov_size++) {
19+
MutableSlice& slice = internal::SliceCast<MutableSlice>(
20+
buf_.MutableSliceAt(out_offset_.slice_idx));
21+
- iov[iov_size].iov_base = slice.begin();
22+
+ iov[iov_size].iov_base = slice.begin() + out_offset_.byte_idx;
23+
iov[iov_size].iov_len = slice.length() - out_offset_.byte_idx;
24+
*sending_length += iov[iov_size].iov_len;
25+
++(out_offset_.slice_idx);
26+
--
27+
2.34.1
28+

SPECS/grpc/grpc.spec

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Open source remote procedure call (RPC) framework
22
Name: grpc
33
Version: 1.62.0
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
License: ASL 2.0
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
@@ -10,6 +10,7 @@ URL: https://www.grpc.io
1010
Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{version}.tar.gz
1111
Source1: %{name}-%{version}-submodules.tar.gz
1212
Patch0: grpcio-cython3.patch
13+
Patch1: CVE-2024-11407.patch
1314
BuildRequires: abseil-cpp-devel >= 20240116.0-2
1415
BuildRequires: build-essential
1516
BuildRequires: c-ares-devel
@@ -67,9 +68,7 @@ Requires: python3-six
6768
Python language bindings for gRPC.
6869

6970
%prep
70-
%setup -q -n %{name}-%{version}
71-
%setup -T -D -a 1
72-
%patch 0 -p1
71+
%autosetup -n %{name}-%{version} -a 1 -p1
7372

7473
# remove third party code taken from installed packages (build requires)
7574
rm -r %{_builddir}/%{name}-%{version}/third_party/abseil-cpp
@@ -153,6 +152,9 @@ export GRPC_PYTHON_CFLAGS="%{optflags} -std=c++$CXX_VERSION"
153152
%{python3_sitearch}/grpcio-%{version}-py%{python3_version}.egg-info
154153

155154
%changelog
155+
* Wed Jan 25 2024 Suresh Thelkar <[email protected]> - 1.62.0-4
156+
- Patch CVE-2024-11407
157+
156158
* Thu Jul 25 2024 Devin Anderson <[email protected]> - 1.62.0-3
157159
- Bump release to rebuild with latest 'abseil-cpp'.
158160

0 commit comments

Comments
 (0)