When large data is sent to /v2/repository/models/<model_name>/load, the server converts the param_len variable from size_t to const int to pass it to base64_decode_block. This conversion can cause an integer overflow in base64_decode_block, leading to a server crash with a segmentation fault.
A similar issue occurs with /v2/cudasharedmemory/region/{}/register when large data is sent for the raw_handle parameter.
Checklist
[x] PR title reflects the change and is of format <commit_type>: <Title>
What does the PR do?
This PR addresses the following issue:
/v2/repository/models/<model_name>/load
, the server converts theparam_len
variable fromsize_t
toconst int
to pass it tobase64_decode_block
. This conversion can cause an integer overflow inbase64_decode_block
, leading to a server crash with a segmentation fault./v2/cudasharedmemory/region/{}/register
when large data is sent for theraw_handle
parameter.Checklist
<commit_type>: <Title>
Commit Type:
Check the conventional commit type box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
Test plan:
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)