Project

General

Profile

Actions

Bug #83314

open
NM NM

mgr/PyFormatterRO: cached get() results return mutable dicts

Bug #83314: mgr/PyFormatterRO: cached get() results return mutable dicts

Added by Nitzan Mordechai 15 days ago. Updated 15 days ago.

Status:
Fix Under Review
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

convert_dict_to_proxy() in src/mgr/PyFormatter.h builds a plain dict
(PyDict_New) and never wraps it with PyDictProxy_New(), so dicts returned
by MgrModule.get() for cached keys can still be changed. Every caller shares
the same cached object, so a change made by one module is seen by all the others.

Expected: get(mutable=False) returns read-only data.

Reported by @Ernesto Puerta

NM Updated by Nitzan Mordechai 15 days ago Actions #1

  • Backport set to umbrella

NM Updated by Nitzan Mordechai 15 days ago Actions #2

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 74054
Actions

Also available in: PDF Atom