Skip to content

RPC GRAPH_COMPUTE Arbitrary RCE patch#20908

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

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

Conversation

@las7
Copy link
Copy Markdown
Contributor

@las7 las7 commented Mar 23, 2026

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
Copy link
Copy Markdown
Member

@rgerganov rgerganov left a comment

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
Copy link
Copy Markdown

catap commented Mar 29, 2026

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

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