feat(m0.6-r2): host-owned plugin handle authority
- add PluginHandleTable with owner, run id and generation scoping - reject forged, cross-owner, cross-run and post-unload handles - reject any plugin_handle returned by plugin or foreign-kernel output, including nested values - add ADR-0014 and update value-wire/security specs
This commit is contained in:
1 parent
d940013f35
commit
7797d78d86
8 files changed
+276
-9
No files matched your search
@@ -194,13 +194,21 @@ pub(crate) fn foreign(
|
||||
),
|
||||
));
|
||||
}
|
||||
result.value.ok_or_else(|| {
|
||||
let value = result.value.ok_or_else(|| {
|
||||
RuntimeError::new(
|
||||
ErrorCategory::ForeignFailure,
|
||||
span,
|
||||
"foreign call returned no typed value",
|
||||
)
|
||||
})
|
||||
})?;
|
||||
if crate::handles::contains_plugin_handle(&value) {
|
||||
return Err(RuntimeError::new(
|
||||
ErrorCategory::PermissionDenied,
|
||||
span,
|
||||
"plugin_handle.untrusted: foreign kernel output may not mint host handles",
|
||||
));
|
||||
}
|
||||
Ok(value)
|
||||
}
|
||||
_ => Err(RuntimeError::new(
|
||||
ErrorCategory::Internal,
|
||||
|
||||
Reference in new issue
Block a user