Repository navigation
Sec review - #1110
Merged
Merged
Sec review#1110
Conversation
…and read Remote 0x25 writes and 0x26 reads carry attacker-chosen component names whose bare segment joins components/<name> paths. Validate the name against a file-safe vocabulary before any filesystem join, so traversal names can no longer write, evaluate, or probe outside the project.
A 0x10 sync naming a fresh plane id allocated a plane registry entry per minted id while needing only the command's GRAPH_READ — unbounded memory growth from a read-only peer. Materialization now checks the context's grant: existing planes handshake as before, fresh ones need GRAPH_EDIT and answer PERMISSION_DENIED otherwise. getPlane no longer materializes as a lookup side effect.
A per-context capability mask was a cache that never invalidated: a DACAR revocation bit only the next link, while established links kept their grant for their lifetime. RuntimeServer now remembers each context's identity and refreshAuthorizations() re-resolves every mask (denying closed on policy failure) and re-sends the 0x02 response; noflo-nodejs calls it after a SIGHUP Dacar reload.
Plane epochs used a 31-bit string hash while the main plane uses SHA-256 content addressing. A collision made the runtime answer "up to date" to a client holding different state — silent mirror divergence. Both planes now share the same digest.
The dispatch loop checked capability requirements only when an entry existed, so a command code missing from the requirement map dispatched unchecked — a future command or extension handler would ship silently unguarded. The map is now the dispatch allowlist: no entry, no dispatch.
The driver-less 0x47 fallback inserted every injected packet as a graph IIP: broadcast to all clients as an INSERT_IIP op, epoch dirtied, and unbounded growth on runtimes used as remote subgraphs. The engine gains Network#sendBoundaryPacket — a transient boundary send with attach/ send/disconnect semantics — and the execution protocol uses it.
Wire UI_METADATA ops key by attacker-chosen strings; storing them with plain object assignment ran a __proto__ key through the prototype setter. Map storage keeps every key inert own data; graphMetadata() and the canonical serialization are unchanged for ordinary keys.
A client-minted ephemeral plane named "main" collided with the nil addressed main plane: subgraph plane ids (sg/main/...) and the execution protocol's per-plane stream keys use "main" as the nil stand-in. Minting a plane named main now answers 0x17 UNSUPPORTED.
Announce app_data crosses the trust boundary on every announce; the node name is now required to be a bounded non-empty string on encode and decode, so a hostile announce's arbitrary payload value cannot flow into client surfaces.
The grow-only schema table accepted unbounded 0x2a writes from a COMPONENT_WRITE peer. New project entries beyond the budget (default 1024, SchemaTable option maxProjectEntries) answer 0x17 LINK_SATURATED; digest mismatches answer 0x17 PAYLOAD_UNSUPPORTED instead of surfacing only as an error event.
The IIP JSON scanner recursed per nesting level over untrusted text and assigned keys straight into a plain object: a deep payload could exhaust the stack, and a __proto__ key ran through the prototype setter. Depth is capped at 128 (the MsgPack decoder's cap) and prototype-named keys are defined as own data properties.
evaluateModule wrote the source file before compiling and removed it only after success: a compile-time-throwing source left its residue in the project's components directory. rmSync now runs in a finally.
The core is transport-neutral: Reticulum bounds frames at the link MTU, but an embedder feeding handleFrame from a larger transport had no decode-side limit. Frames over maxFrameSize (default 1 MiB) are answered 0x17 MALFORMED without being decoded.
A subscriber with a long flush interval accumulated unbounded memory on a busy network: every event was buffered until the flush fired. Events past the per-subscription budget (default 4096) are dropped, and the next flush reports the drop as a synthetic 0x04 ERROR flowtrace event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.