Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
f3869737bb
!249 [sync] PR-245: fix CVE-2023-46159
From: @openeuler-sync-bot 
Reviewed-by: @liuqinfei, @rosinL 
Signed-off-by: @rosinL
2024-04-30 01:03:43 +00:00
lizhipeng
c119db7cec fix CVE-2023-46159
Signed-off-by: lizhipeng <qiuxinyidian@gmail.com>

(cherry picked from commit 0528589084daa5d18c15c6354c7f028a48d2ee21)
2024-04-23 10:43:51 +08:00
openeuler-ci-bot
df707973e9
!206 [sync] PR-187: ceph-volume: add judgment for ceph-volume lvm activate
From: @liuqinfei 
Reviewed-by: @rosinL 
Signed-off-by: @rosinL
2023-08-29 00:46:25 +00:00
liuqinfei
cfb16022e7 sync #187: add judgment for ceph-volume lvm activate
Signed-off-by: liuqinfei <lucas.liuqinfei@huawei.com>
2023-08-28 20:38:47 +08:00
openeuler-ci-bot
ced7c82b6f
!193 [sync] PR-192: 修复cephadm卸载过程中的异常信息打印
From: @openeuler-sync-bot 
Reviewed-by: @liuqinfei 
Signed-off-by: @liuqinfei
2023-06-13 03:35:51 +00:00
wangzengliang
05a81f1b4e fix bug when uninstall cephadm
(cherry picked from commit 27536915d13964db4a3e114bca478eb45a72f5fa)
2023-06-09 16:27:39 +08:00
openeuler-ci-bot
78ed25bbf1
!170 fix CVE-2022-3854
From: @wangzengliang1 
Reviewed-by: @liuqinfei 
Signed-off-by: @liuqinfei
2023-02-21 01:45:59 +00:00
wangzengliang1
c04327782a fix-CVE-2022-3854 2023-02-20 12:46:40 +08:00
openeuler-ci-bot
3b3b63bfc1
!165 修复cephadm卸载过程中的异常信息打印
From: @wangzengliang1 
Reviewed-by: @liuqinfei 
Signed-off-by: @liuqinfei
2023-02-20 03:25:04 +00:00
root
48afe92d49 fix error for uninstall cephadm 2023-02-15 14:27:32 +08:00
4 changed files with 147 additions and 3 deletions

View File

@ -0,0 +1,47 @@
From ed7c2d0a58fb87201777fb4097d5a2b650593b31 Mon Sep 17 00:00:00 2001
From: wangzengliang1 <wangzengliang1@huawei.com>
Date: Mon, 30 Jan 2023 09:32:19 +0800
Subject: [PATCH] fix CVE-2022-3854
---
src/rgw/rgw_common.cc | 5 +++++
src/rgw/rgw_sal.h | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc
index b44d4bf..ce7b94c 100644
--- a/src/rgw/rgw_common.cc
+++ b/src/rgw/rgw_common.cc
@@ -1279,6 +1279,11 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct re
bool verify_bucket_permission(const DoutPrefixProvider* dpp, struct req_state * const s, const uint64_t op)
{
+ if (rgw::sal::RGWBucket::empty(s->bucket)) {
+ // request is missing a bucket name
+ return false;
+ }
+
perm_state_from_req_state ps(s);
return verify_bucket_permission(dpp,
diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h
index 41da8bc..197f975 100644
--- a/src/rgw/rgw_sal.h
+++ b/src/rgw/rgw_sal.h
@@ -279,8 +279,12 @@ class RGWBucket {
void convert(cls_user_bucket_entry *b) const {
ent.convert(b);
}
+
+ /** Check if a Bucket pointer is empty */
+ static bool empty(const RGWBucket* b) { return (!b || b->empty()); }
+ /** Check if a Bucket unique pointer is empty */
+ static bool empty(const std::unique_ptr<RGWBucket>& b) { return (!b || b->empty()); }
- static bool empty(RGWBucket* b) { return (!b || b->empty()); }
virtual std::unique_ptr<RGWBucket> clone() = 0;
/* dang - This is temporary, until the API is completed */
--
2.13.0.windows.1

View File

@ -0,0 +1,28 @@
From 835de4cfbf8b656c03852a198d5546b11575bceb Mon Sep 17 00:00:00 2001
From: yangxiaoliang <yangxiaoliang07@163.com>
Date: Wed, 7 Sep 2022 07:47:00 +0000
Subject: [PATCH] ceph-volume: add judgment for ceph-volume lvm activate If
only osd_fsid is given, needed `ceph-volume lvm activate "" {osd_fsid}` now
we just need ceph-volume lvm activate {osd_fsid} Signed-off-by: Xiaoliang
Yang <yangxiaoliang07@163.com>
---
src/ceph-volume/ceph_volume/devices/lvm/activate.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py
index 70fceeab645..3539e297d57 100644
--- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py
+++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py
@@ -364,6 +364,8 @@ class Activate(object):
if len(self.argv) == 0:
print(sub_command_help)
return
+ if not self.argv[0].isdigit() and self.argv[0]:
+ self.argv.insert(0, "")
args = parser.parse_args(self.argv)
# Default to bluestore here since defaulting it in add_argument may
# cause both to be True
--
2.33.0

View File

@ -0,0 +1,51 @@
From 64803e1ced57d64b758927c3977bb4a4d1769180 Mon Sep 17 00:00:00 2001
From: Joshua Baergen <jbaergen@digitalocean.com>
Date: Tue, 12 Sep 2023 14:05:01 -0400
Subject: [PATCH] rgw: Add missing empty checks to the split string in
is_string_in_set().
In certain cases, where a user misconfigures a CORS rule, the entirety
of the string can be token characters (or, at least, the string before
and after a given token is all token characters), but != "*". If the
misconfigured string includes "*" we'll try to split the string and we
assume that we can pop the list of string elements when "*" isn't
first/last, but get_str_list() won't return anything for token-only
substrings and thus 'ssplit' will have fewer elements than would be
expected for a correct rule. In the case of an empty list, front() has
undefined behaviour; in our experience, it often results in a huge
allocation attempt because the code tries to copy the string into a
local variable 'sl'.
An example of this misconfiguration (and thus a reproduction case) is
configuring an origin of " *".
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
---
src/rgw/rgw_cors.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/rgw/rgw_cors.cc b/src/rgw/rgw_cors.cc
index e41abf8ccb..bb80e2b58d 100644
--- a/src/rgw/rgw_cors.cc
+++ b/src/rgw/rgw_cors.cc
@@ -95,6 +95,8 @@ static bool is_string_in_set(set<string>& s, string h) {
get_str_list((*it), "* \t", ssplit);
if (off != 0) {
+ if (ssplit.empty())
+ continue;
string sl = ssplit.front();
flen = sl.length();
dout(10) << "Finding " << sl << ", in " << h << ", at offset 0" << dendl;
@@ -103,6 +105,8 @@ static bool is_string_in_set(set<string>& s, string h) {
ssplit.pop_front();
}
if (off != ((*it).length() - 1)) {
+ if (ssplit.empty())
+ continue;
string sl = ssplit.front();
dout(10) << "Finding " << sl << ", in " << h
<< ", at offset not less than " << flen << dendl;
--
2.15.0

View File

@ -125,7 +125,7 @@
#################################################################################
Name: ceph
Version: 16.2.7
Release: 14
Release: 20
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
Epoch: 2
%endif
@ -156,6 +156,9 @@ Patch10: 0010-fix-CVE-2022-3650.patch
Patch11: 0011-fix-no-module-named-v1_event-for-mgr-k8sevent.patch
Patch12: 0012-add-missing-includes-when-compiling-with-boost-1.75.patch
Patch13: 0013-add-atomic-library-for-loongarch64.patch
Patch14: 0014-fix-CVE-2022-3854.patch
Patch15: 0015-ceph-volume-add-judgment-for-ceph-volume-lvm-activat.patch
Patch16: 0016-fix-CVE-2023-46159.patch
%if 0%{?suse_version}
# _insert_obs_source_lines_here
ExclusiveArch: x86_64 aarch64 ppc64le s390x
@ -1557,8 +1560,7 @@ exit 0
%if ! 0%{?suse_version}
%postun -n cephadm
userdel -r cephadm || true
exit 0
[ $1 -ne 0 ] || userdel cephadm || :
%endif
%files -n cephadm
@ -2501,6 +2503,22 @@ exit 0
%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
%changelog
* Fri Mar 22 2024 lizhipeng <qiuxinyidian@gmail.com> - 2:16.2.7-20
- fix CVE-2023-46159
* Mon Aug 28 2023 liuqinfei <lucas.liuqinfei@huawei.com> - 2:16.2.7-19
- add judgment for ceph-volume lvm activate
- sync from #PR 187
* Thu Jun 1 2023 wangzengliang <wangzengliang2@huawei.com> - 2:16.2.7-17
- fix error for uninstall cephadm
* Mon Feb 20 2023 wangzengliang<wangzengliang2@huawei.com> - 2:16.2.7-16
- fix CVE-2022-3854
* Tue Feb 14 2023 wangzengliang<wangzengliang2@huawei.com> - 2:16.2.7-15
- fix error for uninstall cephadm
* Thu Jan 12 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 2:16.2.7-14
- add loongarch support for ceph