Skip to content

Bound and exactly consume external bincode payloads #1672

Closed

Description

@hmzakhalid

Audit reference: I28

What can go wrong

An external bincode payload could declare a huge collection or hide extra trailing bytes after an otherwise valid object.

When it happens

The decoder is used at network and persistence boundaries where payload length or contents may be corrupt or attacker-controlled.

What changed

Decoding now has byte and allocation limits, uses the expected fixed-integer format, and must consume the input exactly.

Why the change works

Forged lengths cannot trigger unbounded allocation, and ambiguous payloads with hidden suffixes are rejected.

Checks

Over-budget, forged-length, trailing-byte, and current-format tests pass.

Activity

  1. added
    bugSomething isn't working
    ciphernodeRelated to the ciphernode package
    securityRelevant to security
    on Jul 11, 2026
  2. hmzakhalid commented on Jul 13, 2026

    @hmzakhalid
    CollaboratorAuthor

    Fixed in d0f5f1dba2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingciphernodeRelated to the ciphernode packagesecurityRelevant to security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions