fuzz: land the name_validation target (§3.3, wave 7)

This commit is contained in:
glm-5.3-flash committed 2026-10-10 22:08:23 +00:00
1 parent f7c1bd79b0
commit 5043f7bcd8
52 files changed
+465 -6

No files matched your search

+68
View File
@@ -245,9 +245,77 @@ def every_parse_seeds():
i += 1
def name_validation_seeds():
i = 0
# Plain-content names at the probed lengths: the empty↔one-char
# boundary, the pg-identifier (±1) and target-max_len (±1/±2)
# neighborhoods. No length cap is pinned; the seeds pin
# length-independence of the verdict class.
for length in [1, 2, 4, 62, 63, 64, 65, 4095, 4096]:
write_seed("name_validation", i, b"a" * length)
i += 1
# Empty and whitespace-only shapes (spaces, tab, newline, mixed,
# unicode whitespace) — InvalidName on both kinds.
for raw in [b"", b" ", b" ", b"\t", b"\n", b" \t\n ", b"\xc2\xa0", b"\xe2\x80\x83"]:
write_seed("name_validation", i, raw)
i += 1
# The reserved prefix: the boundary form (alone), suffixed, at a
# boundary length, and the one v1-reserved string.
for raw in [
b"__alkstore_",
b"__alkstore_x",
b"__alkstore_" + b"a" * 63,
b"__alkstore_listener_reconnected__",
]:
write_seed("name_validation", i, raw)
i += 1
# Prefix near-misses: casing deviations, the missing trailing
# underscore, embedded and whitespace-led forms — the pinned rule
# is byte-exact and leading-only, so these must accept.
for raw in [
b"__ALKSTORE_x",
b"__Alkstore_x",
b"__alkStore_x",
b"__alkstore",
b"x__alkstore_y",
b" __alkstore_x",
b"__alkstore_ ",
]:
write_seed("name_validation", i, raw)
i += 1
# Whitespace-only and reserved-prefixed at the pg-identifier
# neighborhood lengths (±1, ±2).
for length in [62, 63, 64, 65]:
write_seed("name_validation", i, b" " * length)
i += 1
write_seed("name_validation", i, b"__alkstore_" + b"a" * (length - len(b"__alkstore_")))
i += 1
# Unicode and control-char shapes, including invalid UTF-8 (lossy
# decode) and embedded NUL.
for raw in [
"é-😀-名前".encode(),
"\u00e9\u0301".encode(),
b"\x00\x01\x02",
b"a\x00b",
b"tab\tname",
b"\x7f",
b"\xc3\x28",
b"\xff\xfe",
]:
write_seed("name_validation", i, raw)
i += 1
def main():
payload_codec_seeds()
every_parse_seeds()
name_validation_seeds()
if __name__ == "__main__":