Skip to content

Commit 1986fed

Browse files
committed
Remove documentation related to seccomp support
Signed-off-by: Doru Blânzeanu <dblnz@pm.me>
1 parent 37bdf3d commit 1986fed

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

docs/security.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ All communication between the host and the guest is done through a shared memory
1919
Hyperlight provides a mechanism for the host to register functions that may be called from the guest. This mechanism is useful to allow developers to provide guests with strictly controlled access to functionality we don't make available by default inside the VM. This mechanism likely represents the largest attack surface area of this project.
2020

2121
To mitigate the risk, only functions that have been explicitly exposed to the guest by the host application, are allowed to be called from the guest. Any attempt to call other host functions will result in an error.
22-
23-
Additionally, we provide an API for using Seccomp filters to further restrict the system calls available to the host-provided functions, to help limit the impact of the un-audited or un-managed functions.
Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
# Signal Handling in Hyperlight
22

3-
Hyperlight registers custom signal handlers to intercept and manage specific signals, primarily `SIGSYS` and `SIGRTMIN`. Here's an overview of the registration process:
4-
- **Preserving Old Handlers**: When registering a new signal handler, Hyperlight first retrieves and stores the existing handler using `OnceCell`. This allows Hyperlight to delegate signals to the original handler if necessary.
3+
Hyperlight registers custom signal handlers to intercept and manage specific signals, primarily `SIGRTMIN`. Here's an overview of the registration process:
54
- **Custom Handlers**:
6-
- **`SIGSYS` Handler**: Captures disallowed syscalls enforced by seccomp. If the signal originates from a hyperlight thread, Hyperlight logs the syscall details. Otherwise, it delegates the signal to the previously registered handler.
7-
- **`SIGRTMIN` Handler**: Utilized for inter-thread signaling, such as execution cancellation. Similar to SIGSYS, it distinguishes between application and non-hyperlight threads to determine how to handle the signal.
8-
- **Thread Differentiation**: Hyperlight uses thread-local storage (IS_HYPERLIGHT_THREAD) to identify whether the current thread is a hyperlight thread. This distinction ensures that signals are handled appropriately based on the thread's role.
9-
10-
## Potential Issues and Considerations
11-
12-
### Handler Invalidation
13-
14-
**Issue**: After Hyperlight registers its custom signal handler and preserves the `old_handler`, if the host or another component modifies the signal handler for the same signal, it can lead to:
15-
- **Invalidation of `old_handler`**: The stored old_handler reference may no longer point to a valid handler, causing undefined behavior when Hyperlight attempts to delegate signals.
16-
- **Loss of Custom Handling**: Hyperlight's custom handler might not be invoked as expected, disrupting its ability to enforce syscall restrictions or manage inter-thread signals.
17-
5+
- **`SIGRTMIN` Handler**: Utilized for inter-thread signaling, such as execution cancellation.
6+
- **Killing a sandbox**:
7+
- To stop a sandboxed process, a `SIGRTMIN` signal must be delivered to the thread running the sandboxed code.
8+
- The sandbox provides an interface to obtain an interrupt handle, which includes the thread ID and a method to dispatch the signal.
9+
- Hyperlight uses the `pthread_kill` function to send this signal directly to the targeted thread.

0 commit comments

Comments
 (0)