]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
sestore/omap_manager/btree: prevent heap buffer overflow in log 68701/head
authorShraddha Agrawal <shraddha.agrawal000@gmail.com>
Wed, 29 Apr 2026 15:59:07 +0000 (21:29 +0530)
committerShraddha Agrawal <shraddha.agrawal000@gmail.com>
Thu, 30 Apr 2026 17:35:50 +0000 (23:05 +0530)
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 <shraddha.agrawal000@gmail.com>
src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc

index 3c9c77466868d6e7d0d02ca9bd2c71b9aa1af448..25687373f69f014e43cda00e0dc6ba93228c4819 100644 (file)
@@ -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();
   }