Created from a Codex audit of grovedb. No code changes were made as part of the audit.
Summary
ChunkOp::decode maps every byte other than 1 to false for traversal bits.
Impact / failure scenario
Bytes like 2 or 255 are accepted and canonicalized, unlike other traversal decoders that reject non-binary values.
References
merk/src/proofs/chunk/chunk_op.rs:101
merk/src/proofs/chunk/chunk_op.rs:179
merk/src/proofs/chunk/util.rs:327
Suggested fix
Decode traversal bytes with an explicit 0/1 match and reject all other values.
Suggested tests
Update the existing malformed chunk-op test to expect an error for non-binary bytes.
Created from a Codex audit of grovedb. No code changes were made as part of the audit.
Summary
ChunkOp::decodemaps every byte other than1tofalsefor traversal bits.Impact / failure scenario
Bytes like
2or255are accepted and canonicalized, unlike other traversal decoders that reject non-binary values.References
merk/src/proofs/chunk/chunk_op.rs:101merk/src/proofs/chunk/chunk_op.rs:179merk/src/proofs/chunk/util.rs:327Suggested fix
Decode traversal bytes with an explicit
0/1match and reject all other values.Suggested tests
Update the existing malformed chunk-op test to expect an error for non-binary bytes.