Complete StructuredData parity and parser hardening (#37)

This commit is contained in:
2026-08-09 01:51:29 +00:00
parent 6d02db8a9a
commit d980692933
18 changed files with 438 additions and 7 deletions

View File

@@ -0,0 +1,4 @@
# JSON OSD malformed corpus
The normal Rust hardening suite feeds these parser-edge cases and deterministic
mutations of a valid all-variant JSON document to the bounded JSON adapter.

View File

@@ -0,0 +1,7 @@
empty:
trailing:[]x
unterminated_string:"x
unterminated_array:[1
unterminated_object:{"x":1
duplicate_property:{"x":1,"x":2}
non_finite_number:1e99999

View File

@@ -0,0 +1,5 @@
# Notation LLSD malformed corpus
Each line in `malformed.txt` has a seed name followed by the raw notation input.
The normal Rust hardening suite executes every seed and deterministic mutations
of a valid all-variant document under no-panic and resource-limit checks.

View File

@@ -0,0 +1,7 @@
empty:
unknown:?
unterminated_string:s(10)"x
missing_array_end:[i1
missing_map_value:{'key':
bad_base64:b64"***"
bad_date:d"not-a-date"

View File

@@ -0,0 +1,5 @@
# Protobuf OSD malformed corpus
Each named seed is hex-encoded. The normal Rust hardening suite checks every
seed and deterministic mutations of a valid all-variant wire document without
requiring an external fuzzing runtime.

View File

@@ -0,0 +1,8 @@
empty:
truncated_varint:80
zero_field:00
wrong_type_wire:0d00000000
oversized_length:2affffffff0f
truncated_fixed64:210000
unknown_group:0b
bad_uuid:0805320100

View File

@@ -3,4 +3,6 @@
These inputs exercise the XML LLSD parser's entity boundary. DTD declarations,
external entities, and undeclared named entities must be rejected without file
or network access and without entity expansion. The structured-data unit tests
load every fixture directly.
load every fixture directly. `malformed_nesting.xml` additionally covers
crossed container end tags, while `truncated_scalar.xml` guards against parser
loops when a scalar reaches end-of-input without a closing tag.

View File

@@ -0,0 +1 @@
<llsd><map><key>value</key><array><integer>1</map></array></llsd>

View File

@@ -0,0 +1 @@
<llsd><string>unterminated