Actions
Bug #77836
closed
YS
YS
librbd: use-after-free in trash purge when image open fails with a non-ENOENT error
Bug #77836:
librbd: use-after-free in trash purge when image open fails with a non-ENOENT error
Due date:
% Done:
0%
Source:
Development
Backport:
squid,tentacle,umbrella
Regression:
Yes
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
rbd
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v21.3.0-606-g97128d4d3b
Released In:
Upkeep Timestamp:
2026-08-27T18:36:30+00:00
Description
When `ImageState::open()` fails with an error other than ENOENT, it>close()`. Add the missing `continue` so a failed open is skipped.
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
The fall-through dates back to 504f4e78, which split `if (r < 0)
continue` to log non-ENOENT errors but dropped the continue.
ID Updated by Ilya Dryomov 5 months ago
- Status changed from New to Fix Under Review
- Backport set to squid,tentacle,umbrella
UB Updated by Upkeep Bot 5 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to 97128d4d3b686687a24ad500e2d2097c2f132232
- Fixed In set to v21.3.0-606-g97128d4d3b
- Upkeep Timestamp set to 2026-06-30T19:36:16+00:00
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #77841: squid: librbd: use-after-free in trash purge when image open fails with a non-ENOENT error added
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #77842: umbrella: librbd: use-after-free in trash purge when image open fails with a non-ENOENT error added
ID Updated by Ilya Dryomov 5 months ago
- Project changed from Ceph to rbd
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #77843: tentacle: librbd: use-after-free in trash purge when image open fails with a non-ENOENT error added
UB Updated by Upkeep Bot 5 months ago
- Tags (freeform) set to backport_processed
ID Updated by Ilya Dryomov 5 months ago
- Assignee set to Yuechi Sun
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Resolved
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-06-30T19:36:16+00:00 to 2026-08-27T18:36:30+00:00
Actions