From bf6e8a4a4db8b7d7101ca80b844ee953aa4580b2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 2 May 2019 11:30:09 -0500 Subject: [PATCH] osd/PrimaryLogPG: disallow ops on objects with an empty name These may conflict with pgmeta objects. And are going to cause other problems later (e.g., https://tracker.ceph.com/issues/38724). Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 3d6dfb9e6e3f..ff2527251b52 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -1858,6 +1858,11 @@ void PrimaryLogPG::do_op(OpRequestRef& op) osd->reply_op_error(op, -ENAMETOOLONG); return; } + if (m->get_hobj().oid.name.empty()) { + dout(4) << "do_op empty oid name is not allowed" << dendl; + osd->reply_op_error(op, -EINVAL); + return; + } if (int r = osd->store->validate_hobject_key(head)) { dout(4) << "do_op object " << head << " invalid for backing store: " -- 2.47.3