-
Notifications
You must be signed in to change notification settings - Fork 172
fix: MessageQueueShm head index boundary check #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
No unit test because triton-inference-server/server#8273 makes the exploitation impossible. |
@@ -54,105 +51,6 @@ using cudaStream_t = void*; | |||
|
|||
namespace triton { namespace backend { namespace python { | |||
|
|||
#define LOG_IF_EXCEPTION(X) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved log related code to new files to break circular dependency.
@@ -1569,138 +1570,6 @@ Stub::ProcessBLSResponseDecoupled(std::unique_ptr<IPCMessage>& ipc_message) | |||
} | |||
} | |||
|
|||
std::unique_ptr<Logger> Logger::log_instance_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved log related code to new files to break circular dependency.
@@ -0,0 +1,170 @@ | |||
// Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved log related code to new files to break circular dependency.
@@ -0,0 +1,134 @@ | |||
// Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved log related code to new files to break circular dependency.
This reverts commit 87f6f2a.
What does the PR do?
When attacker registers the same shm created by python backend, they can overwrite
MessageQueueShm::head
data with a very large index and inject malicious code to the memory space.Checklist
<commit_type>: <Title>
Commit Type:
Related PRs:
Where should the reviewer start?
The index boundary check is in src/message_queue.h
Test plan:
30975011
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)