The callback object would create a local variable then save the address of the
local variable in the object which will later be referenced. This leads
to access stack memory that is no longer in scope,
possibly not even in the same thread.
Fixes: https://tracker.ceph.com/issues/72403
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
struct CB_ObjectOperation_decodevals {
uint64_t max_entries;
Vals* pattrs;
+ Vals ignore;
bool* ptruncated;
int* prval;
boost::system::error_code* pec;
if (pattrs)
decode(*pattrs, p);
if (ptruncated) {
- Vals ignore;
if (!pattrs) {
decode(ignore, p);
pattrs = &ignore;
struct CB_ObjectOperation_decodekeys {
uint64_t max_entries;
Keys* pattrs;
+ Keys ignore;
bool *ptruncated;
int *prval;
boost::system::error_code* pec;
if (pattrs)
decode(*pattrs, p);
if (ptruncated) {
- Keys ignore;
if (!pattrs) {
decode(ignore, p);
pattrs = &ignore;