From 39bf0d3c6a95803e0f41aaba069ffbee26721042 Mon Sep 17 00:00:00 2001 From: las7 <98077186+las7@users.noreply.github.com> Date: Mon, 23 Mar 2026 10:54:57 -0700 Subject: [PATCH] rpc : RCE patch (#20908) --- ggml/src/ggml-rpc/ggml-rpc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-rpc/ggml-rpc.cpp b/ggml/src/ggml-rpc/ggml-rpc.cpp index 5d8defad20..0ed2c0dce6 100644 --- a/ggml/src/ggml-rpc/ggml-rpc.cpp +++ b/ggml/src/ggml-rpc/ggml-rpc.cpp @@ -1443,7 +1443,9 @@ ggml_tensor * rpc_server::create_node(uint64_t id, const rpc_tensor * tensor = it_ptr->second; struct ggml_tensor * result = deserialize_tensor(ctx, tensor); - if (result == nullptr) { + if (result == nullptr || result->buffer == nullptr) { + GGML_LOG_ERROR("[%s] invalid tensor: null %s (id=%" PRIu64 ")\n", + __func__, result == nullptr ? "tensor" : "buffer", id); return nullptr; } tensor_map[id] = result;