P0: blocks the move
An appendix to the milestone.
P0: blocks the move
-
The manifest cannot stand alone. Finding:
license.workspace = trueand[lints] workspace = trueinherit a workspace the new repository does not have, socargo generate-lockfilefails in the staged tree. There is norust-version, nodescription, norepository, noreadme, nokeywords, nocategories. Thepublish = falsecomment sends the reader tocrates/publish-allowlist.txt, a file outside the repository.domain_name_resolution_contractis a path dependency with noversion, so the move cannot rewrite it to agitor crates.io line. The crate carries noLICENSE-MITorLICENSE-APACHE. Evidence:crates/capability_manifest_note/Cargo.tomllines 5, 6, 8, 9, 16; the dry run'sbuildandstandalonefailures (10 lines). Change: writelicense = "MIT OR Apache-2.0"and the lint table as literals, addrust-version,description(one sentence: the ELF note a program carries to ask for authority, and its decoder),repository,readme = "README.md",categories = ["no-std", "no-std::no-alloc", "parsing"],keywords. Give every dependency aversion. Copy the two license files. Replace thepublishcomment with one sentence a stranger can act on. The dependencies are the organization's own, approved in advance. Door: the license is one-way and already ruled for the organization's crates; the rest is two-way. Effort: S. -
There is no README. Finding: the dry run stages the scaffold's shape and fails on it. The module documentation is the only description, and it opens with a project-internal citation (item 5). Evidence:
crates/capability_manifest_note/holds noREADME.md; dry runreadme: FAIL. Change: a README in the scaffold's sections. It says what a manifest note is in one paragraph. It lists the three note types and the three descriptor versions as the module tables already give them. It shows how to carry one (carry!) and how to read one (find thePT_NOTEwith ownerOWNERand typeMANIFESTwith any ELF reader, thendecode,zones,service). It covers building and proving (cargo test,cargo kani, the three commands around a falsification patch) and the no_std and no-allocation facts. It states the refusal policy: the reader refuses a later version and does not skip it. Then record a stranger run indocs/stranger-test.md. Door: two-way. Effort: M. -
The encoders accept two manifests the decoder refuses. Finding: the crate makes three claims. The compiler builds a program's note from a constant.
encode*panics (a compile error) on whatdecoderefuses. A reader therefore never meets a note its own program could not have carried. Two holes, each probed: (a)encode_servicednever callsdomain_name_resolution_contract::is_canonical_zone. Its documentation says it panics on "a zone the resolver would not spell"; it does not.encode_serviced(&m, &["Example.NET"], true)andencode_serviced(&m, &["example.net."], false)both evaluate at compile time, anddecodeof each returnsErr(BadField(57)).encode_zonedhas the check (line 649) and panics on the same input. A zone longer than 255 bytes also writeszone.len() as u8silently truncated (line 932). The canonical check's 253-byte bound guardsencode_zoned;encode_servicedhas no such guard. (b)encodewritesMemoryGrantDeclaration::Required { minimum, maximum }without checkingminimum <= maximum;decode_memrefuses the result.encode(&Manifest { memory_grant: Required { minimum: 8, maximum: 4 }, ..NO_NOTE_MANIFEST })evaluates,Note::ofof it builds a 76-byte note, anddecodereturnsErr(BadField(8)).grant_planplaces no invariant on the pair (itsMemoryGrantDeclarationis a plain enum with two publicu64fields), so a program source can state it. Why it matters: a program built withcarry!from either manifest compiles, links and ships a note that the progenitor and the shell refuse at run time, with no diagnostic at build time. Nothing gains authority it should not have (the readers fail closed), so this is not a security finding. It is the crate's central guarantee failing in one direction, and the Kani proof covers only the other (decodethenencode). Evidence:src/lib.rslines 900 to 947 against 630 to 669 (is_canonical_zoneat 649 to 652 has no counterpart inencode_serviced); lines 298 to 302 against 496 to 499; the probe results above. Change: oneconst fnthat writes a zone block and checks each zone, shared byencode_zonedandencode_serviced, so the two cannot disagree again. Addassert!(minimum <= maximum, ...)inencodeand a test for each. Add a Kani harness in the encoding direction,any_manifestbuilt field by field withkani::anyunder the type's invariants (ShortOptions::try_new, a declared subtree letter, the slot). It assertsdecode(&encode(&m)) == Ok(m), and a falsification patch removes the newminimum <= maximumassertion. The harness is cheap:encodehas no data-dependent loops beyond 16 letters. Door: two-way (a stricter encoder refuses only what the reader already refused). Effort: S for the fixes, M with the harness.