From b118d9034a71040fb6abc85c59feed703bef42ad Mon Sep 17 00:00:00 2001 From: lizhipeng Date: Tue, 26 Aug 2025 10:50:05 +0800 Subject: [PATCH] add checking result for rgw frontend init Signed-off-by: lizhipeng (cherry picked from commit 3a4d84440cf58329ef83430712d7b5c1aadf96b1) --- ...hecking-result-for-rgw-frontend-init.patch | 60 +++++++++++++++++++ ceph.spec | 6 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 0008-add-checking-result-for-rgw-frontend-init.patch diff --git a/0008-add-checking-result-for-rgw-frontend-init.patch b/0008-add-checking-result-for-rgw-frontend-init.patch new file mode 100644 index 0000000..9a66a21 --- /dev/null +++ b/0008-add-checking-result-for-rgw-frontend-init.patch @@ -0,0 +1,60 @@ +From 5189c2e457bbbc0c7f430d3fa810b59896c8bb44 Mon Sep 17 00:00:00 2001 +From: zhipeng li +Date: Mon, 27 Nov 2023 15:24:06 +0800 +Subject: [PATCH] add checking result for rgw frontend init fixes: + https://tracker.ceph.com/issues/63644 + +Signed-off-by: zhipeng li +--- + src/rgw/rgw_lib.cc | 9 ++++++++- + src/rgw/rgw_main.cc | 7 ++++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/rgw/rgw_lib.cc b/src/rgw/rgw_lib.cc +index f449cce21c0..b105e1dad1f 100644 +--- a/src/rgw/rgw_lib.cc ++++ b/src/rgw/rgw_lib.cc +@@ -468,6 +468,7 @@ namespace rgw { + + int RGWLib::init(vector& args) + { ++ int r{0}; + /* alternative default for module */ + map defaults = { + { "debug_rgw", "1/5" }, +@@ -524,7 +525,13 @@ namespace rgw { + register_async_signal_handler(SIGUSR1, rgw::signal::handle_sigterm); + + main.init_tracepoints(); +- main.init_frontends2(this /* rgwlib */); ++ r = main.init_frontends2(this /* rgwlib */); ++ if (r != 0) { ++ derr << "ERROR: unable to initialize frontend, r = " << r << dendl; ++ main.shutdown(); ++ return r; ++ } ++ + main.init_notification_endpoints(); + main.init_lua(); + +diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc +index 27b02f84195..57407b43481 100644 +--- a/src/rgw/rgw_main.cc ++++ b/src/rgw/rgw_main.cc +@@ -157,7 +157,12 @@ int main(int argc, char *argv[]) + main.init_opslog(); + main.init_tracepoints(); + main.init_lua(); +- main.init_frontends2(nullptr /* RGWLib */); ++ r = main.init_frontends2(nullptr /* RGWLib */); ++ if (r != 0) { ++ derr << "ERROR: initialize frontend fail, r = " << r << dendl; ++ main.shutdown(); ++ return r; ++ } + main.init_notification_endpoints(); + + #if defined(HAVE_SYS_PRCTL_H) +-- +2.47.2 + diff --git a/ceph.spec b/ceph.spec index 091034a..89d3ae8 100644 --- a/ceph.spec +++ b/ceph.spec @@ -174,7 +174,7 @@ ################################################################################# Name: ceph Version: 18.2.2 -Release: 8 +Release: 9 %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} Epoch: 2 %endif @@ -199,6 +199,7 @@ Patch4: 0004-fix-mds-metadata-lost-in-one-case.patch Patch5: 0005-fix-CVE-2024-48916.patch Patch6: 0006-client-set-LIBMOUNT_FORCE_MOUNT2-always.patch Patch7: 0007-client-disallow-unprivileged-users-to-escalate-root.patch +Patch8: 0008-add-checking-result-for-rgw-frontend-init.patch %ifarch riscv64 Patch9002: 9002-fix-riscv64-build.patch @@ -2645,6 +2646,9 @@ exit 0 %{_datadir}/snmp/mibs %changelog +* Tue Aug 26 2025 lizhipeng - 2:18.2.2-9 +- fix invalid ip issue of radosgw endpoint + * Mon Jul 7 2025 lizhipeng - 2:18.2.2-8 - fix CVE-2025-52555 -- Gitee