Skip to content

tentacle: rgw: Check if HTTP_X_AMZ_COPY_SOURCE header is empty - #66027

Merged
batrick merged 1 commit into
ceph:tentaclefrom
cbodley:wip-73607-tentacle
Apr 24, 2026
Merged

batrick merged 1 commit into
ceph:tentaclefrom
cbodley:wip-73607-tentacle

Conversation

@cbodley

@cbodley cbodley commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

The issue was that the `HTTP_X_AMZ_COPY_SOURCE` header could be present but empty (i.e., an empty string rather than NULL). The  code only checked if the pointer was not NULL, but didn't verify that the string had content. When an empty string was passed to RGWCopyObj::parse_copy_location(), it would eventually try to access name_str[0] on an empty string, causing a crash.

Fixes: https://tracker.ceph.com/issues/72669

Signed-off-by: Suyash Dongre <[email protected]>
(cherry picked from commit bef59f1)
@cbodley
cbodley requested a review from a team as a code owner October 22, 2025 12:48
@cbodley cbodley added this to the tentacle milestone Oct 22, 2025
@cbodley cbodley added the rgw label Oct 22, 2025
@occamist

Copy link
Copy Markdown

I have a question around this? name_str could be full of whitespaces eg. " " during empty() check? any possibility to do boost::trim() before empty() check?

@adamemerson

Copy link
Copy Markdown
Contributor

Removing needs-qa until we have notifiaction/multisite fixes backported to tentacle.

@adamemerson

Copy link
Copy Markdown
Contributor

jenkins test make check

@cbodley

cbodley commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

we had a CVE for a very similar crash bug, i think this backport should be prioritized

@anrao19

anrao19 commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

FYI, pr testing is in progress...
Tracker created for same is : https://tracker.ceph.com/issues/76009

@anrao19

anrao19 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Pr testing completed and approved by @ivancich, More details in : https://tracker.ceph.com/issues/76009.
@cbodley , if no further testing needed we can merge this pr

@cbodley

cbodley commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test api

@batrick
batrick merged commit b4553f2 into ceph:tentacle Apr 24, 2026
@cbodley
cbodley deleted the wip-73607-tentacle branch April 24, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants