casey / casey/x-serialization-format

Cycle attack prevention

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

It is possible to manually encode a message that contains loops, such that traversal could cause a stack overflow.

However, when traversing a message and encountering offsets, the offsets will always be strictly increasing, because data is always encoded with pre-order traversal. If a decoder keeps a stack of offsets, pushing when following an offset and popping when returning, this attack can be detected.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.