From ad0d555a5ac3a89f1cf3d32eb35998370fdbfdc8 Mon Sep 17 00:00:00 2001 From: Shraddha Agrawal Date: Wed, 29 Apr 2026 21:29:07 +0530 Subject: [PATCH] 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 --- .../os/seastore/omap_manager/btree/omap_btree_node_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.47.3