Skip to content

RPC GRAPH_COMPUTE Arbitrary RCE patch#20908

Merged
rgerganov merged 1 commit into
ggml-org:masterfrom
las7:fix/rpc-graph-compute-null-buffer
Mar 23, 2026
Merged

RPC GRAPH_COMPUTE Arbitrary RCE patch#20908
rgerganov merged 1 commit into
ggml-org:masterfrom
las7:fix/rpc-graph-compute-null-buffer

Conversation

@las7

@las7 las7 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

This fix prevents an existing RCE chain where deserialize_tensor() skips all validations when the incoming rpce_tensor.buffer field is set to null. Currently we only check if result==null, however this does not sufficiently cover the case for result->buffer. This prevents attackers from gaining arbitrary read and write.

@las7
las7 requested a review from a team as a code owner March 23, 2026 15:59
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Mar 23, 2026
@las7 las7 changed the title Fix for GHSA RPC GRAPH_COMPUTE Arbitrary RCE patch Mar 23, 2026

@rgerganov rgerganov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this check is sufficient because tensor views which are part of the compute graph are initialized by ggml_backend_view_init():

enum ggml_status ggml_backend_view_init(struct ggml_tensor * tensor) {
GGML_ASSERT(tensor);
GGML_ASSERT(tensor->buffer == NULL);
GGML_ASSERT(tensor->view_src != NULL);
GGML_ASSERT(tensor->view_src->buffer != NULL);
GGML_ASSERT(tensor->view_src->data != NULL);
tensor->buffer = tensor->view_src->buffer;
tensor->data = (char *)tensor->view_src->data + tensor->view_offs;
return ggml_backend_buffer_init_tensor(tensor->buffer, tensor);
}

so it's not possible to have a valid tensor with tensor->buffer == nullptr

@rgerganov
rgerganov merged commit 39bf0d3 into ggml-org:master Mar 23, 2026
47 of 48 checks passed
@las7
las7 deleted the fix/rpc-graph-compute-null-buffer branch March 23, 2026 17:57
@catap

catap commented Mar 29, 2026

Copy link
Copy Markdown

@ggerganov maybe make a new release of ggml with that fix?

Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
MrLordCat referenced this pull request in MrLordCat/llama.cpp-with-GUI Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants