Skip to content

umbrella: librbd: fix use-after-free in trash purge on image open error - #70429

Merged
batrick merged 1 commit into
ceph:umbrellafrom
idryomov:wip-77836-umbrella
Aug 4, 2026
Merged

batrick merged 1 commit into
ceph:umbrellafrom
idryomov:wip-77836-umbrella

Conversation

@idryomov

Copy link
Copy Markdown
Contributor

When ImageState::open() fails with an error other than -ENOENT, it
asynchronously deletes the ImageCtx before returning. The trash purge
loop only skipped the -ENOENT case and fell through on every other
error, dereferencing the already-freed ictx in diff_iterate() and
state->close(). Add the missing continue so a failed open is skipped.

The fall-through dates back to 504f4e7, which split `if (r < 0)
continue` to log non-ENOENT errors but dropped the continue.

Fixes: https://tracker.ceph.com/issues/77836
Signed-off-by: Sun Yuechi <[email protected]>
(cherry picked from commit f18247e)
@idryomov idryomov added this to the v21.1.1 milestone Jul 22, 2026
@idryomov
idryomov requested a review from a team as a code owner July 22, 2026 09:17
@github-actions github-actions Bot added rbd releng-audit-pass Release engineering: passed backport verification audit. labels Jul 22, 2026
@yuriw

yuriw commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri14-testing-20260722.150631-umbrella.

@batrick
batrick merged commit 4d62191 into ceph:umbrella Aug 4, 2026
9 of 10 checks passed
@idryomov
idryomov deleted the wip-77836-umbrella branch August 4, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-qa rbd releng-audit-pass Release engineering: passed backport verification audit. wip-yuri14-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants