eBPF-based security platform
seal: take authority from a task that dumps core
Daniel Borkmannfda53310043d
diff --git a/Documentation/contribute/testing/test-coverage.rst b/Documentation/contribute/testing/test-coverage.rstindex 3d8c6599..f5dfd9d0 100644--- a/Documentation/contribute/testing/test-coverage.rst+++ b/Documentation/contribute/testing/test-coverage.rst@@ -472,6 +472,10 @@ signed config image.lets no labeled archive out; an archive without a record of itsload is reported, not restored by init and removed by the nextupatch command+ * - ``t6145-core-dump``+ - An exec of the runtime that fails after its mark is committed+ dumps core without authority: the dump cannot unlink a pin or+ replace a sealed file, and ``SealCoreDump`` counts it``bpm`` (7)~~~~~~~~~~~diff --git a/Documentation/internals/enforcement.rst b/Documentation/internals/enforcement.rstindex 993731a9..707d7f21 100644--- a/Documentation/internals/enforcement.rst+++ b/Documentation/internals/enforcement.rst@@ -109,8 +109,10 @@ question: does the calling task have runtime authority? A task has itwhen it carries a mark in ``shirudo_tasks``. A task gets the mark by asuccessful exec of a file on the authenticated runtime image, or, for the``init`` process in the initrd, from a seed ``init`` writes before it-freezes the map. A fork inherits the mark. :doc:`seal` explains how the-mark is granted and cleared.+freezes the map. A fork inherits the mark. A task that dumps core+keeps its mark but not its authority, since the kernel's dump code runs+as the task and writes where ``kernel.core_pattern`` says. :doc:`seal`+explains how the mark is granted and cleared.The ``bpf()`` hooks have a second discriminator. ``lsm/bpf`` and``lsm/bpf_prog_load`` receive ``bool kernel``, which is true for calls adiff --git a/Documentation/internals/seal.rst b/Documentation/internals/seal.rstindex 42695528..ac6f9eb0 100644--- a/Documentation/internals/seal.rst+++ b/Documentation/internals/seal.rst@@ -70,6 +70,19 @@ that is not on the runtime image commits an untrusted candidate and soclears the mark. ``lsm/task_alloc`` copies a parent's mark to everychild.+A task that dumps core keeps its mark but loses its authority. An exec+can still fail after ``bprm_committed_creds`` has committed the mark,+when the new stack cannot take the argument pointers, and the task then+dies by ``SIGSEGV`` and dumps core before the new program has run a+single instruction. The kernel's dump code runs as the task: it unlinks+the file ``kernel.core_pattern`` names, root's choice, and creates it+anew. The first check of authority that finds ``PF_DUMPCORE`` on the+task revokes the authority for good and counts ``SealCoreDump``, and the+operation is refused as it is for any task without authority. The mark+stays, so the protections below still keep other tasks off the dumping+task, and a fork copies the revocation along with the mark. The next+successful exec commits a fresh mark without it.+Policy bits-----------diff --git a/Documentation/reference/cli/status.rst b/Documentation/reference/cli/status.rstindex 54080132..dea81f5e 100644--- a/Documentation/reference/cli/status.rst+++ b/Documentation/reference/cli/status.rst@@ -409,7 +409,7 @@ Print the keepalive body of the same target, which follows no tree:.. code-block:: consoletarget# shirudo status --keepalive- {"schema":"shirudo.keepalive/1","boot_id":"82639935-1127-4dab-91b5-f818eabc7f13","version_id":"d0d7aa800303439023907d1979d917d46a21bec21f816689c138728a28e84af9","config_root":"6d5ed552f448a1c07e3b9d24f5a86c1e0b7d93f2c4e5a6b7180c9d2e3f4a5b6c","kernel_release":"7.3.0-bpf-next+","image_id":null,"image_version":null,"image_root":null,"verdict":"ok","cond":5461,"flags":0,"tamper":[15,0,0,0,0,1,0,0,0,0,0,8,0,0,0,0,0,1,0,0,1,0,0,0,0,0,7,0,0,2,0,0,0,0,0,0,0],"tree_id":null,"generation":null,"base_seq":null,"last_seq":null,"base_root":null,"projection_root":null,"mask":null,"set_sha256":"5f0c2e8b7a1d4c3f9e6b2a0d8c7f1e3b5a9d4c2e6f8b0a1d3c5e7f9b2d4a6c8e","count":1,"not_ok":0}+ {"schema":"shirudo.keepalive/1","boot_id":"82639935-1127-4dab-91b5-f818eabc7f13","version_id":"d0d7aa800303439023907d1979d917d46a21bec21f816689c138728a28e84af9","config_root":"6d5ed552f448a1c07e3b9d24f5a86c1e0b7d93f2c4e5a6b7180c9d2e3f4a5b6c","kernel_release":"7.3.0-bpf-next+","image_id":null,"image_version":null,"image_root":null,"verdict":"ok","cond":5461,"flags":0,"tamper":[15,0,0,0,0,1,0,0,0,0,0,8,0,0,0,0,0,1,0,0,1,0,0,0,0,0,7,0,0,2,0,0,0,0,0,0,0,0],"tree_id":null,"generation":null,"base_seq":null,"last_seq":null,"base_root":null,"projection_root":null,"mask":null,"set_sha256":"5f0c2e8b7a1d4c3f9e6b2a0d8c7f1e3b5a9d4c2e6f8b0a1d3c5e7f9b2d4a6c8e","count":1,"not_ok":0}Add this boot's eventlog to the report:diff --git a/Documentation/reference/formats/status-json.rst b/Documentation/reference/formats/status-json.rstindex da7d1685..694524cb 100644--- a/Documentation/reference/formats/status-json.rst+++ b/Documentation/reference/formats/status-json.rst@@ -955,7 +955,8 @@ indented here:"Kexec": 0,"TpmExtend": 0,"ObjGet": 0,- "SealSignal": 0+ "SealSignal": 0,+ "SealCoreDump": 0}},"config": {@@ -1011,7 +1012,7 @@ of the same target read:"SealXattr": 0, "SealLabel": 0, "SealPtrace": 0, "SealPerf": 0,"ExecTraced": 0, "SealEntry": 0, "PerfAttach": 0, "PinEntry": 0,"SealCopyUp": 0, "Kexec": 0, "TpmExtend": 0, "ObjGet": 1,- "SealSignal": 0+ "SealSignal": 0, "SealCoreDump": 0}}diff --git a/Documentation/security/tamper-counters.rst b/Documentation/security/tamper-counters.rstindex b511cb0c..6c18b209 100644--- a/Documentation/security/tamper-counters.rst+++ b/Documentation/security/tamper-counters.rst@@ -215,6 +215,13 @@ counter.- ``lsm/task_kill``: a signal other than 0 to a marked task from atask without authority; the signal is delivered- none+ * - ``SealCoreDump``+ - core dump of a shirudo task, which acts without authority+ - Any hook that asks for runtime authority, the first time a+ marked task that is dumping core asks: the task loses its+ authority for good, and the hook refuses the operation and moves+ its own counter+ - the hook'sUnless the row says every caller, a task with runtime authority isnot refused and moves nothing.@@ -313,7 +320,10 @@ A counter that moved means that a guard refused an operation this boot.The refusal is what moved it: the operation did not happen. The oneexception is ``SealSignal``, which counts a signal the seal delivered:the task it went to may have been stopped, and the next upatch load or unload-and ``shirudo status`` find what a stopped load left.+and ``shirudo status`` find what a stopped load left. ``SealCoreDump``+counts a shirudo task that dumped core, after a crash or after an exec+that failed past its point of no return, which root can bring about+with a small stack limit; the dump did not get the task's authority.A non-zero counter does not mean:diff --git a/Documentation/security/threat-model.rst b/Documentation/security/threat-model.rstindex 170d2253..3332b938 100644--- a/Documentation/security/threat-model.rst+++ b/Documentation/security/threat-model.rst@@ -789,6 +789,13 @@ copies the mark, a failed exec keeps it, and a successful exec ofanything else clears it. The initrd's ``init`` process receives abootstrap mark through a pidfd before the gates attach.+A task that dumps core loses its authority (``SealCoreDump``). The+kernel's dump code runs as the task and unlinks and creates the file+``kernel.core_pattern`` names, root's choice. An exec can fail after+its mark was committed, when root gives it a stack too small for its+arguments, and the task then dumps core before shirudo has run: a pin+or a sealed file at that path was the dump's to remove (``t6145``).+An authorized process is protected against being taken over:- ``lsm/ptrace_access_check`` refuses every ptrace mode against a marked@@ -857,11 +864,11 @@ An authorized process is protected against being taken over::Counters: ``SealWrite``, ``SealUnlink``, ``SealRename``,``SealSetattr``, ``SealXattr``, ``SealLabel``, ``SealEntry``,``SealCopyUp``, ``KeyringWrite``, ``SealPtrace``, ``SealPerf``,- ``SealSignal``, ``ExecTraced``, ``ExeIdentity``+ ``SealSignal``, ``SealCoreDump``, ``ExecTraced``, ``ExeIdentity``:Tests: ``t6001``, ``t6006``, ``t6007``, ``t6110``, ``t6111``,``t6112``, ``t6113``, ``t6114``, ``t6115``, ``t6118``, ``t6123``,``t6124``, ``t6127``, ``t6129``, ``t6131``, ``t6133``, ``t6134``,- ``t6135``, ``t6136``, ``t6137``, ``t6144``+ ``t6135``, ``t6136``, ``t6137``, ``t6144``, ``t6145``:Residual: R2, R19, R22T4 Substituting artifactsdiff --git a/Makefile.shirudo b/Makefile.shirudoindex dc45f487..a2fbd1d2 100644--- a/Makefile.shirudo+++ b/Makefile.shirudo@@ -775,6 +775,7 @@ TEST_HELPERS := $(VERITY_TEST_HELPERS) \testing/helper/test-bpm-source \testing/helper/test-bpf-load \testing/helper/test-bpf-cmd \+ testing/helper/test-exec-fail \testing/helper/test-perf-attach \testing/helper/test-otel-map \testing/helper/test-upatch-map-types \@@ -913,6 +914,10 @@ testing/helper/test-bpf-cmd: testing/helper/test-bpf-cmd.c@printf ' CC $@\n'$(Q)$(CC) $(CFLAGS) -o $@ $^+testing/helper/test-exec-fail: testing/helper/test-exec-fail.c+ @printf ' CC $@\n'+ $(Q)$(CC) $(CFLAGS) -o $@ $^+testing/helper/test-perf-attach: testing/helper/test-perf-attach.c@printf ' CC $@\n'$(Q)$(CC) $(CFLAGS) -I$(BPF_UAPI_INCLUDE) -o $@ $^diff --git a/bpf/lib/lsm.h b/bpf/lib/lsm.hindex 73a40540..12a7841b 100644--- a/bpf/lib/lsm.h+++ b/bpf/lib/lsm.h@@ -40,7 +40,7 @@ struct task_authority {__u8 trusted;__u8 candidate_valid;__u8 candidate_trusted;- __u8 pad;+ __u8 revoked;__u32 pad2;};diff --git a/bpf/lib/tamper.h b/bpf/lib/tamper.hindex 49214403..a2372d62 100644--- a/bpf/lib/tamper.h+++ b/bpf/lib/tamper.h@@ -49,6 +49,7 @@ enum tamper_point {TAMPER_TPM_EXTEND,TAMPER_OBJ_GET,TAMPER_SEAL_SIGNAL,+ TAMPER_SEAL_CORE_DUMP,TAMPER_MAX};diff --git a/bpf/lib/verity.h b/bpf/lib/verity.hindex dd57e326..de5f735f 100644--- a/bpf/lib/verity.h+++ b/bpf/lib/verity.h@@ -47,10 +47,36 @@ static __always_inline bool shirudo_bootstrap_task(void)return authority && authority->trusted == TASK_BOOTSTRAP;}-/* The mark changes only when exec commits, so failed exec keeps authority. */+#define PF_DUMPCORE 0x00000200++/* A task loses authority for good, and the cause is counted once. */+static __always_inline bool shirudo_revoke(struct task_authority *authority,+ enum tamper_point point)+{+ if (!authority->revoked) {+ authority->revoked = 1;+ shirudo_tamper_count(point);+ }+ return false;+}++/*+ * The mark changes only when exec commits, so failed exec keeps authority.+ * An exec that fails after its commit dumps core, and so does a crash:+ * the dump runs as the task and unlinks and creates the file+ * core_pattern names, which is root's choice, not the program's.+ */static __always_inline bool shirudo_task_is_self(const struct sb_id *id){- return shirudo_marked(bpf_get_current_task_btf());+ struct task_struct *task = bpf_get_current_task_btf();+ struct task_authority *authority;++ authority = bpf_task_storage_get(&shirudo_tasks, task, NULL, 0);+ if (!authority || !authority->trusted || authority->revoked)+ return false;+ if (BPF_CORE_READ(task, flags) & PF_DUMPCORE)+ return shirudo_revoke(authority, TAMPER_SEAL_CORE_DUMP);+ return true;}static __always_inline booldiff --git a/bpf/seal.c b/bpf/seal.cindex ab33058f..be2089dc 100644--- a/bpf/seal.c+++ b/bpf/seal.c@@ -183,6 +183,7 @@ void BPF_PROG(shirudo_seal_bprm_committed_creds,return;authority->trusted = authority->candidate_valid &&authority->candidate_trusted;+ authority->revoked = 0;authority->candidate_valid = 0;authority->candidate_trusted = 0;}@@ -217,6 +218,7 @@ int BPF_PROG(shirudo_seal_task_alloc, struct task_struct *child,if (!authority)return -ENOMEM;authority->trusted = parent_authority->trusted;+ authority->revoked = parent_authority->revoked;return 0;}diff --git a/testing/fixtures/keepalive/node-a-1.0.0.json b/testing/fixtures/keepalive/node-a-1.0.0.jsonindex bcf64c38..ea0753a4 100644--- a/testing/fixtures/keepalive/node-a-1.0.0.json+++ b/testing/fixtures/keepalive/node-a-1.0.0.json@@ -1 +1 @@-{"schema":"shirudo.keepalive/1","boot_id":"168d20a1-5011-4e1b-9924-d8b73c85aa4e","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"1d8465c5b17838303fee92b3905420d294d2c22c576a0bdef0f69f190ed22807","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":"a3c3f1b0e4c2d7f09e3b6b2a8b1d5e7c4f6a9d0b2c8e1f3a5b7d9c0e2f4a6b8c","verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":1,"base_seq":0,"last_seq":1,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"04f83540c1727aefcf3c53449a99594c8fd1cc15e1466dbdbf3168cc8f9dc136","mask":"QA==","set_sha256":"6c9e113d02cd14646f617d7bba4a092b91bc3802dfdaae50e2fef7a01e0580aa","count":1,"not_ok":0}\ No newline at end of file+{"schema":"shirudo.keepalive/1","boot_id":"168d20a1-5011-4e1b-9924-d8b73c85aa4e","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"1d8465c5b17838303fee92b3905420d294d2c22c576a0bdef0f69f190ed22807","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":"a3c3f1b0e4c2d7f09e3b6b2a8b1d5e7c4f6a9d0b2c8e1f3a5b7d9c0e2f4a6b8c","verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":1,"base_seq":0,"last_seq":1,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"04f83540c1727aefcf3c53449a99594c8fd1cc15e1466dbdbf3168cc8f9dc136","mask":"QA==","set_sha256":"6c9e113d02cd14646f617d7bba4a092b91bc3802dfdaae50e2fef7a01e0580aa","count":1,"not_ok":0}\ No newline at end of filediff --git a/testing/fixtures/keepalive/node-a-1.1.0.json b/testing/fixtures/keepalive/node-a-1.1.0.jsonindex 532e0a02..f02bbbb2 100644--- a/testing/fixtures/keepalive/node-a-1.1.0.json+++ b/testing/fixtures/keepalive/node-a-1.1.0.json@@ -1 +1 @@-{"schema":"shirudo.keepalive/1","boot_id":"168d20a1-5011-4e1b-9924-d8b73c85aa4e","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"1d8465c5b17838303fee92b3905420d294d2c22c576a0bdef0f69f190ed22807","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":"a3c3f1b0e4c2d7f09e3b6b2a8b1d5e7c4f6a9d0b2c8e1f3a5b7d9c0e2f4a6b8c","verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":3,"base_seq":0,"last_seq":3,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"154522480ff8884daa95589e80f26f20248bbf9c192dfbb3cee04e03b4f136a1","mask":"VA==","set_sha256":"74e5bd2c665109f6d8f926af5476c266ad70ab07293ff13b1a13d0b89aa5c1bf","count":1,"not_ok":0}\ No newline at end of file+{"schema":"shirudo.keepalive/1","boot_id":"168d20a1-5011-4e1b-9924-d8b73c85aa4e","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"1d8465c5b17838303fee92b3905420d294d2c22c576a0bdef0f69f190ed22807","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":"a3c3f1b0e4c2d7f09e3b6b2a8b1d5e7c4f6a9d0b2c8e1f3a5b7d9c0e2f4a6b8c","verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":3,"base_seq":0,"last_seq":3,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"154522480ff8884daa95589e80f26f20248bbf9c192dfbb3cee04e03b4f136a1","mask":"VA==","set_sha256":"74e5bd2c665109f6d8f926af5476c266ad70ab07293ff13b1a13d0b89aa5c1bf","count":1,"not_ok":0}\ No newline at end of filediff --git a/testing/fixtures/keepalive/node-b-1.0.0.json b/testing/fixtures/keepalive/node-b-1.0.0.jsonindex a3b65c1a..f922ce65 100644--- a/testing/fixtures/keepalive/node-b-1.0.0.json+++ b/testing/fixtures/keepalive/node-b-1.0.0.json@@ -1 +1 @@-{"schema":"shirudo.keepalive/1","boot_id":"9a6f14ea-0cc2-45e1-8e23-7b887120cf54","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"ff2cbeff5d0e9c41a7b36f28d14ce09b73a5182e6fc40d97b5e2a1683c0f7ff8","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":null,"verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":1,"base_seq":0,"last_seq":1,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"0000000000000000000000000000000000000000000000000000000000000000","mask":"gA==","set_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","count":0,"not_ok":0}\ No newline at end of file+{"schema":"shirudo.keepalive/1","boot_id":"9a6f14ea-0cc2-45e1-8e23-7b887120cf54","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"ff2cbeff5d0e9c41a7b36f28d14ce09b73a5182e6fc40d97b5e2a1683c0f7ff8","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":null,"verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":1,"base_seq":0,"last_seq":1,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"0000000000000000000000000000000000000000000000000000000000000000","mask":"gA==","set_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","count":0,"not_ok":0}\ No newline at end of filediff --git a/testing/fixtures/keepalive/node-b-1.1.0.json b/testing/fixtures/keepalive/node-b-1.1.0.jsonindex 48f186a6..086f7a47 100644--- a/testing/fixtures/keepalive/node-b-1.1.0.json+++ b/testing/fixtures/keepalive/node-b-1.1.0.json@@ -1 +1 @@-{"schema":"shirudo.keepalive/1","boot_id":"9a6f14ea-0cc2-45e1-8e23-7b887120cf54","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"ff2cbeff5d0e9c41a7b36f28d14ce09b73a5182e6fc40d97b5e2a1683c0f7ff8","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":null,"verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":3,"base_seq":0,"last_seq":3,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"0000000000000000000000000000000000000000000000000000000000000000","mask":"qA==","set_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","count":0,"not_ok":0}\ No newline at end of file+{"schema":"shirudo.keepalive/1","boot_id":"9a6f14ea-0cc2-45e1-8e23-7b887120cf54","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"ff2cbeff5d0e9c41a7b36f28d14ce09b73a5182e6fc40d97b5e2a1683c0f7ff8","kernel_release":"7.4.2","image_id":"fleet-os","image_version":"2026.11.1","image_root":null,"verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":3,"base_seq":0,"last_seq":3,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"0000000000000000000000000000000000000000000000000000000000000000","mask":"qA==","set_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","count":0,"not_ok":0}\ No newline at end of filediff --git a/testing/fixtures/keepalive/ops-16.json b/testing/fixtures/keepalive/ops-16.jsonindex 56bf1344..cbc02b45 100644--- a/testing/fixtures/keepalive/ops-16.json+++ b/testing/fixtures/keepalive/ops-16.json@@ -1 +1 @@-{"schema":"shirudo.keepalive/1","boot_id":"d5140906-4eab-4983-a62c-29e49d449ea3","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"1fbdff17ad8d50404772901df54d5aa2c698eddbb413e286fc654f80931c688a","kernel_release":"7.4.0-shirudo","image_id":"fleet-os","image_version":"2026.11.1","image_root":"a3c3f1b0e4c2d7f09e3b6b2a8b1d5e7c4f6a9d0b2c8e1f3a5b7d9c0e2f4a6b8c","verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":42,"base_seq":0,"last_seq":12,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"f59301708fc8e150c5d2abb1009b4f13fc0dcc1304b708f77dc14b1541679e28","mask":"WdlZAA==","set_sha256":"ac1af1d44b5c1fe3f616384db421138aa4d296595797b5864908a89276e17e6d","count":7,"not_ok":0}\ No newline at end of file+{"schema":"shirudo.keepalive/1","boot_id":"d5140906-4eab-4983-a62c-29e49d449ea3","version_id":"d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f","config_root":"1fbdff17ad8d50404772901df54d5aa2c698eddbb413e286fc654f80931c688a","kernel_release":"7.4.0-shirudo","image_id":"fleet-os","image_version":"2026.11.1","image_root":"a3c3f1b0e4c2d7f09e3b6b2a8b1d5e7c4f6a9d0b2c8e1f3a5b7d9c0e2f4a6b8c","verdict":"ok","cond":5461,"flags":0,"tamper":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"tree_id":"fleet-base","generation":42,"base_seq":0,"last_seq":12,"base_root":"0000000000000000000000000000000000000000000000000000000000000000","projection_root":"f59301708fc8e150c5d2abb1009b4f13fc0dcc1304b708f77dc14b1541679e28","mask":"WdlZAA==","set_sha256":"ac1af1d44b5c1fe3f616384db421138aa4d296595797b5864908a89276e17e6d","count":7,"not_ok":0}\ No newline at end of filediff --git a/testing/fixtures/keepalive/quotes.tsv b/testing/fixtures/keepalive/quotes.tsvindex 83312772..bc465baf 100644--- a/testing/fixtures/keepalive/quotes.tsv+++ b/testing/fixtures/keepalive/quotes.tsv@@ -1,4 +1,4 @@-node-a-1.0.0.json /1RDR4AYACIAC8yPm8NCFaXsGeNm/K5lH8ACW0CXacA/nNWfo6e7qMeyACAhsWqUASTRY7vfejfm43Jxg617fCsCuX5mbvbT2NBw/QAAAAAAAAALAAAAAAAAAAABICQBJQASAAAAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgWR618d+eEkNNFV2EJULBd96BPL4MvGAtbOkW0bQESfQAIGGdJ6DbYzm1g+NM34GF5tlHdnPHHpq4am/5Pp35Zdc+ ACMACwAFAHIAAAAQABgACwADABAAINjwQ/NaFNgV6q2W2e3yjYbJ4ABIMXzcXhBi61m8A45VACAOFYuhumBSuWOm+gTbLci3cOAv6kMMeeDtSgNruFzoYg== 21b16a940124d163bbdf7a37e6e3727183ad7b7c2b02b97e666ef6d3d8d070fd-node-a-1.1.0.json /1RDR4AYACIAC8yPm8NCFaXsGeNm/K5lH8ACW0CXacA/nNWfo6e7qMeyACAMwOvKIObRbmJce9O0Bma1qO/9eZPQ9EiVg5APy1pHuwAAAAAAAAApAAAAAAAAAAABICQBJQASAAAAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgHoyYivLSNxJT1wiYTwNdiOxKo43aqHAg4K3ZTp++KlQAIAIO8BClMsmcUAGpG6NgKILeKiW6UP9M+GJFAEGO4rdL ACMACwAFAHIAAAAQABgACwADABAAINjwQ/NaFNgV6q2W2e3yjYbJ4ABIMXzcXhBi61m8A45VACAOFYuhumBSuWOm+gTbLci3cOAv6kMMeeDtSgNruFzoYg== 0cc0ebca20e6d16e625c7bd3b40666b5a8effd7993d0f4489583900fcb5a47bb-node-b-1.0.0.json /1RDR4AYACIAC3zsC1hrNOKNJtq/X6oDmJsgGRhVvRnRL51e1PJIMu1QACDZVIahNp2Vs7w3ISLr02EEwednQxrbkTmQifWaQTM0qAAAAAAAAAAOAAAAAAAAAAABICQBJQASAAAAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgKQu59K2fbLLKYUcSkNifr2Na8mme6TtOVfNRP4l1umsAILuNXd676wWyywtVez0OBoFnZKQIlCmPMLFYCLjFGmwI ACMACwAFAHIAAAAQABgACwADABAAILc+BViAIEdI2pt2dzBSRwdUc00zfA/B8vjrJMlWp39JACCDBaDtUnqWWQX/jPv467uHo5IM1Uwf8TL7pkmlCaFlgg== d95486a1369d95b3bc372122ebd36104c1e767431adb91399089f59a413334a8-node-b-1.1.0.json /1RDR4AYACIAC3zsC1hrNOKNJtq/X6oDmJsgGRhVvRnRL51e1PJIMu1QACCKGBX9S8UMrDh/Y7313vAX93CsHbII4n/1OkFWnoXIvAAAAAAAAAAqAAAAAAAAAAABICQBJQASAAAAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgd+ReAli4/55LlvN5tBABjypR6HNjH+sV4WVFQHI/IzUAILADwcKlvrIF4otoRR26MxAIrgHkY0nBVcw5ywxq6Vpr ACMACwAFAHIAAAAQABgACwADABAAILc+BViAIEdI2pt2dzBSRwdUc00zfA/B8vjrJMlWp39JACCDBaDtUnqWWQX/jPv467uHo5IM1Uwf8TL7pkmlCaFlgg== 8a1815fd4bc50cac387f63bdf5def017f770ac1db208e27ff53a41569e85c8bc+node-a-1.0.0.json /1RDR4AYACIAC06VSpnP3gTtZ2QchaGhY6WafCeOpBKEDpclW3Ccx9pCACBngwv8v+85ZN3/oJ1GGn0fixDXLgaGC3UF8Wu/O2sDwwAAAAAAAAAJAAAAAAAAAAABIBkQIwAWNjYAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgF54Eav6u2zeENsA1jeBYVgjj+l7E8LIUJOUoN8QLeT0AII1JeKh1bOZfMm7B5Q5eInB6aS+OK2fNPIsiaEwwhGyi ACMACwAFAHIAAAAQABgACwADABAAIN9saxpH/ucken3zjEseEEzYZvqMfs7wBNWhcoXbvxPiACBdpocLC7oT7KaYEXol55BxGuufUfbSls5QY32xTXqkuQ== 67830bfcbfef3964ddffa09d461a7d1f8b10d72e06860b7505f16bbf3b6b03c3+node-a-1.1.0.json /1RDR4AYACIAC06VSpnP3gTtZ2QchaGhY6WafCeOpBKEDpclW3Ccx9pCACCbpMuJxrs2A6V9v69DLet/wf0qO4aqF18ndNEbb/pcogAAAAAAAAAbAAAAAAAAAAABIBkQIwAWNjYAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgTktehUD9YADS42OE1PzhnnU+vAh0/mZcQFnKxeKRRnQAIM/7fZPRNXpCCLy9jZZQIRVbecuqrGIUfIj44MG7Mvll ACMACwAFAHIAAAAQABgACwADABAAIN9saxpH/ucken3zjEseEEzYZvqMfs7wBNWhcoXbvxPiACBdpocLC7oT7KaYEXol55BxGuufUfbSls5QY32xTXqkuQ== 9ba4cb89c6bb3603a57dbfaf432deb7fc1fd2a3b86aa175f2774d11b6ffa5ca2+node-b-1.0.0.json /1RDR4AYACIAC5EYvRv0FXHXovYD+xAPliggq1OPqxM+81LROPxt/tN2ACB8gTf/A7Q0+a6br7prB//DXMPAsSO8Vi8ARa8dPbzEGwAAAAAAAAAJAAAAAAAAAAABIBkQIwAWNjYAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAgKL665Vea0pt1M23mcy1igr9b6NEwaQKu7oklTIbL2tgAICid2HVaSm+Nm0YVe0bth3/E9qKA82rHDjTghyqCJgzB ACMACwAFAHIAAAAQABgACwADABAAIAV3xBjVs+04CIyAS9AsTz4ApNm4WoiTVYq/JNrP+TidACA35XRpkfzMf+pbOuIfzdkep23x7uS9SJVnLbQogFUmvg== 7c8137ff03b434f9ae9bafba6b07ffc35cc3c0b123bc562f0045af1d3dbcc41b+node-b-1.1.0.json /1RDR4AYACIAC5EYvRv0FXHXovYD+xAPliggq1OPqxM+81LROPxt/tN2ACBN6tw34riJIdknzeJSR8rvG2A9dddKiVF2WmkMUywSAwAAAAAAAAAcAAAAAAAAAAABIBkQIwAWNjYAAAABAAsDAAAAACDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VQ== ABgACwAggO0fJ8hNRqLVECVnNq2dx/aQu31X3k4FiRnvxs3GtKMAIL+liSZZkyW0DgOBE//PNcCPkWye7AybH+4KymjaYBoh ACMACwAFAHIAAAAQABgACwADABAAIAV3xBjVs+04CIyAS9AsTz4ApNm4WoiTVYq/JNrP+TidACA35XRpkfzMf+pbOuIfzdkep23x7uS9SJVnLbQogFUmvg== 4deadc37e2b88921d927cde25247caef1b603d75d74a8951765a690c532c1203diff --git a/testing/fixtures/keepalive/recompute.py b/testing/fixtures/keepalive/recompute.pyindex 3b94538d..4f0c6ca6 100755--- a/testing/fixtures/keepalive/recompute.py+++ b/testing/fixtures/keepalive/recompute.py@@ -24,7 +24,7 @@ BODY_KEYS = ["projection_root", "mask", "set_sha256", "count", "not_ok",]CANONICAL_KEYS = ["seq", "op", "id", "selector", "artifact"]-TAMPER_COUNTERS = 37+TAMPER_COUNTERS = 38ALL_OK = 0x1555OPERATION_DIGESTS = [@@ -51,9 +51,9 @@ MASKS = [# The body the example pages print for node A after release 1.1.0: six# conditions and no image keys.-PAGE_BODY_LEN = 732+PAGE_BODY_LEN = 734PAGE_BODY_SHA256 = \- "e863ee98defa29abe5c4367e3278ccb06a6b8b94702967afee949bcb9c7f0471"+ "7aea4a7847c84d70ef4251c798cf09700dd2757ddf1e90d18519e0462e4a361a"PAGE_COND = 0x555VERSION_ID = "d6d918ad22ff597579e6678bef75adca84d30f9661e0b7bbdbf534eebc138c1f"diff --git a/testing/functional/tamperproof/t6145-core-dump.sh b/testing/functional/tamperproof/t6145-core-dump.shnew file mode 100755index 00000000..07904e8e--- /dev/null+++ b/testing/functional/tamperproof/t6145-core-dump.sh@@ -0,0 +1,68 @@+#!/bin/sh+# SPDX-License-Identifier: BSD-2-Clause+# Copyright (c) 2026 Authors of shirudo+#+# t6145 -- a shirudo task that dumps core acts without authority: an exec+# of the runtime binary that fails after its mark is committed dumps core+# as the marked task, and the dump's unlink of the path core_pattern names+# is refused for a pin and a sealed file alike, and counted.++cd "$(dirname "$0")/../.."+. ./integration-lib.sh+target_guard+command -v python3 >/dev/null 2>&1 || test_skip_all "no python3"+H=helper/test-exec-fail+[ -x "$H" ] || test_skip_all "test-exec-fail helper not built"+RUNTIME=$(runtime_binary)+[ -x "$RUNTIME" ] || test_skip_all "no runtime binary"+PIN=/run/shirudo/bpffs/lsm_link+SEALED=/var/lib/shirudo/eventlog+[ -s "$SEALED" ] || test_skip_all "no eventlog"+PATTERN=$(cat /proc/sys/kernel/core_pattern)+USES_PID=$(cat /proc/sys/kernel/core_uses_pid)+cleanup() {+ printf '%s\n' "$PATTERN" >/proc/sys/kernel/core_pattern || :+ printf '%s\n' "$USES_PID" >/proc/sys/kernel/core_uses_pid || :+}+trap cleanup EXIT+counter() {+ "$SHIRUDO_BIN" status --json | python3 -c '+import json, sys+print(json.load(sys.stdin)["tamper_attempts"]["counters"][sys.argv[1]])+' "$1"+}+dumps=$(counter SealCoreDump) || test_skip_all "no tamper counters"+echo 0 >/proc/sys/kernel/core_uses_pid++# The exec must fail after its commit, or nothing below tests the seal.+test_expect_success 'an exec of the runtime that runs out of stack dies by SIGSEGV' '+ echo core >/proc/sys/kernel/core_pattern &&+ [ "$("$H" "$RUNTIME")" = "signal 11" ]+'+test_expect_success 'the core dump cannot unlink a pin of the private bpffs' '+ before=$(counter PinUnlink) &&+ printf "%s\n" "$PIN" >/proc/sys/kernel/core_pattern &&+ [ "$("$H" "$RUNTIME")" = "signal 11" ] &&+ echo core >/proc/sys/kernel/core_pattern &&+ [ -e "$PIN" ] &&+ [ "$(counter PinUnlink)" -gt "$before" ]+'+test_expect_success 'the core dump cannot replace a sealed file' '+ before=$(counter SealUnlink) &&+ size=$(stat -c %s "$SEALED") &&+ inode=$(stat -c %i "$SEALED") &&+ printf "%s\n" "$SEALED" >/proc/sys/kernel/core_pattern &&+ [ "$("$H" "$RUNTIME")" = "signal 11" ] &&+ echo core >/proc/sys/kernel/core_pattern &&+ [ "$(stat -c %i "$SEALED")" = "$inode" ] &&+ [ "$(stat -c %s "$SEALED")" = "$size" ] &&+ [ "$(counter SealUnlink)" -gt "$before" ]+'+test_expect_success 'the dump that lost its authority is counted as SealCoreDump' '+ [ "$(counter SealCoreDump)" -ge $((dumps + 2)) ]+'+test_expect_success 'enforcement holds after the dumps' '+ [ "$(helper/test-bpf-load)" != loaded ] &&+ "$SHIRUDO_BIN" status 2>/dev/null | grep -q "LsmAttached *OK"+'+test_donediff --git a/testing/helper/test-exec-fail.c b/testing/helper/test-exec-fail.cnew file mode 100644index 00000000..42382bdd--- /dev/null+++ b/testing/helper/test-exec-fail.c@@ -0,0 +1,68 @@+// SPDX-License-Identifier: BSD-2-Clause+/*+ * Copyright (c) 2026 Authors of shirudo+ *+ * Execs a program in a child with a stack limit too small for the argument+ * pointers, so that the exec fails after its point of no return and the+ * child dies by SIGSEGV with a core dump, and prints how the child ended.+ */++#include <errno.h>+#include <stdio.h>+#include <stdlib.h>+#include <string.h>+#include <unistd.h>+#include <sys/resource.h>+#include <sys/wait.h>++#include <shirudo/misc.h>++#define EMPTY_ARGS 2500+#define STACK_LIMIT (16 * 1024)++static void exec_without_stack(const char *path)+{+ struct rlimit stack = { STACK_LIMIT, STACK_LIMIT };+ struct rlimit core = { RLIM_INFINITY, RLIM_INFINITY };+ static char *argv[EMPTY_ARGS + 2];+ char empty[] = "";+ size_t i;++ argv[0] = empty;+ for (i = 1; i <= EMPTY_ARGS; i++)+ argv[i] = empty;+ if (setrlimit(RLIMIT_CORE, &core) || setrlimit(RLIMIT_STACK, &stack)) {+ fprintf(stderr, "setrlimit: %s\n", strerror(errno));+ _exit(2);+ }+ execv(path, argv);+ fprintf(stderr, "execv %s: %s\n", path, strerror(errno));+ _exit(2);+}++int main(int argc, char **argv)+{+ int status;+ pid_t pid;++ if (argc != 2) {+ fprintf(stderr, "usage: %s <program>\n", argv[0]);+ return 2;+ }+ pid = fork();+ if (pid < 0) {+ fprintf(stderr, "fork: %s\n", strerror(errno));+ return 2;+ }+ if (!pid)+ exec_without_stack(argv[1]);+ if (waitpid(pid, &status, 0) != pid) {+ fprintf(stderr, "waitpid: %s\n", strerror(errno));+ return 2;+ }+ if (WIFSIGNALED(status))+ printf("signal %d\n", WTERMSIG(status));+ else+ printf("exit %d\n", WEXITSTATUS(status));+ return 0;+}diff --git a/testing/proofs/cbmc/proofs.list b/testing/proofs/cbmc/proofs.listindex 2edcdb9b..c2fd5c7a 100644--- a/testing/proofs/cbmc/proofs.list+++ b/testing/proofs/cbmc/proofs.list@@ -56,7 +56,7 @@ log-escape --unwind 7 LEN=0-5json-emit-string --unwind 5 --unwindset json_string.0:27,put_string_n.0:5,put_raw.0:7,well_formed.0:27,replaced.0:5,memchr.0:9,memcmp.0:13 LEN=0-4json-emit-buffer --unwind 1 --unwindset json_raw_value.0:5,harness.0:5 --malloc-may-fail --malloc-fail-null LEN=0-4json-emit-nest --object-bits 12 --unwind 1 --unwindset json_text.0:57,sequences.0:4,sequences.1:5,any_depth.0:4,any_depth.1:4,strcmp.0:12,memchr.0:9,put_string_n.0:2,put_string_n.1:2,put_raw.0:8,json_kv_raw.0:3,json_raw_value.0:3,json_raw.0:5,strlen.0:3,vsnprintf.2:5,vsnprintf.0:2,format_number.0:3,format_number.2:5,format_number.3:3-keepalive-emit -I ../../.. --object-bits 12 --max-field-sensitivity-array-size 832 --unwind 1 --unwindset json_members.0:833,power_of_ten.0:6,put_string_n.0:5,put_string_n.1:66,put_raw.0:7,strlen.0:66,hex_is_lower.0:66,kv_tamper.0:38,kv_no_tree.0:8,json_raw_value.0:6,vsnprintf.2:4,vsnprintf.0:2,format_number.0:6,format_number.2:5,format_number.3:6,ends_in_any_number.0:6,ends_in_any_number.1:833,ends_in_any_number.2:5 LEN=0-3+keepalive-emit -I ../../.. --object-bits 12 --max-field-sensitivity-array-size 832 --unwind 1 --unwindset json_members.0:833,power_of_ten.0:6,put_string_n.0:5,put_string_n.1:66,put_raw.0:7,strlen.0:66,hex_is_lower.0:66,kv_tamper.0:39,kv_no_tree.0:8,json_raw_value.0:6,vsnprintf.2:4,vsnprintf.0:2,format_number.0:6,format_number.2:5,format_number.3:6,ends_in_any_number.0:6,ends_in_any_number.1:833,ends_in_any_number.2:5 LEN=0-3json-string --unwind 5 --unwindset json_string.0:7,parse_string.0:5,parse_string.1:7,memchr.0:9,memcmp.0:7,harness.0:8 LEN=0-6json-escape --unwind 5 --unwindset parse_string.0:4,memcmp.0:9json-roundtrip --unwind 1 --unwindset put_string_n.0:5,put_string_n.1:5,put_raw.0:7,vsnprintf.2:4,vsnprintf.0:2,format_number.0:3,format_number.2:5,format_number.3:3,parse_string.1:6,parse_string.0:4,hex4.0:5,utf8_width.0:4,memcmp.0:5 LEN=0-4diff --git a/testing/unit/keepalive.c b/testing/unit/keepalive.cindex cd4cd214..e25a27ea 100644--- a/testing/unit/keepalive.c+++ b/testing/unit/keepalive.c@@ -453,8 +453,7 @@ static void body_without_a_tree_ignores_the_tree_values(void)in.mask = NULL;ASSERT_EQ(keepalive_emit(&in, without, sizeof(without), &len), 0);EXPECT_STREQ(with_values, without);- expect_member(&in, "\"tamper\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"- "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"tree_id\":null,"+ expect_member(&in, ",0],\"tree_id\":null,""\"generation\":null,\"base_seq\":null,\"last_seq\":null,""\"base_root\":null,\"projection_root\":null,""\"mask\":null,\"set_sha256\":");@@ -596,16 +595,17 @@ static const char * const tamper_order[] = {"SealRename", "SealSetattr", "SealXattr", "SealLabel", "SealPtrace","SealPerf", "ExecTraced", "SealEntry", "PerfAttach", "PinEntry","SealCopyUp", "Kexec", "TpmExtend", "ObjGet", "SealSignal",+ "SealCoreDump",};static void tamper_counters_keep_their_places(void){size_t i;- ASSERT_EQ(ARRAY_SIZE(tamper_order), 37);+ ASSERT_EQ(ARRAY_SIZE(tamper_order), 38);ASSERT_EQ(TAMPER_MAX, ARRAY_SIZE(tamper_order));EXPECT_EQ(TAMPER_LOAD_NOT_LOADER, 0);- EXPECT_EQ(TAMPER_SEAL_SIGNAL, TAMPER_MAX - 1);+ EXPECT_EQ(TAMPER_SEAL_CORE_DUMP, TAMPER_MAX - 1);for (i = 0; i < ARRAY_SIZE(tamper_order); i++)EXPECT_STREQ(tamper_name(i), tamper_order[i]);}@@ -622,7 +622,7 @@ static void body_lists_the_counters_in_enum_order(void)in.tamper = tamper;expect_member(&in, ",\"tamper\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,""16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,"- "34,35,36,18446744073709551615],\"tree_id\":");+ "34,35,36,18446744073709551615,38],\"tree_id\":");}static void body_refuses_a_missing_string(void)@@ -742,7 +742,7 @@ static void body_of_the_largest_values_fits(void)in.tamper = tamper;ASSERT_EQ(keepalive_emit(&in, body, sizeof(body), &whole), 0);- EXPECT_EQ(whole, 3298);+ EXPECT_EQ(whole, 3319);EXPECT_LT(whole, KEEPALIVE_BODY_MAX);EXPECT_EQ(keepalive_emit(&in, body, whole, &len), -ENOSPC);EXPECT_EQ(keepalive_emit(&in, body, whole + 1, &len), 0);diff --git a/testing/vm/build-bundle-payload.sh b/testing/vm/build-bundle-payload.shindex a2f8a138..fa55de8f 100755--- a/testing/vm/build-bundle-payload.sh+++ b/testing/vm/build-bundle-payload.sh@@ -99,6 +99,7 @@ testing/helper/test-tpm-preopenedtesting/helper/test-configtesting/helper/test-bpf-loadtesting/helper/test-bpf-cmd+testing/helper/test-exec-failtesting/helper/test-perf-attachtesting/helper/test-otel-maptesting/helper/test-upatch-map-typesdiff --git a/util/identity.h b/util/identity.hindex 5e0b5a3c..8d21be66 100644--- a/util/identity.h+++ b/util/identity.h@@ -60,7 +60,7 @@ struct task_authority {__u8 trusted;__u8 candidate_valid;__u8 candidate_trusted;- __u8 pad;+ __u8 revoked;__u32 pad2;};diff --git a/util/tamper.c b/util/tamper.cindex b5ba37aa..6e3dd08e 100644--- a/util/tamper.c+++ b/util/tamper.c@@ -94,6 +94,8 @@ static const struct {"pin, map or link opened by another executable" },[TAMPER_SEAL_SIGNAL] = { "SealSignal","signal to a shirudo task (let through)" },+ [TAMPER_SEAL_CORE_DUMP] = { "SealCoreDump",+ "core dump of a shirudo task, which acts without authority" },};const char *tamper_name(enum tamper_point point)