Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,30 @@ edition = "2024"
rust-version = "1.85.0"
license = "MIT"
repository = "https://github.com/pulseengine/kiln"
version = "0.4.3"
version = "0.4.4"


[workspace.dependencies]
anyhow = "1.0"
wit-bindgen = "0.41.0"

# Internal crate versions
kiln-error = { path = "kiln-error", version = "0.4.3", default-features = false }
kiln-sync = { path = "kiln-sync", version = "0.4.3", default-features = false }
kiln-format = { path = "kiln-format", version = "0.4.3", default-features = false }
kiln-foundation = { path = "kiln-foundation", version = "0.4.3", default-features = false }
kiln-decoder = { path = "kiln-decoder", version = "0.4.3", default-features = false, features = ["std"] }
kiln-debug = { path = "kiln-debug", version = "0.4.3", default-features = false }
kiln-runtime = { path = "kiln-runtime", version = "0.4.3", default-features = false }
kiln-logging = { path = "kiln-logging", version = "0.4.3", default-features = false }
kiln-instructions = { path = "kiln-instructions", version = "0.4.3", default-features = false }
kiln-component = { path = "kiln-component", version = "0.4.3", default-features = false }
kiln-host = { path = "kiln-host", version = "0.4.3", default-features = false }
kiln-intercept = { path = "kiln-intercept", version = "0.4.3", default-features = false }
kiln-math = { path = "kiln-math", version = "0.4.3", default-features = false }
kiln-platform = { path = "kiln-platform", version = "0.4.3", default-features = false }
kiln-panic = { path = "kiln-panic", version = "0.4.3", default-features = false }
kiln-wasi = { path = "kiln-wasi", version = "0.4.3", default-features = false }
kiln-error = { path = "kiln-error", version = "0.4.4", default-features = false }
kiln-sync = { path = "kiln-sync", version = "0.4.4", default-features = false }
kiln-format = { path = "kiln-format", version = "0.4.4", default-features = false }
kiln-foundation = { path = "kiln-foundation", version = "0.4.4", default-features = false }
kiln-decoder = { path = "kiln-decoder", version = "0.4.4", default-features = false, features = ["std"] }
kiln-debug = { path = "kiln-debug", version = "0.4.4", default-features = false }
kiln-runtime = { path = "kiln-runtime", version = "0.4.4", default-features = false }
kiln-logging = { path = "kiln-logging", version = "0.4.4", default-features = false }
kiln-instructions = { path = "kiln-instructions", version = "0.4.4", default-features = false }
kiln-component = { path = "kiln-component", version = "0.4.4", default-features = false }
kiln-host = { path = "kiln-host", version = "0.4.4", default-features = false }
kiln-intercept = { path = "kiln-intercept", version = "0.4.4", default-features = false }
kiln-math = { path = "kiln-math", version = "0.4.4", default-features = false }
kiln-platform = { path = "kiln-platform", version = "0.4.4", default-features = false }
kiln-panic = { path = "kiln-panic", version = "0.4.4", default-features = false }
kiln-wasi = { path = "kiln-wasi", version = "0.4.4", default-features = false }

# Note: Safety level presets should be defined in individual crate Cargo.toml files
# as workspace.features is not supported by Cargo
Expand Down
4 changes: 2 additions & 2 deletions safety/requirements/functional-requirements/SR-45.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ artifacts:
- id: SR-45
type: requirement
title: The kiln.resource_limits manifest section is applied (wire the dead extraction)
status: implemented
description: 'IMPLEMENTED (PR #464): real extract_resource_limits_from_binary in kiln-decoder scans the binary custom sections and decodes kiln.resource_limits — strictly distinguishing absent (Ok(None)) from present-but-malformed (Err, fail loud, never treated as absent). load_module converts the manifest max_memory_usage via EngineResourceLimits::from_max_memory_bytes and feeds it into the SAME SR-46/47/48 pre-instantiate gate (check_declared_minimums) + runtime grow caps (set_runtime_max_pages/set_runtime_max_elements) the CLI --memory path uses, so a module with a manifest and NO CLI flag is bounded. Precedence: CLI + manifest combine via most_restrictive (min) — the operator cannot loosen the signed bound, the module cannot loosen the operator cap. The .unwrap_or(None) masking fallback and the foundation stub extractor are deleted; EngineBuilder::from_binary now selects ASIL mode from the manifest qualified level and fails loud on malformed manifests (it previously always yielded ASIL-D from the stub). NOT yet enforced: max_call_depth/fuel (EngineResourceLimits cannot express them; memory — the WCMC attack surface — is). Verified: manifest_memory_bound_enforced_without_cli_limits, manifest_bound_admits_fitting_module_and_caps_growth, manifest_tighter_than_cli_wins, cli_tighter_than_manifest_wins, malformed_manifest_section_fails_loud, builder_from_binary_fails_loud_on_malformed_manifest, builder_from_binary_selects_manifest_asil_level (kiln-runtime/tests/resource_limits_gate_tests.rs); test_extract_absent_section_is_none, test_extract_present_section_roundtrips, test_extract_malformed_section_is_error, test_extract_non_wasm_binary_is_error (kiln-decoder). --- The WCMC analysis (AD-WCMC-001) found the kiln.resource_limits section is decoded but NEVER APPLIED (capability_engine.rs:561 TODO). DEEPER FINDING this pass: the extraction fn (kiln-foundation/src/execution.rs:144) is ALSO a stub — returns a default and does NOT read the section (the parser from_bytes_with_provider in kiln-decoder/src/resource_limits_section.rs is never called). So SR-45 is a bigger cross-crate wire: (1) make extract scan+parse the section; (2) thread limits to instantiate; (3) apply max_memory_usage -> set_runtime_max_pages (SR-41), max_call_depth -> engine cap. This is the on-target enforcement point the embedded trust chain (AD-WCMC-001) depends on. Own feature loop. AD-WCMC-001. Issue #415.'
status: verified
description: 'VERIFIED (PR #464; re-verified on the binary at the v0.4.4 cut commit 35a573b3: a module carrying a kiln.resource_limits section is rejected at load with NO --memory flag — [Resource][E0BB9] rejected before allocation; a plain no-manifest module still runs; 12 gate tests + 4 extraction tests pass). IMPLEMENTED (PR #464): real extract_resource_limits_from_binary in kiln-decoder scans the binary custom sections and decodes kiln.resource_limits — strictly distinguishing absent (Ok(None)) from present-but-malformed (Err, fail loud, never treated as absent). load_module converts the manifest max_memory_usage via EngineResourceLimits::from_max_memory_bytes and feeds it into the SAME SR-46/47/48 pre-instantiate gate (check_declared_minimums) + runtime grow caps (set_runtime_max_pages/set_runtime_max_elements) the CLI --memory path uses, so a module with a manifest and NO CLI flag is bounded. Precedence: CLI + manifest combine via most_restrictive (min) — the operator cannot loosen the signed bound, the module cannot loosen the operator cap. The .unwrap_or(None) masking fallback and the foundation stub extractor are deleted; EngineBuilder::from_binary now selects ASIL mode from the manifest qualified level and fails loud on malformed manifests (it previously always yielded ASIL-D from the stub). NOT yet enforced: max_call_depth/fuel (EngineResourceLimits cannot express them; memory — the WCMC attack surface — is). Verified: manifest_memory_bound_enforced_without_cli_limits, manifest_bound_admits_fitting_module_and_caps_growth, manifest_tighter_than_cli_wins, cli_tighter_than_manifest_wins, malformed_manifest_section_fails_loud, builder_from_binary_fails_loud_on_malformed_manifest, builder_from_binary_selects_manifest_asil_level (kiln-runtime/tests/resource_limits_gate_tests.rs); test_extract_absent_section_is_none, test_extract_present_section_roundtrips, test_extract_malformed_section_is_error, test_extract_non_wasm_binary_is_error (kiln-decoder). --- The WCMC analysis (AD-WCMC-001) found the kiln.resource_limits section is decoded but NEVER APPLIED (capability_engine.rs:561 TODO). DEEPER FINDING this pass: the extraction fn (kiln-foundation/src/execution.rs:144) is ALSO a stub — returns a default and does NOT read the section (the parser from_bytes_with_provider in kiln-decoder/src/resource_limits_section.rs is never called). So SR-45 is a bigger cross-crate wire: (1) make extract scan+parse the section; (2) thread limits to instantiate; (3) apply max_memory_usage -> set_runtime_max_pages (SR-41), max_call_depth -> engine cap. This is the on-target enforcement point the embedded trust chain (AD-WCMC-001) depends on. Own feature loop. AD-WCMC-001. Issue #415.'
tags:
- kiln-runtime
- resource-limits
Expand Down
Loading