Project

General

Profile

Actions

Bug #78937

closed
RR RR

python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errors

Bug #78937: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errors

Added by Ramana Raja 4 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
squid,tentacle,umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-2532-gbc971c07c8
Released In:
Upkeep Timestamp:
2026-10-29T01:08:00+00:00

Description

Several pybind/rbd iterator classes retain the requested element count when a C API listing call fails. If an exception is raised, the corresponding cleanup C API is invoked with the stale count and may iterate over array elements that were never successfully initialized.

This is currently safe because the C APIs zero-initialize the allocated arrays with memset, causing the cleanup routines to encounter only NULL pointers for uninitialized entries. However, this behavior depends on an implementation detail of the C APIs and is not something the iterator cleanup logic should rely on.

The iterator should reset its element count when a listing operation fails so that the cleanup C API processes only successfully initialized elements.


Related issues 4 (0 open — 4 closed)

Related to rbd - Bug #78034: pybind/rbd: handle non-existent groups properly in list_snaps()ResolvedVinay Bhaskar Varada

Actions
Copied to rbd - Backport #79749: squid: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errorsResolvedIlya Dryomov

Actions
Copied to rbd - Backport #79750: umbrella: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errorsResolvedRamana Raja

Actions
Copied to rbd - Backport #79751: tentacle: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errorsResolvedRamana Raja

Actions

RR Updated by Ramana Raja 4 months ago Actions #1

  • Pull request ID set to 70755

RR Updated by Ramana Raja 4 months ago Actions #2

  • Status changed from In Progress to Fix Under Review

ID Updated by Ilya Dryomov 3 months ago Actions #3

  • Backport set to squid,tentacle,umbrella

ID Updated by Ilya Dryomov 3 months ago Actions #4

  • Related to Bug #78034: pybind/rbd: handle non-existent groups properly in list_snaps() added

UB Updated by Upkeep Bot 3 months ago Actions #5

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to bc971c07c87a2a8132f99fb816133b5e8fac82c5
  • Fixed In set to v21.3.0-2532-gbc971c07c8
  • Upkeep Timestamp set to 2026-08-23T17:45:35+00:00

UB Updated by Upkeep Bot 3 months ago Actions #6

  • Copied to Backport #79749: squid: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errors added

UB Updated by Upkeep Bot 3 months ago Actions #7

  • Copied to Backport #79750: umbrella: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errors added

UB Updated by Upkeep Bot 3 months ago Actions #8

  • Copied to Backport #79751: tentacle: python/rbd: Iterator cleanups relies on zero-initialized array elements after listing errors added

UB Updated by Upkeep Bot 3 months ago Actions #9

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #10

  • Status changed from Pending Backport to Backporting
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-08-23T17:45:35+00:00 to 2026-08-27T18:46:40+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #11

  • Status changed from Backporting to Resolved
  • Upkeep Timestamp changed from 2026-08-27T18:46:40+00:00 to 2026-10-29T01:08:00+00:00
Actions

Also available in: PDF Atom