From: Shraddha Agrawal Date: Wed, 29 Apr 2026 15:59:07 +0000 (+0530) Subject: sestore/omap_manager/btree: prevent heap buffer overflow in log X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad0d555a5ac3a89f1cf3d32eb35998370fdbfdc8;p=ceph.git sestore/omap_manager/btree: prevent heap buffer overflow in log This commit fixes a heap overflow in omap_btree_node_impl when logging the full bufferlist. This issue was already tracked in https://tracker.ceph.com/issues/71524. To prevent this from happening, we log the length of the bufferlist instead of the full log. Signed-off-by: Shraddha Agrawal --- diff --git a/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc b/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc index 3c9c77466868..25687373f69f 100644 --- a/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc +++ b/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc @@ -164,7 +164,7 @@ OMapInnerNode::insert( const ceph::bufferlist &value) { LOG_PREFIX(OMapInnerNode::insert); - DEBUGT("{}->{}, this: {}", oc.t, key, value, *this); + DEBUGT("{} -> 0x{:x} value, this: {}", oc.t, key, value.length(), *this); auto child_pt = get_containing_child(key); if (exceeds_max_kv_limit(key, value)) { return crimson::ct_error::value_too_large::make(); @@ -752,7 +752,7 @@ OMapLeafNode::insert( const ceph::bufferlist &value) { LOG_PREFIX(OMapLeafNode::insert); - DEBUGT("{} -> {}, this: {}", oc.t, key, value, *this); + DEBUGT("{} -> 0x{:x} value, this: {}", oc.t, key, value.length(), *this); if (exceeds_max_kv_limit(key, value)) { return crimson::ct_error::value_too_large::make(); }