-
Notifications
You must be signed in to change notification settings - Fork 114
feat(ns): implement namespace updates, global cache purge #2883
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
feat(ns): implement namespace updates, global cache purge #2883
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
commit: |
@@ -174,18 +174,17 @@ fn bytes_to_i64_le(bytes: &[u8]) -> i64 { | |||
} | |||
|
|||
let mut padded = [0u8; 8]; | |||
let len = bytes.len().min(8); | |||
let len = bytes.len(); |
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.
Security Issue: Buffer Overflow Risk
There's a potential buffer overflow vulnerability in this change. The original code had a safety constraint with .min(8)
that limited the number of bytes copied to the size of the padded
array:
let len = bytes.len().min(8);
This constraint has been removed in the new code:
let len = bytes.len();
If bytes.len()
exceeds 8, the subsequent line padded[..len].copy_from_slice(&bytes[..len])
will attempt to copy more bytes than the padded
array can hold (which is fixed at 8 bytes), resulting in a buffer overflow. This would cause either a panic at runtime or memory corruption depending on the execution context.
The original .min(8)
constraint should be restored to maintain memory safety.
let len = bytes.len(); | |
let len = bytes.len().min(8); |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
} | ||
RunnerKind::Custom => { | ||
// Clear outbound data | ||
txs.delete_key_subspace(&rivet_types::keys::pegboard::ns::OutboundDesiredSlotsKey::subspace(namespace_id)); |
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.
When calling delete_key_subspace()
with OutboundDesiredSlotsKey::subspace(namespace_id)
, there's a potential issue with the subspace targeting. Please verify that this correctly deletes all keys under the namespace's outbound desired slots. The method creates a subspace for a specific namespace, but it's important to ensure the deletion logic properly targets all relevant keys to prevent data inconsistency or orphaned records. Consider adding a test case that confirms complete cleanup of these keys when switching from Outbound to Custom runner kind.
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
fc97845
to
e2ebdb7
Compare
3f420f5
to
c376b93
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
c376b93
to
8b5ef7d
Compare
e2ebdb7
to
008ff72
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
8b5ef7d
to
4976f94
Compare
008ff72
to
236f452
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
236f452
to
57c4d39
Compare
57c4d39
to
e328b2d
Compare
02c9438
to
21d608d
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
21d608d
to
02c9438
Compare
e328b2d
to
57c4d39
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
57c4d39
to
5ddcc85
Compare
02c9438
to
3df4e46
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
3df4e46
to
012075b
Compare
Claude encountered an error —— View job I'll analyze this and get back to you. |
No description provided.