projects
/
ceph.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aba4664
)
rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
author
Felix Hüttner
<felix.huettner@mail.schwarz>
Thu, 6 May 2021 16:18:00 +0000
(12:18 -0400)
committer
Bastien Roucariès
<rouca@debian.org>
Sat, 21 Oct 2023 16:42:26 +0000
(17:42 +0100)
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
7196a469b4470f3c8628489df9a41ec8b00a5610
)
Origin: upstream, https://github.com/ceph/ceph/commit/
f44a8ae8aa27ecef69528db9aec220f12492810e
Gbp-Pq: Name CVE-2021-3531.patch
src/rgw/rgw_rest_swift.cc
patch
|
blob
|
history
diff --git
a/src/rgw/rgw_rest_swift.cc
b/src/rgw/rgw_rest_swift.cc
index 35e192c150ed350736a819609118c362bd5ac6dc..98f10e68008e25795edca1e2f745d58f3ca1482c 100644
(file)
--- a/
src/rgw/rgw_rest_swift.cc
+++ b/
src/rgw/rgw_rest_swift.cc
@@
-2436,6
+2436,9
@@
bool RGWSwiftWebsiteHandler::is_web_dir() const
return false;
} else if (subdir_name.back() == '/') {
subdir_name.pop_back();
+ if (subdir_name.empty()) {
+ return false;
+ }
}
rgw_obj obj(s->bucket, std::move(subdir_name));