eBPF-based security platform
treewide: renumber the format and schema versions to 1
Daniel Borkmannfb81c1f1b072
diff --git a/Documentation/concepts/background/oci.rst b/Documentation/concepts/background/oci.rstindex d9843b45..b95f771b 100644--- a/Documentation/concepts/background/oci.rst+++ b/Documentation/concepts/background/oci.rst@@ -133,9 +133,9 @@ manifest with shirudo's own media types:``application/vnd.shirudo.bpm.index.signature.v1``.* - Tree publication- ``<repository>:<reference>``, ``stable`` by default- - ``application/vnd.shirudo.upatch.tree.v2+json`` and its detached+ - ``application/vnd.shirudo.upatch.tree.v1+json`` and its detachedCMS signature,- ``application/vnd.shirudo.upatch.tree.signature.v2``.+ ``application/vnd.shirudo.upatch.tree.signature.v1``.* - Tree artifact- ``<repository>:upatch-<id>-<hex>``- One ``application/vnd.shirudo.upatch.v1`` layer, a signeddiff --git a/Documentation/reference/formats/bpm-formats.rst b/Documentation/reference/formats/bpm-formats.rstindex 0ff2c6a6..23796677 100644--- a/Documentation/reference/formats/bpm-formats.rst+++ b/Documentation/reference/formats/bpm-formats.rst@@ -310,14 +310,14 @@ Tree objects in the registry- At ``<repository>:<reference>``, ``stable`` unless``--reference`` names another tag. OCI image manifest,``schemaVersion`` 2, ``artifactType``- ``application/vnd.shirudo.upatch.tree.v2``, the empty config, and+ ``application/vnd.shirudo.upatch.tree.v1``, the empty config, andexactly one document layer and one signature layer.* - Document layer- The publication document, media type- ``application/vnd.shirudo.upatch.tree.v2+json``.+ ``application/vnd.shirudo.upatch.tree.v1+json``.* - Signature layer- Detached CMS signature over the document layer's bytes, media type- ``application/vnd.shirudo.upatch.tree.signature.v2``.+ ``application/vnd.shirudo.upatch.tree.signature.v1``.* - Artifact manifest- One per operation, tagged ``upatch-<id>-<payload16>``, where``<payload16>`` is the first 16 hex digits of the artifact's@@ -332,7 +332,7 @@ Publication document.. code-block:: text- {"schema": 2,+ {"schema": 1,"tree_id": "<tree-id>","generation": <n>,"parent_manifest_digest": "sha256:<hex>",@@ -347,7 +347,7 @@ Publication document* - Key- Value* - ``schema``- - ``2``. Required.+ - ``1``. Required.* - ``tree_id``- Non-empty. Required.* - ``generation``diff --git a/Documentation/reference/formats/eventlog.rst b/Documentation/reference/formats/eventlog.rstindex a9adf6d1..2c66149d 100644--- a/Documentation/reference/formats/eventlog.rst+++ b/Documentation/reference/formats/eventlog.rst@@ -69,7 +69,7 @@ Every record carries these fields:- Value* - ``schema``- integer- - ``2``+ - ``1``* - ``ts``- string- Time of the append, ISO 8601 UTC, for example@@ -314,7 +314,7 @@ The ``upatch_load`` record of that eventlog, one line:.. code-block:: json- {"schema":2,"ts":"2026-10-29T16:21:19Z","nv_index":"0x01818E00","alg":"sha256","digest":"d979b373d4e5c59775c06c3bee5fd868d9d033db5403b290b61b512d4a293597","type":"upatch_load","boot_id":"743acb26-a7ee-405d-b45a-600484470644","upatch":{"name":"shirudo-test-basic","payload_sha256":"8aee7072a1a15e4dddc93ad6b253a0e2e70ad6cdf767442aa8a1c1997bc3069f"}}+ {"schema":1,"ts":"2026-10-29T16:21:19Z","nv_index":"0x01818E00","alg":"sha256","digest":"d979b373d4e5c59775c06c3bee5fd868d9d033db5403b290b61b512d4a293597","type":"upatch_load","boot_id":"743acb26-a7ee-405d-b45a-600484470644","upatch":{"name":"shirudo-test-basic","payload_sha256":"8aee7072a1a15e4dddc93ad6b253a0e2e70ad6cdf767442aa8a1c1997bc3069f"}}Its ``init`` record, indented here, with the 768 hex digits of``nv_writer_public`` shortened:@@ -322,7 +322,7 @@ Its ``init`` record, indented here, with the 768 hex digits of.. code-block:: json{- "schema": 2,+ "schema": 1,"ts": "2026-10-29T16:17:38Z","nv_index": "0x01818E00","alg": "sha256",diff --git a/Documentation/reference/versions.rst b/Documentation/reference/versions.rstindex 9fb88a53..4ce85c3b 100644--- a/Documentation/reference/versions.rst+++ b/Documentation/reference/versions.rst@@ -143,7 +143,7 @@ target reads:- 1- The target refuses the index (``EINVAL``).* - Tree publication ``schema``- - 2+ - 1- The target refuses the publication (``EINVAL``).* - ``build-environment.json`` ``format_version``- 1@@ -162,7 +162,7 @@ Documents the target writes for operators, collectors and scripts:- Number- Reader on another value* - Eventlog record ``schema``- - 2+ - 1- Not checked by ``status``, ``init``, ``attest`` or ``attestverify``. See :doc:`/reference/formats/eventlog`.* - Evidence document ``schema``, with ``kind``diff --git a/Documentation/upatches/write/maps-arenas-serializers.rst b/Documentation/upatches/write/maps-arenas-serializers.rstindex 6d868013..dbb96b1d 100644--- a/Documentation/upatches/write/maps-arenas-serializers.rst+++ b/Documentation/upatches/write/maps-arenas-serializers.rst@@ -124,7 +124,7 @@ once per page:* - Context field- Meaning* - ``magic``, ``version``- - ``SHIRUDO_SERIAL_MAGIC`` and ``SHIRUDO_SERIAL_VERSION``, 3+ - ``SHIRUDO_SERIAL_MAGIC`` and ``SHIRUDO_SERIAL_VERSION``, 1* - ``flags``- ``SHIRUDO_SERIAL_CTX_F_PEEK`` when the reader asks for a peek* - ``max_chunks``diff --git a/bpf/lib/shirudo_serializer.h b/bpf/lib/shirudo_serializer.hindex 061a4622..e1ccfc04 100644--- a/bpf/lib/shirudo_serializer.h+++ b/bpf/lib/shirudo_serializer.h@@ -13,7 +13,7 @@#define SHIRUDO_SERIAL_MAP_NAME "shirudo_ser"#define SHIRUDO_SERIAL_MAGIC 0x5a4c5253u /* "SRLZ" le */-#define SHIRUDO_SERIAL_VERSION 3u+#define SHIRUDO_SERIAL_VERSION 1u#define SHIRUDO_SERIAL_MAP_NAME_MAX 16u#define SHIRUDO_SERIAL_MAX_CHUNKS 256u#define SHIRUDO_SERIAL_MAX_PAGES 256udiff --git a/builtin-bpm.c b/builtin-bpm.cindex b77965cf..18c6a4a1 100644--- a/builtin-bpm.c+++ b/builtin-bpm.c@@ -1892,7 +1892,7 @@ static int tree_measure_locked(const struct shirudo_tree_operation *op,hex_encode(chain, 32, chain_hex);e = (struct shirudo_json_emit){ .buf = line, .cap = sizeof(line) };json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");diff --git a/builtin-init.c b/builtin-init.cindex 2f988aee..64066428 100644--- a/builtin-init.c+++ b/builtin-init.c@@ -1067,7 +1067,7 @@ static int append_init_event(const struct shirudo_measured_upatch *set,hex_encode(info->writer_public, sizeof(info->writer_public), writer_hex);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");diff --git a/builtin-keys.c b/builtin-keys.cindex dd57c2c6..aa67c1a8 100644--- a/builtin-keys.c+++ b/builtin-keys.c@@ -693,7 +693,7 @@ static int append_key_event(const char *type, const char *fp_hex,hex_encode(event, 32, digest_hex);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");diff --git a/builtin-upatch.c b/builtin-upatch.cindex d87329d7..ac80d112 100644--- a/builtin-upatch.c+++ b/builtin-upatch.c@@ -2186,7 +2186,7 @@ static int format_upatch_event(const char *type, const char *name,hex_encode(event, 32, digest_hex);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");diff --git a/testing/end2end/priv_events.py b/testing/end2end/priv_events.pyindex 46b1e22e..e5c38d5c 100644--- a/testing/end2end/priv_events.py+++ b/testing/end2end/priv_events.py@@ -373,7 +373,7 @@ def records_from(path):with open(path, encoding="utf-8") as stream:documents = [json.loads(line) for line in stream]document = next(doc for doc in documents if doc.get("map") == "priv")- assert document["schema"] == 2, document+ assert document["schema"] == 1, documentassert document["upatch"] == "kernel-obs", documentassert document["interval"]["overflow"] == 0, documentassert document["interval"]["lost"] == 0, documentdiff --git a/testing/end2end/t9101-kernel-obs.sh b/testing/end2end/t9101-kernel-obs.shindex 6d4ace44..516f44f4 100755--- a/testing/end2end/t9101-kernel-obs.sh+++ b/testing/end2end/t9101-kernel-obs.sh@@ -63,7 +63,7 @@ assert {record["map"] for record in records} == expected, documentsassert len(metrics) == 1, documentsassert metrics[0][0]["name"] == "kernel_obs.watch_attempts", metricsfor record in records:- assert record["schema"] == 2, record+ assert record["schema"] == 1, recordassert record["upatch"] == "kernel-obs", recordassert isinstance(record["records"], list), recordinterval = record["interval"]diff --git a/testing/functional/bpm/t7005-bpm-publish.sh b/testing/functional/bpm/t7005-bpm-publish.shindex 0eba9afc..3b5bdcee 100644--- a/testing/functional/bpm/t7005-bpm-publish.sh+++ b/testing/functional/bpm/t7005-bpm-publish.sh@@ -129,7 +129,7 @@ for layer in manifest["layers"]:blob = (repo / "blobs" / layer["digest"]).read_bytes()assert len(blob) == layer["size"], layerkind = "sig" if layer["mediaType"].endswith(".signature.v1") or \- layer["mediaType"].endswith(".signature.v2") else "payload"+ layer["mediaType"].endswith(".signature.v1") else "payload"pathlib.Path(f"{out}.{kind}").write_bytes(blob)pathlib.Path(f"{out}.artifact_type").write_text(manifest["artifactType"])PY@@ -215,7 +215,7 @@ test_expect_success 'bpm tree append creates a signed first-generation publicatigrep -q "^oci://$REGISTRY/ns/tree:stable sha256:" "$WORK/append1.out" &&cp "$REG/ns/tree/manifests/stable" "$WORK/tree1.manifest" &&split_layers "$WORK/tree1.manifest" "$REG/ns/tree" "$WORK/tree1" &&- grep -qx "application/vnd.shirudo.upatch.tree.v2" "$WORK/tree1.artifact_type" &&+ grep -qx "application/vnd.shirudo.upatch.tree.v1" "$WORK/tree1.artifact_type" &&cms_verify "$WORK/tree1.sig" "$WORK/tree1.payload"'@@ -231,7 +231,7 @@ import hashlib, json, pathlib, syspub = json.loads(pathlib.Path(sys.argv[1]).read_bytes())repo, registry = pathlib.Path(sys.argv[2]), sys.argv[3]load = json.load(open(sys.argv[4]))-assert pub["schema"] == 2 and pub["tree_id"] == "t7005", pub+assert pub["schema"] == 1 and pub["tree_id"] == "t7005", pubassert pub["generation"] == 1 and "parent_manifest_digest" not in pub, pubassert pub["base"] == {"seq": 0} and pub["head"] == {"seq": 1}, pubassert len(pub["operations"]) == 1, pubdiff --git a/testing/fuzz/corpus/attest/evidence b/testing/fuzz/corpus/attest/evidenceindex e14581ab..c12f9e42 100644--- a/testing/fuzz/corpus/attest/evidence+++ b/testing/fuzz/corpus/attest/evidence@@ -1 +1 @@-{"schema":1,"kind":"shirudo-attestation","version_id":"3b0743b1a2ba3ca28bb640d2632097a3bb411e138a6a671907901c05a76cef3e","ts":"2026-10-21T14:44:33Z","boot_id":"00000000-0000-4000-8000-000000000000","nonce":"0102030405060708090a0b0c0d0e0f10","pcr_bank":"sha256","pcr_mask":64255,"pcrs":[{"index":0,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":1,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":2,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":3,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":4,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":5,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":6,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":7,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":9,"value":"d024042aaa82ea2411824f327cff3c37b182a8fe89e31d9cf4e0fe9309bbcae5"},{"index":11,"value":"75df9c8b17d8a6465f2862028b892ea13a3d7c37685a945e5ff34fb44956c207"},{"index":12,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":13,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":14,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":15,"value":"0000000000000000000000000000000000000000000000000000000000000000"}],"ak":{"public":"0023000b00050072000000100018000b000300100020f4814446961d6c97843a8709a72c03e32c4ecdd75c434deb7997e908a747b4bf00204fa5cd477afb7098c1f424f9ad295e15cede4fb684fa0a7f3f8d9a29ed2e9e98","name":"000bda4313313cdfb2a64e48331ec3f1665b1169fde82f3f00b1bd68feca1488c6c6"},"ek":{"type":"ecc","public":"0023000b000300b20020837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa0006008000430010000300100020dea243956330f8c6a03fe63b0206062c8470de74fbf01030863d6f6dca45de0e0020585613db4dbc0dfcece1a42acba56f95b84681adcd48fa0046c2269469dcacfe","name":"000b2bbed6090747c5e03c2e8f59ecc540117767166b7b898c22b33de7983f1ec61b"},"quote":{"attest":"ff54434780180022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f6700100102030405060708090a0b0c0d0e0f1000000000000000a3000000000000000001202401250012000000000001000b03fffa00002088246cc84d2266fa8e8c0b32edefe3637751172bbba4d1cf6b9772f9034ddc71","signature":"0018000b0020bd40d8957982f3cd2ad0902f7236dc5b9cc0eec55a70eaa0b7cdae84c446ae420020d0d2d0379cb5995bbcb3a38a0508af9ccc01d6d17c5366842b82e60e59e0a2d1"},"register":{"nv_index":"0x01818E00","pcr":9,"name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","value":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","attest":"ff54434780140022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f6700100102030405060708090a0b0c0d0e0f1000000000000000a400000000000000000120240125001200000022000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875000000202cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","signature":"0018000b00200c07fdee9477c53fd45f39b1c450864e646b009fab5b74b55a323d64e6351cae00204352873c699c0de3f9874389888d752b87a951b018af6d4bafd0dd4920e1b1ac"},"eventlog":[{"schema":2,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":0,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"d15b0e8e244e65c40f024e95773f2347ce4ef3ffe6b597c9a14b50bbab6df319","bound_in":"initrd","nv_name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor":"nvpcr-init:shirudo:0x1818e00:000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor_digest":"a21386a3edd0bf458acc400578c4e6e5b53345347955b0d9ca049ad2fe71f8a1","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"},{"schema":2,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"2861d031c6b6048cfdad0eaa39c16a3092e7518cb86e8a95a5345f63fb66e383","type":"upatch_load","boot_id":"00000000-0000-4000-8000-000000000000","upatch":{"name":"foo"},"chain":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5"}],"credential":null,"ek_certificate":null,"logs":{"firmware":null,"systemd":null}}+{"schema":1,"kind":"shirudo-attestation","version_id":"3b0743b1a2ba3ca28bb640d2632097a3bb411e138a6a671907901c05a76cef3e","ts":"2026-10-21T14:44:33Z","boot_id":"00000000-0000-4000-8000-000000000000","nonce":"0102030405060708090a0b0c0d0e0f10","pcr_bank":"sha256","pcr_mask":64255,"pcrs":[{"index":0,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":1,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":2,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":3,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":4,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":5,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":6,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":7,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":9,"value":"d024042aaa82ea2411824f327cff3c37b182a8fe89e31d9cf4e0fe9309bbcae5"},{"index":11,"value":"75df9c8b17d8a6465f2862028b892ea13a3d7c37685a945e5ff34fb44956c207"},{"index":12,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":13,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":14,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":15,"value":"0000000000000000000000000000000000000000000000000000000000000000"}],"ak":{"public":"0023000b00050072000000100018000b000300100020f4814446961d6c97843a8709a72c03e32c4ecdd75c434deb7997e908a747b4bf00204fa5cd477afb7098c1f424f9ad295e15cede4fb684fa0a7f3f8d9a29ed2e9e98","name":"000bda4313313cdfb2a64e48331ec3f1665b1169fde82f3f00b1bd68feca1488c6c6"},"ek":{"type":"ecc","public":"0023000b000300b20020837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa0006008000430010000300100020dea243956330f8c6a03fe63b0206062c8470de74fbf01030863d6f6dca45de0e0020585613db4dbc0dfcece1a42acba56f95b84681adcd48fa0046c2269469dcacfe","name":"000b2bbed6090747c5e03c2e8f59ecc540117767166b7b898c22b33de7983f1ec61b"},"quote":{"attest":"ff54434780180022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f6700100102030405060708090a0b0c0d0e0f1000000000000000a3000000000000000001202401250012000000000001000b03fffa00002088246cc84d2266fa8e8c0b32edefe3637751172bbba4d1cf6b9772f9034ddc71","signature":"0018000b0020bd40d8957982f3cd2ad0902f7236dc5b9cc0eec55a70eaa0b7cdae84c446ae420020d0d2d0379cb5995bbcb3a38a0508af9ccc01d6d17c5366842b82e60e59e0a2d1"},"register":{"nv_index":"0x01818E00","pcr":9,"name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","value":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","attest":"ff54434780140022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f6700100102030405060708090a0b0c0d0e0f1000000000000000a400000000000000000120240125001200000022000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875000000202cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","signature":"0018000b00200c07fdee9477c53fd45f39b1c450864e646b009fab5b74b55a323d64e6351cae00204352873c699c0de3f9874389888d752b87a951b018af6d4bafd0dd4920e1b1ac"},"eventlog":[{"schema":1,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":0,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"d15b0e8e244e65c40f024e95773f2347ce4ef3ffe6b597c9a14b50bbab6df319","bound_in":"initrd","nv_name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor":"nvpcr-init:shirudo:0x1818e00:000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor_digest":"a21386a3edd0bf458acc400578c4e6e5b53345347955b0d9ca049ad2fe71f8a1","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"},{"schema":1,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"2861d031c6b6048cfdad0eaa39c16a3092e7518cb86e8a95a5345f63fb66e383","type":"upatch_load","boot_id":"00000000-0000-4000-8000-000000000000","upatch":{"name":"foo"},"chain":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5"}],"credential":null,"ek_certificate":null,"logs":{"firmware":null,"systemd":null}}diff --git a/testing/fuzz/corpus/attest/evidence-rsa-credential b/testing/fuzz/corpus/attest/evidence-rsa-credentialindex c2842dba..7c6bfb76 100644--- a/testing/fuzz/corpus/attest/evidence-rsa-credential+++ b/testing/fuzz/corpus/attest/evidence-rsa-credential@@ -1 +1 @@-{"schema":1,"kind":"shirudo-attestation","version_id":"3b0743b1a2ba3ca28bb640d2632097a3bb411e138a6a671907901c05a76cef3e","ts":"2026-10-21T14:44:33Z","boot_id":"00000000-0000-4000-8000-000000000000","nonce":"1314","pcr_bank":"sha256","pcr_mask":64255,"pcrs":[{"index":0,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":1,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":2,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":3,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":4,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":5,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":6,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":7,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":9,"value":"d024042aaa82ea2411824f327cff3c37b182a8fe89e31d9cf4e0fe9309bbcae5"},{"index":11,"value":"75df9c8b17d8a6465f2862028b892ea13a3d7c37685a945e5ff34fb44956c207"},{"index":12,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":13,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":14,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":15,"value":"0000000000000000000000000000000000000000000000000000000000000000"}],"ak":{"public":"0023000b00050072000000100018000b000300100020f4814446961d6c97843a8709a72c03e32c4ecdd75c434deb7997e908a747b4bf00204fa5cd477afb7098c1f424f9ad295e15cede4fb684fa0a7f3f8d9a29ed2e9e98","name":"000bda4313313cdfb2a64e48331ec3f1665b1169fde82f3f00b1bd68feca1488c6c6"},"ek":{"type":"rsa","public":"0001000b000300b20020837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa00060080004300100800000000000100ca504c7f81e749b8e8a305e2e6bc9ad5b7c65a275f7e2b1a1342c600e02d40d08b725209ed2f726fb7a56b5259706fc9bab24889a44f9f09b120cbddd63584cae48dafa53ba10f0ca51af2e4c645aad3112476ae4ad7ec3a1f4582c1410d65685ddb0ea062ba35f900818e86440c24b790fc879c96843c6d88c9b3839a436475aa0d141ca8290c18bce98c43c70c34de3d3600254b9a88dc7607fba384a6d84df19d54d09417f71f1edf9358de989a82d708fc960d0b91b95306369fdac30013d4fdba80a433d041ae768de05591fe17ad4346c2a75017e9d3b213e648ec3118d96102b7a31f7b659ae10ccc6975c4ec0ad8b8aa8c69c2080c6d4a2fff658d43","name":"000b0fe9066ac06b03c4f021bcec2bcda87213dcb97786eb65eb911deb59bc4a4182"},"quote":{"attest":"ff54434780180022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f670002131400000000000001c1000000000000000001202401250012000000000001000b03fffa00002088246cc84d2266fa8e8c0b32edefe3637751172bbba4d1cf6b9772f9034ddc71","signature":"0018000b0020d7046a16bfbf421c3f9542233abadd139a206480b9b57cea772a151e4267ef1f0020468d92ec06c61540e26c9a0c5302f03aa1c8fb637e774ba678d7aa2dca2b4be6"},"register":{"nv_index":"0x01818E00","pcr":9,"name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","value":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","attest":"ff54434780140022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f670002131400000000000001c200000000000000000120240125001200000022000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875000000202cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","signature":"0018000b0020327b097fd94f80f8079c73a2f761f5179dcb2a6db72c4594aeed2fbe709880820020918d04bf1ce1887f16c40df331c0eecc04c728e38cd74054d18593c1c4ce6b0e"},"eventlog":[{"schema":2,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":0,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"d15b0e8e244e65c40f024e95773f2347ce4ef3ffe6b597c9a14b50bbab6df319","bound_in":"initrd","nv_name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor":"nvpcr-init:shirudo:0x1818e00:000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor_digest":"a21386a3edd0bf458acc400578c4e6e5b53345347955b0d9ca049ad2fe71f8a1","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"},{"schema":2,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"2861d031c6b6048cfdad0eaa39c16a3092e7518cb86e8a95a5345f63fb66e383","type":"upatch_load","boot_id":"00000000-0000-4000-8000-000000000000","upatch":{"name":"foo"},"chain":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5"}],"credential":{"value":"3cf422ea3adee511d1dd0e87da99229788cf32aee8796a66ab747006cf059226"},"ek_certificate":null,"logs":{"firmware":null,"systemd":null}}+{"schema":1,"kind":"shirudo-attestation","version_id":"3b0743b1a2ba3ca28bb640d2632097a3bb411e138a6a671907901c05a76cef3e","ts":"2026-10-21T14:44:33Z","boot_id":"00000000-0000-4000-8000-000000000000","nonce":"1314","pcr_bank":"sha256","pcr_mask":64255,"pcrs":[{"index":0,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":1,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":2,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":3,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":4,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":5,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":6,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":7,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":9,"value":"d024042aaa82ea2411824f327cff3c37b182a8fe89e31d9cf4e0fe9309bbcae5"},{"index":11,"value":"75df9c8b17d8a6465f2862028b892ea13a3d7c37685a945e5ff34fb44956c207"},{"index":12,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":13,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":14,"value":"0000000000000000000000000000000000000000000000000000000000000000"},{"index":15,"value":"0000000000000000000000000000000000000000000000000000000000000000"}],"ak":{"public":"0023000b00050072000000100018000b000300100020f4814446961d6c97843a8709a72c03e32c4ecdd75c434deb7997e908a747b4bf00204fa5cd477afb7098c1f424f9ad295e15cede4fb684fa0a7f3f8d9a29ed2e9e98","name":"000bda4313313cdfb2a64e48331ec3f1665b1169fde82f3f00b1bd68feca1488c6c6"},"ek":{"type":"rsa","public":"0001000b000300b20020837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa00060080004300100800000000000100ca504c7f81e749b8e8a305e2e6bc9ad5b7c65a275f7e2b1a1342c600e02d40d08b725209ed2f726fb7a56b5259706fc9bab24889a44f9f09b120cbddd63584cae48dafa53ba10f0ca51af2e4c645aad3112476ae4ad7ec3a1f4582c1410d65685ddb0ea062ba35f900818e86440c24b790fc879c96843c6d88c9b3839a436475aa0d141ca8290c18bce98c43c70c34de3d3600254b9a88dc7607fba384a6d84df19d54d09417f71f1edf9358de989a82d708fc960d0b91b95306369fdac30013d4fdba80a433d041ae768de05591fe17ad4346c2a75017e9d3b213e648ec3118d96102b7a31f7b659ae10ccc6975c4ec0ad8b8aa8c69c2080c6d4a2fff658d43","name":"000b0fe9066ac06b03c4f021bcec2bcda87213dcb97786eb65eb911deb59bc4a4182"},"quote":{"attest":"ff54434780180022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f670002131400000000000001c1000000000000000001202401250012000000000001000b03fffa00002088246cc84d2266fa8e8c0b32edefe3637751172bbba4d1cf6b9772f9034ddc71","signature":"0018000b0020d7046a16bfbf421c3f9542233abadd139a206480b9b57cea772a151e4267ef1f0020468d92ec06c61540e26c9a0c5302f03aa1c8fb637e774ba678d7aa2dca2b4be6"},"register":{"nv_index":"0x01818E00","pcr":9,"name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","value":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","attest":"ff54434780140022000bdf1571db5f97acadd2786c4f292ca401be0e58aefaf8ce881e3c63e49bcc9f670002131400000000000001c200000000000000000120240125001200000022000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875000000202cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5","signature":"0018000b0020327b097fd94f80f8079c73a2f761f5179dcb2a6db72c4594aeed2fbe709880820020918d04bf1ce1887f16c40df331c0eecc04c728e38cd74054d18593c1c4ce6b0e"},"eventlog":[{"schema":1,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":0,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"d15b0e8e244e65c40f024e95773f2347ce4ef3ffe6b597c9a14b50bbab6df319","bound_in":"initrd","nv_name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor":"nvpcr-init:shirudo:0x1818e00:000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor_digest":"a21386a3edd0bf458acc400578c4e6e5b53345347955b0d9ca049ad2fe71f8a1","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"},{"schema":1,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"2861d031c6b6048cfdad0eaa39c16a3092e7518cb86e8a95a5345f63fb66e383","type":"upatch_load","boot_id":"00000000-0000-4000-8000-000000000000","upatch":{"name":"foo"},"chain":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5"}],"credential":{"value":"3cf422ea3adee511d1dd0e87da99229788cf32aee8796a66ab747006cf059226"},"ek_certificate":null,"logs":{"firmware":null,"systemd":null}}diff --git a/testing/fuzz/corpus/eventlog/init-and-loads b/testing/fuzz/corpus/eventlog/init-and-loadsindex 75bf1fdd..119ba35f 100644--- a/testing/fuzz/corpus/eventlog/init-and-loads+++ b/testing/fuzz/corpus/eventlog/init-and-loads@@ -1,3 +1,3 @@-{"schema":2,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":0,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"d15b0e8e244e65c40f024e95773f2347ce4ef3ffe6b597c9a14b50bbab6df319","bound_in":"initrd","nv_name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor":"nvpcr-init:shirudo:0x1818e00:000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor_digest":"a21386a3edd0bf458acc400578c4e6e5b53345347955b0d9ca049ad2fe71f8a1","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"}-{"schema":2,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"2861d031c6b6048cfdad0eaa39c16a3092e7518cb86e8a95a5345f63fb66e383","type":"upatch_load","boot_id":"00000000-0000-4000-8000-000000000000","upatch":{"name":"foo"},"chain":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5"}-{"schema":2,"ts":"2026-10-21T14:44:33Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":1,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"0000000000000000000000000000000000000000000000000000000000000000","bound_in":"root","nv_name":"000b49560ef5b34bc607a5a9c8cd57a29234b691a4caa60d3a55f0b7a59557c466db","anchor":"nvpcr-init:shirudo:0x1818e00:000b49560ef5b34bc607a5a9c8cd57a29234b691a4caa60d3a55f0b7a59557c466db","anchor_digest":"734e24e9a603eec70df616ab5caa78f4db2f8f7351fb585b3f6515c82a72fb8c","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"}+{"schema":1,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":0,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"d15b0e8e244e65c40f024e95773f2347ce4ef3ffe6b597c9a14b50bbab6df319","bound_in":"initrd","nv_name":"000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor":"nvpcr-init:shirudo:0x1818e00:000b4801e0c99e669864c814bf739f09965d2e4330d6f834c4c9b18a676b337df875","anchor_digest":"a21386a3edd0bf458acc400578c4e6e5b53345347955b0d9ca049ad2fe71f8a1","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"}+{"schema":1,"ts":"2026-10-21T14:44:32Z","nv_index":"0x01818E00","alg":"sha256","digest":"2861d031c6b6048cfdad0eaa39c16a3092e7518cb86e8a95a5345f63fb66e383","type":"upatch_load","boot_id":"00000000-0000-4000-8000-000000000000","upatch":{"name":"foo"},"chain":"2cf9675aeaf6a85624d46cb74e769c0c599381c59e852e662cf8f11b112e4ff5"}+{"schema":1,"ts":"2026-10-21T14:44:33Z","nv_index":"0x01818E00","alg":"sha256","digest":"ca9f0c66cc9654321c7969fd2b040cea422c4d7235df4c4abf4322b51af27175","type":"init","boot_id":"00000000-0000-4000-8000-000000000000","tpm_reset_count":1,"pcr":9,"pcr_before":"0000000000000000000000000000000000000000000000000000000000000000","phase_pcr":11,"phase_before":"0000000000000000000000000000000000000000000000000000000000000000","bound_in":"root","nv_name":"000b49560ef5b34bc607a5a9c8cd57a29234b691a4caa60d3a55f0b7a59557c466db","anchor":"nvpcr-init:shirudo:0x1818e00:000b49560ef5b34bc607a5a9c8cd57a29234b691a4caa60d3a55f0b7a59557c466db","anchor_digest":"734e24e9a603eec70df616ab5caa78f4db2f8f7351fb585b3f6515c82a72fb8c","chain":"c648942d3661a0f5c9295835db07aa68f21cccb7a25b2b354a9cf5fa86129f3d"}diff --git a/testing/fuzz/corpus/oci-manifest/tree b/testing/fuzz/corpus/oci-manifest/treeindex d98d0217..2ebe7e8a 100644--- a/testing/fuzz/corpus/oci-manifest/tree+++ b/testing/fuzz/corpus/oci-manifest/tree@@ -1 +1 @@-{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","artifactType":"application/vnd.shirudo.upatch.tree.v2","config":{"mediaType":"application/vnd.oci.empty.v1+json","digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","size":2},"layers":[{"mediaType":"application/vnd.shirudo.upatch.tree.v2+json","digest":"sha256:5c42dbdd9ab41d9e039b890284f7c51a88c11b436fe37998178f83774ebc0600","size":1662},{"mediaType":"application/vnd.shirudo.upatch.tree.signature.v2","digest":"sha256:0b2c5f50178ab64a58b6640f8f4c41544faf0821f25a8e2a47ac4607b1f63190","size":4853}]}\ No newline at end of file+{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","artifactType":"application/vnd.shirudo.upatch.tree.v1","config":{"mediaType":"application/vnd.oci.empty.v1+json","digest":"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a","size":2},"layers":[{"mediaType":"application/vnd.shirudo.upatch.tree.v1+json","digest":"sha256:5c42dbdd9ab41d9e039b890284f7c51a88c11b436fe37998178f83774ebc0600","size":1662},{"mediaType":"application/vnd.shirudo.upatch.tree.signature.v1","digest":"sha256:0b2c5f50178ab64a58b6640f8f4c41544faf0821f25a8e2a47ac4607b1f63190","size":4853}]}\ No newline at end of filediff --git a/testing/fuzz/corpus/tree/nonzero-at-end b/testing/fuzz/corpus/tree/nonzero-at-endindex 17abfd53..94ce7b6f 100644--- a/testing/fuzz/corpus/tree/nonzero-at-end+++ b/testing/fuzz/corpus/tree/nonzero-at-end@@ -1 +1 @@-{"schema":2\ No newline at end of file+{"schema":1\ No newline at end of filediff --git a/testing/fuzz/corpus/tree/three-operations b/testing/fuzz/corpus/tree/three-operationsindex 61902b18..2c57325e 100644--- a/testing/fuzz/corpus/tree/three-operations+++ b/testing/fuzz/corpus/tree/three-operations@@ -1 +1 @@-{"schema":2,"tree_id":"t","generation":3,"parent_manifest_digest":"sha256:d1a131e345e29aa6c2e01cb7edb6e8797804d87a0140f7372e9a0ca93fa62320","base":{"seq":0},"operations":[{"seq":1,"op":"add","id":"t","selector":{"architecture":["s390x"]},"artifact":{"repository":"oci://127.0.0.1:5532/ns/tree","manifest_digest":"sha256:cac08beec0a2d3554112aae593c63dfadda4e9192793351cf07f39c7f6706df4","layer_digest":"sha256:f8712d5eab7c627741d2b229c520156859e764641205d07a78a598a72a147c13","payload_sha256":"sha256:c5073b25dfb8f6b4136f62b9aa8e874bd9a38cbf8ce964a0a55cc86eee11a41f"},"operation_digest":"sha256:a33ee3eae67efc9098443c491a70df4711e70f4cc8a7da5691a99be39d1faf76"},{"seq":2,"op":"delete","id":"t","selector":{"architecture":["s390x"]},"artifact":{"repository":"oci://127.0.0.1:5532/ns/tree","manifest_digest":"sha256:b2b47fc759de49231fc9d9778cc42be4d6fbf5a12393bbb2fd62f75dcdd07066","layer_digest":"sha256:68d80fc35958ebbff8b82bbbbbf58dff8bc416b2a3e194ac0191499cf90bb14c","payload_sha256":"sha256:6d30cc3bd7b43b3ea26375e14353601f6d679c3b73d8434e76c83e5e8ac7ee99"},"operation_digest":"sha256:d9e8cb4347a5e43ace9b901a6ba8f068d8a306b31224a9a889e5c34e939101be"},{"seq":3,"op":"add","id":"t","selector":{"architecture":["s390x"]},"artifact":{"repository":"oci://127.0.0.1:5532/ns/tree","manifest_digest":"sha256:cac08beec0a2d3554112aae593c63dfadda4e9192793351cf07f39c7f6706df4","layer_digest":"sha256:f8712d5eab7c627741d2b229c520156859e764641205d07a78a598a72a147c13","payload_sha256":"sha256:c5073b25dfb8f6b4136f62b9aa8e874bd9a38cbf8ce964a0a55cc86eee11a41f"},"operation_digest":"sha256:a87247aa5b91f0df7c23d09c17b85e65d0de675323f02fa2a2edf7c7f4751164"}],"head":{"seq":3}}\ No newline at end of file+{"schema":1,"tree_id":"t","generation":3,"parent_manifest_digest":"sha256:d1a131e345e29aa6c2e01cb7edb6e8797804d87a0140f7372e9a0ca93fa62320","base":{"seq":0},"operations":[{"seq":1,"op":"add","id":"t","selector":{"architecture":["s390x"]},"artifact":{"repository":"oci://127.0.0.1:5532/ns/tree","manifest_digest":"sha256:cac08beec0a2d3554112aae593c63dfadda4e9192793351cf07f39c7f6706df4","layer_digest":"sha256:f8712d5eab7c627741d2b229c520156859e764641205d07a78a598a72a147c13","payload_sha256":"sha256:c5073b25dfb8f6b4136f62b9aa8e874bd9a38cbf8ce964a0a55cc86eee11a41f"},"operation_digest":"sha256:a33ee3eae67efc9098443c491a70df4711e70f4cc8a7da5691a99be39d1faf76"},{"seq":2,"op":"delete","id":"t","selector":{"architecture":["s390x"]},"artifact":{"repository":"oci://127.0.0.1:5532/ns/tree","manifest_digest":"sha256:b2b47fc759de49231fc9d9778cc42be4d6fbf5a12393bbb2fd62f75dcdd07066","layer_digest":"sha256:68d80fc35958ebbff8b82bbbbbf58dff8bc416b2a3e194ac0191499cf90bb14c","payload_sha256":"sha256:6d30cc3bd7b43b3ea26375e14353601f6d679c3b73d8434e76c83e5e8ac7ee99"},"operation_digest":"sha256:d9e8cb4347a5e43ace9b901a6ba8f068d8a306b31224a9a889e5c34e939101be"},{"seq":3,"op":"add","id":"t","selector":{"architecture":["s390x"]},"artifact":{"repository":"oci://127.0.0.1:5532/ns/tree","manifest_digest":"sha256:cac08beec0a2d3554112aae593c63dfadda4e9192793351cf07f39c7f6706df4","layer_digest":"sha256:f8712d5eab7c627741d2b229c520156859e764641205d07a78a598a72a147c13","payload_sha256":"sha256:c5073b25dfb8f6b4136f62b9aa8e874bd9a38cbf8ce964a0a55cc86eee11a41f"},"operation_digest":"sha256:a87247aa5b91f0df7c23d09c17b85e65d0de675323f02fa2a2edf7c7f4751164"}],"head":{"seq":3}}\ No newline at end of filediff --git a/testing/helper/test-eventlog.c b/testing/helper/test-eventlog.cindex deaa732c..405993dd 100644--- a/testing/helper/test-eventlog.c+++ b/testing/helper/test-eventlog.c@@ -40,7 +40,7 @@ static int append_init(const char *path, const char *bound_in,hex_encode(zero, SHIRUDO_TPM_NAME_LEN, name_hex);hex_encode(modulus, sizeof(modulus), writer_hex);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");diff --git a/testing/helper/test-register.c b/testing/helper/test-register.cindex 82ac9457..b13d6ba3 100644--- a/testing/helper/test-register.c+++ b/testing/helper/test-register.c@@ -89,7 +89,7 @@ static int append_init(const __u8 event[32],eventlog_boot_id(boot_id, sizeof(boot_id));snprintf(nv_index, sizeof(nv_index), "0x%08X", SHIRUDO_NV_INDEX);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");@@ -131,7 +131,7 @@ static int append_event(const char *type, const char *name,eventlog_boot_id(boot_id, sizeof(boot_id));snprintf(nv_index, sizeof(nv_index), "0x%08X", SHIRUDO_NV_INDEX);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");@@ -163,7 +163,7 @@ static int append_tree(__s64 seq, const char *op, const char *id,eventlog_boot_id(boot_id, sizeof(boot_id));snprintf(nv_index, sizeof(nv_index), "0x%08X", SHIRUDO_NV_INDEX);json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");@@ -552,7 +552,7 @@ int main(int argc, char **argv)json_obj_close(&e);json_arr_open(&e, "eventlog");json_obj_open(&e);- json_kv_int(&e, "schema", 2);+ json_kv_int(&e, "schema", 1);json_kv_string(&e, "ts", ts);json_kv_string(&e, "nv_index", nv_index);json_kv_string(&e, "alg", "sha256");diff --git a/testing/helper/test-upatch-serializer-pages.c b/testing/helper/test-upatch-serializer-pages.cindex f284c64a..f906b561 100644--- a/testing/helper/test-upatch-serializer-pages.c+++ b/testing/helper/test-upatch-serializer-pages.c@@ -45,11 +45,11 @@ static int check_abi_and_nonce(void).invocation_id = 0x12345678,};- if (SHIRUDO_SERIAL_VERSION != 3 ||+ if (SHIRUDO_SERIAL_VERSION != 1 ||sizeof(struct shirudo_serialize_ctx) != 40 ||sizeof(struct shirudo_serial_chunk) != 4096 ||SHIRUDO_SERIAL_CHUNK_PAYLOAD != 4032)- return fail("serializer v3 ABI layout mismatch");+ return fail("serializer v1 ABI layout mismatch");if (serial_chunk_validate(&chunk, 1, 2, 3, 10, 11, 0x12345678) != 0)return fail("valid serializer nonce rejected");if (serial_chunk_validate(&chunk, 1, 2, 3, 10, 11, 0x87654321) != -EBADMSG)diff --git a/testing/vm/build-bundle.sh b/testing/vm/build-bundle.shindex 39626aa8..e0b1b255 100755--- a/testing/vm/build-bundle.sh+++ b/testing/vm/build-bundle.sh@@ -477,7 +477,7 @@ references = ("stable", "updated", "deleted", "restored")for generation, reference in enumerate(references, start=1):head = generation + 1publication = {- "schema": 2,+ "schema": 1,"tree_id": "shirudo-test-tree","generation": generation,"base": {"seq": 0},@@ -529,9 +529,9 @@ for reference in ("stable", "updated", "deleted", "restored"):"schemaVersion": 2,"mediaType": "application/vnd.oci.image.manifest.v1+json","layers": [- {"mediaType": "application/vnd.shirudo.upatch.tree.v2+json",+ {"mediaType": "application/vnd.shirudo.upatch.tree.v1+json","digest": payload_digest, "size": len(payload)},- {"mediaType": "application/vnd.shirudo.upatch.tree.signature.v2",+ {"mediaType": "application/vnd.shirudo.upatch.tree.signature.v1","digest": signature_digest, "size": len(signature)},],}diff --git a/tools/shirudo-build/bpm-publish.c b/tools/shirudo-build/bpm-publish.cindex 19479a31..0ee532ae 100644--- a/tools/shirudo-build/bpm-publish.c+++ b/tools/shirudo-build/bpm-publish.c@@ -737,7 +737,7 @@ static int cmd_bpm_tree_append(int argc, char **argv)rc = bpm_tree_fetch_publication(&c, repository, reference, cert, &pub,parent, sizeof(parent));if (rc == -ENOENT) {- pub = (struct shirudo_tree_publication){ .schema = 2,+ pub = (struct shirudo_tree_publication){ .schema = 1,.generation = 1 };parent[0] = '\0';if (tree_id)@@ -755,7 +755,7 @@ static int cmd_bpm_tree_append(int argc, char **argv)}pub.generation++;}- pub.schema = 2;+ pub.schema = 1;if (!pub.tree_id[0])bpm_copy_string(pub.tree_id, sizeof(pub.tree_id), info.name);bpm_copy_string(pub.parent_manifest_digest,diff --git a/upatches/kernel-cve/manifest.json b/upatches/kernel-cve/manifest.jsonindex 7fe91bfa..8bdb78b2 100644--- a/upatches/kernel-cve/manifest.json+++ b/upatches/kernel-cve/manifest.json@@ -92,7 +92,7 @@"upatch_name": "cve-2026-63984-candidate-bpf-obs"}],- "schema": 3,+ "schema": 1,"selection": {"deduplicate_cve": true,"include_all": false,diff --git a/upatches/kernel-obs/decoders/dns.lua b/upatches/kernel-obs/decoders/dns.luaindex ba4d227b..3bc759fb 100644--- a/upatches/kernel-obs/decoders/dns.lua+++ b/upatches/kernel-obs/decoders/dns.lua@@ -106,7 +106,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/exec.lua b/upatches/kernel-obs/decoders/exec.luaindex bf104b61..9b0332f0 100644--- a/upatches/kernel-obs/decoders/exec.lua+++ b/upatches/kernel-obs/decoders/exec.lua@@ -72,7 +72,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/file.lua b/upatches/kernel-obs/decoders/file.luaindex 4fc4d603..31904ab1 100644--- a/upatches/kernel-obs/decoders/file.lua+++ b/upatches/kernel-obs/decoders/file.lua@@ -66,7 +66,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/listen.lua b/upatches/kernel-obs/decoders/listen.luaindex 9443fb5c..1c11cdba 100644--- a/upatches/kernel-obs/decoders/listen.lua+++ b/upatches/kernel-obs/decoders/listen.lua@@ -97,7 +97,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/net.lua b/upatches/kernel-obs/decoders/net.luaindex 8b030d7b..8b94011e 100644--- a/upatches/kernel-obs/decoders/net.lua+++ b/upatches/kernel-obs/decoders/net.lua@@ -101,7 +101,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/priv.lua b/upatches/kernel-obs/decoders/priv.luaindex 8d9fd822..a528bb87 100644--- a/upatches/kernel-obs/decoders/priv.lua+++ b/upatches/kernel-obs/decoders/priv.lua@@ -80,7 +80,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/socket.lua b/upatches/kernel-obs/decoders/socket.luaindex 5b712679..761e4244 100644--- a/upatches/kernel-obs/decoders/socket.lua+++ b/upatches/kernel-obs/decoders/socket.lua@@ -94,7 +94,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/upatches/kernel-obs/decoders/watch.lua b/upatches/kernel-obs/decoders/watch.luaindex b6bd9a1a..54450331 100644--- a/upatches/kernel-obs/decoders/watch.lua+++ b/upatches/kernel-obs/decoders/watch.lua@@ -97,7 +97,7 @@ function decode(input)endendreturn {- schema = 2,+ schema = 1,upatch = input.upatch,map = input.map,interval = summary,diff --git a/util/bpm_oci.h b/util/bpm_oci.hindex 03b568c1..db8a1a73 100644--- a/util/bpm_oci.h+++ b/util/bpm_oci.h@@ -49,9 +49,9 @@ struct shirudo_json_emit;#define BPM_EMPTY_CONFIG_MEDIA "application/vnd.oci.empty.v1+json"#define BPM_PUBLIC_KEY_ARTIFACT "application/vnd.shirudo.bpm.public-key.v1+der"#define BPM_PUBLIC_KEY_MEDIA "application/pkix-cert"-#define BPM_TREE_MEDIA "application/vnd.shirudo.upatch.tree.v2+json"-#define BPM_TREE_SIG_MEDIA "application/vnd.shirudo.upatch.tree.signature.v2"-#define BPM_TREE_ARTIFACT "application/vnd.shirudo.upatch.tree.v2"+#define BPM_TREE_MEDIA "application/vnd.shirudo.upatch.tree.v1+json"+#define BPM_TREE_SIG_MEDIA "application/vnd.shirudo.upatch.tree.signature.v1"+#define BPM_TREE_ARTIFACT "application/vnd.shirudo.upatch.tree.v1"#define BPM_MANIFEST_MEDIA "application/vnd.oci.image.manifest.v1+json"#define BPM_UPATCH_MEDIA "application/vnd.shirudo.upatch.v1"diff --git a/util/bpm_tree.c b/util/bpm_tree.cindex a856cf83..c713ea71 100644--- a/util/bpm_tree.c+++ b/util/bpm_tree.c@@ -568,7 +568,7 @@ int tree_parse(const char *body, size_t len,tp_ws(&p);if (p.p != p.end || !seen_schema || !seen_generation || !seen_base ||!seen_base_seq || !seen_operations || !seen_head || !seen_head_seq ||- schema != 2 || !out->tree_id[0] ||+ schema != 1 || !out->tree_id[0] ||out->generation < 0 || out->generation == INT64_MAX ||out->base_seq < 0 || out->head_seq < out->base_seq ||out->head_seq == INT64_MAX) {