This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 4ccf9426d18 branch-3.0: [thirdparty](patch) Fix brpc (1.4.0) security
issue CVE-2023-31039 #44066 (#44090)
4ccf9426d18 is described below
commit 4ccf9426d1880615735f2b7fd04911fe4d853f0f
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Nov 18 08:49:10 2024 +0800
branch-3.0: [thirdparty](patch) Fix brpc (1.4.0) security issue
CVE-2023-31039 #44066 (#44090)
Cherry-picked from #44066
Co-authored-by: Gavin Chou <[email protected]>
---
thirdparty/patches/brpc-1.5.0-remove-wordexp.patch | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/thirdparty/patches/brpc-1.5.0-remove-wordexp.patch
b/thirdparty/patches/brpc-1.5.0-remove-wordexp.patch
new file mode 100644
index 00000000000..78c8a2dfda3
--- /dev/null
+++ b/thirdparty/patches/brpc-1.5.0-remove-wordexp.patch
@@ -0,0 +1,36 @@
+diff --git a/src/brpc/server.cpp b/src/brpc/server.cpp
+index 380ebb20d4..b4758ad8c8 100644
+--- a/src/brpc/server.cpp
++++ b/src/brpc/server.cpp
+@@ -16,7 +16,6 @@
+ // under the License.
+
+
+-#include <wordexp.h> // wordexp
+ #include <iomanip>
+ #include <arpa/inet.h> // inet_aton
+ #include <fcntl.h> // O_CREAT
+@@ -1716,23 +1715,7 @@ void Server::GenerateVersionIfNeeded() {
+ }
+ }
+
+-static std::string ExpandPath(const std::string &path) {
+- if (path.empty()) {
+- return std::string();
+- }
+- std::string ret;
+- wordexp_t p;
+- wordexp(path.c_str(), &p, 0);
+- CHECK_EQ(p.we_wordc, 1u);
+- if (p.we_wordc == 1) {
+- ret = p.we_wordv[0];
+- }
+- wordfree(&p);
+- return ret;
+-}
+-
+ void Server::PutPidFileIfNeeded() {
+- _options.pid_file = ExpandPath(_options.pid_file);
+ if (_options.pid_file.empty()) {
+ return;
+ }
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]