]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/dedup: protects handle_notify processing of URGENT_MSG_RESTART against bad messages 70310/head
authorbenhanokh <gbenhano@redhat.com>
Sun, 19 Jul 2026 07:26:47 +0000 (10:26 +0300)
committerbenhanokh <gbenhano@redhat.com>
Sun, 19 Jul 2026 07:26:47 +0000 (10:26 +0300)
Tracker: https://ibm-ceph.atlassian.net/browse/IBMCEPH-16929

Signed-off-by: benhanokh <gbenhano@redhat.com>
src/rgw/driver/rados/rgw_dedup.cc

index d9551159a4876eb923c5808e0a239cc2bc6551bc..404fed1f1b474fd85dbdfb4c5a74bf5bb444d7f3 100644 (file)
@@ -3163,7 +3163,7 @@ namespace rgw::dedup {
     case URGENT_MSG_RESTART:
       if (!d_ctl.dedup_exec) {
         // Decode optional filter
-        {
+        try {
           bool has_filter = false;
           ceph::decode(has_filter, bl_iter);
           if (has_filter) {
@@ -3173,7 +3173,12 @@ namespace rgw::dedup {
           else {
             d_filter = dedup_filter_t{};
           }
+        } catch (buffer::error& err) {
+          ldpp_dout(dpp, 1) << __func__ << "::ERROR: bad URGENT_MSG_RESTART" << dendl;
+          cluster::ack_notify(store, dpp, &d_ctl, notify_id, cookie, -EINVAL);
+          return;
         }
+
         d_ctl.remote_restart_req = true;
         d_cond.notify_all();
       }