]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: initialize createparams zone_placement to avoid garbage value
authorSeena Fallah <seenafallah@gmail.com>
Thu, 10 Oct 2024 20:55:44 +0000 (22:55 +0200)
committerSeena Fallah <seenafallah@gmail.com>
Thu, 20 Mar 2025 20:24:55 +0000 (21:24 +0100)
commitd37535ba3132a977116374282fbd561d0c6aaa2a
treeaf06ab30f77bef968b6eb358dde481a62a3c9f1e
parent526735e33be73bfec0664443b59d49021be097ea
rgw: initialize createparams zone_placement to avoid garbage value

When creating a bucket from a secondary zonegroup and forwarding
the request to the master zonegroup
(i.e., when `bucket_zonegroup != &my_zonegroup`), the
`createparams.zone_placement` may remain uninitialized. This can
lead to garbage values and result in a segmentation fault due to
invalid memory access.

By explicitly initializing `zone_placement` to `nullptr`, we can
eliminate this issue in cases where zone_placement is referenced
like `init_default_bucket_layout`.

Fixes: https://tracker.ceph.com/issues/68500
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit b92d14a0aa9d6d0701cc51edb29a44e14af01aef)
src/rgw/rgw_sal.h