Skip to content

test(fuzz): seed flist entry decode corpus (FCV-19.c)#4758

Merged
oferchen merged 1 commit into
masterfrom
test/fcv-19c-flist-seeds
May 23, 2026
Merged

test(fuzz): seed flist entry decode corpus (FCV-19.c)#4758
oferchen merged 1 commit into
masterfrom
test/fcv-19c-flist-seeds

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Add 24 hand-crafted libfuzzer seed files to fuzz/corpus/flist_entry_decode/ covering the recv_file_entry wire-format branch matrix.
  • Seeds bias the corpus toward conditional decoder paths on first iteration, so the fuzzer does not have to randomly rediscover XMIT flag, varint, and varlong boundaries before exploring deeper logic.
  • Each seed is a structurally valid byte sequence for the stateless read_file_entry helper, which the fuzz target exercises under both ProtocolVersion::V28 and V30.

Coverage matrix

Category Seed
Regular file (minimal flags + name) 01_regular_file_minimal
Directory with XMIT_TOP_DIR 02_directory_top_dir
Symlink entry 03_symlink_entry
Char/block device entries 04_device_char, 05_device_block
FIFO entry 06_fifo_entry
XMIT_LONG_NAME (300-byte name) 07_long_name_300b
XMIT_SAME_TIME (mtime inherited) 08_same_time_inherited
XMIT_SAME_MODE (mode inherited) 09_same_mode_inherited
XMIT_SAME_NAME (name prefix inherited) 10_same_name_prefix, 22_same_name_chain
INC_RECURSE parent_node_idx forward/backward refs 11_inc_recurse_parent_forward, 12_inc_recurse_parent_backward
Iconv-encoded UTF-8 multibyte name 13_iconv_utf8_multibyte
Nanosecond mtime (XMIT_MOD_NSEC, proto 32) 14_nsec_mtime_proto32
Truncation mid-name 15_truncation_mid_name
Truncation mid-mtime 16_truncation_mid_mtime
Malformed parent_node_idx (i32::MAX, CVE-2026-43620 territory) 17_malformed_parent_node_idx
Empty name (sender-invariant violation) 18_empty_name
Maximum-length name (4095 bytes) 19_max_length_name
Legacy protocol V28 with fixed 4-byte encoding 20_proto28_regular_file, 21_proto28_extended_flags
End-of-list marker 23_end_of_list_only
All XMIT_SAME_* flags after a primer 24_all_same_flags_after_primer

Test plan

  • CI fmt+clippy passes (no source changes; pure data files under fuzz/corpus/).
  • CI nextest passes on stable across Linux, macOS, Windows, and Linux musl.
  • Optional follow-up: run cargo +nightly fuzz run flist_entry_decode locally to confirm libfuzzer ingests every seed without panic.

@github-actions github-actions Bot added the test label May 22, 2026
@oferchen oferchen force-pushed the test/fcv-19c-flist-seeds branch from 3676a06 to b2c97e0 Compare May 22, 2026 21:17
@oferchen oferchen mentioned this pull request May 22, 2026
2 tasks
@oferchen oferchen force-pushed the test/fcv-19c-flist-seeds branch 5 times, most recently from 269e0c3 to 9c6c677 Compare May 22, 2026 22:40
Add 24 hand-crafted libfuzzer seeds for the flist_entry_decode target,
covering the recv_file_entry wire-format branch matrix: regular file,
directory with XMIT_TOP_DIR, symlink, char/block devices, FIFO,
XMIT_LONG_NAME (>254 bytes), XMIT_SAME_TIME/MODE/NAME inherited fields,
INC_RECURSE hardlink forward/backward references, UTF-8 multibyte
filenames, XMIT_MOD_NSEC (proto 32 nanosecond mtime), truncation
mid-name and mid-mtime, malformed parent_node_idx with i32::MAX value,
empty name (sender-invariant violation), maximum-length name (4095
bytes), and legacy protocol V28 entries with fixed 4-byte encoding.

Seeds are valid for the stateless read_file_entry helper that the
fuzzer exercises under both ProtocolVersion::V28 and V30, and bias
the in-process corpus toward the conditional branches that need
coverage on first iteration.
@oferchen oferchen force-pushed the test/fcv-19c-flist-seeds branch from 9c6c677 to 9a4db98 Compare May 22, 2026 23:10
@oferchen oferchen merged commit f24ef18 into master May 23, 2026
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant