Actions
Bug #77501
closed
YS
YS
librbd/cache/pwl: use-after-free of m_perfcounter when periodic_stats timer fires during shut_down()
Bug #77501:
librbd/cache/pwl: use-after-free of m_perfcounter when periodic_stats timer fires during shut_down()
Due date:
% Done:
0%
Source:
Development
Backport:
squid,tentacle,umbrella
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
rbd
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v21.3.0-297-g6b040893f2
Released In:
Upkeep Timestamp:
2026-08-27T18:35:35+00:00
Description
AbstractWriteLog::shut_down() calls perf_stop(), which deletes
m_perfcounter, but the 5s periodic_stats timer is only canceled later
in the destructor. If it fires in between, periodic_stats ->
update_image_cache_state dereferences the freed m_perfcounter. Cancel
the timer under m_timer_lock first, mirroring the destructor.
Hit on riscv64 (sg2044) running
TestMockCacheSSDWriteLog.compare_and_write_compare_failed, which
finishes well under the 5s timer interval. It is a race rather than
arch-specific, but reproduces reliably there.
ID Updated by Ilya Dryomov 6 months ago
- 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 6b040893f275a9aab03879de607864755c86227f
- Fixed In set to v21.3.0-297-g6b040893f2
- Upkeep Timestamp set to 2026-06-22T08:13:36+00:00
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #77557: tentacle: librbd/cache/pwl: use-after-free of m_perfcounter when periodic_stats timer fires during shut_down() added
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #77558: squid: librbd/cache/pwl: use-after-free of m_perfcounter when periodic_stats timer fires during shut_down() added
UB Updated by Upkeep Bot 5 months ago
- Copied to Backport #77559: umbrella: librbd/cache/pwl: use-after-free of m_perfcounter when periodic_stats timer fires during shut_down() added
UB Updated by Upkeep Bot 5 months ago
- Tags (freeform) set to backport_processed
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-22T08:13:36+00:00 to 2026-08-27T18:35:35+00:00
Actions