diff mbox series

[meta-oe,scarthgap] grpc: patch CVE-2024-11407

Message ID 20250119185717.421718-1-peter.marko@siemens.com
State New
Headers show
Series [meta-oe,scarthgap] grpc: patch CVE-2024-11407 | expand

Commit Message

Peter Marko Jan. 19, 2025, 6:57 p.m. UTC
From: Peter Marko <peter.marko@siemens.com>

Cherry-pick commit [1] mentioned in [2].

[1] https://github.com/grpc/grpc/commit/e9046b2bbebc0cb7f5dc42008f807f6c7e98e791
[2] https://nvd.nist.gov/vuln/detail/CVE-2024-11407

Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
 .../grpc/grpc/CVE-2024-11407.patch            | 32 +++++++++++++++++++
 meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb  |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch b/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch
new file mode 100644
index 0000000000..beaff6a423
--- /dev/null
+++ b/meta-oe/recipes-devtools/grpc/grpc/CVE-2024-11407.patch
@@ -0,0 +1,32 @@ 
+From e9046b2bbebc0cb7f5dc42008f807f6c7e98e791 Mon Sep 17 00:00:00 2001
+From: Vignesh Babu <vigneshbabu@google.com>
+Date: Thu, 12 Sep 2024 11:13:45 -0700
+Subject: [PATCH] [EventEngine] Fix bug in Tx0cp code path in posix endpoint.
+
+This fix ensures that the iov_base pointers point to the right address.
+
+PiperOrigin-RevId: 673923651
+
+CVE: CVE-2024-11407
+Upstream-Status: Backport [https://github.com/grpc/grpc/commit/e9046b2bbebc0cb7f5dc42008f807f6c7e98e791]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ src/core/lib/event_engine/posix_engine/posix_endpoint.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc
+index 7634bb1334b..c5708db02c5 100644
+--- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc
++++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc
+@@ -239,7 +239,7 @@ msg_iovlen_type TcpZerocopySendRecord::PopulateIovs(size_t* unwind_slice_idx,
+        iov_size++) {
+     MutableSlice& slice = internal::SliceCast<MutableSlice>(
+         buf_.MutableSliceAt(out_offset_.slice_idx));
+-    iov[iov_size].iov_base = slice.begin();
++    iov[iov_size].iov_base = slice.begin() + out_offset_.byte_idx;
+     iov[iov_size].iov_len = slice.length() - out_offset_.byte_idx;
+     *sending_length += iov[iov_size].iov_len;
+     ++(out_offset_.slice_idx);
+-- 
+2.30.2
+
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb b/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb
index 4557fcc908..1594353ef5 100644
--- a/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb
+++ b/meta-oe/recipes-devtools/grpc/grpc_1.60.1.bb
@@ -25,6 +25,7 @@  BRANCH = "v1.60.x"
 SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \
            file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \
            file://CVE-2024-7246.patch \
+           file://CVE-2024-11407.patch \
            "
 # Fixes build with older compilers 4.8 especially on ubuntu 14.04
 CXXFLAGS:append:class-native = " -Wl,--no-as-needed"