gwsystems / gwsystems/sledge-serverless-framework

Consider setting a dedicated signal handler stack to make sandbox stack overflows recoverable

Open
#290 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
124
Forks
19
PR merge metrics
No merged PRs in 30d

Description

runtime/include/wasm_stack.h
	int rc        = munmap(stack->buffer, stack->capacity + PAGE_SIZE);
	stack->buffer = NULL;
	if (unlikely(rc == -1)) perror("munmap");
}

Member
@gparmer gparmer yesterday
You have any idea what happens if we set up a signal for SIG_TRAP, then trap out by hitting the guard page here? Normally the signal would execute on the stack....but....

Member
Author
@bushidocodes bushidocodes 21 hours ago
@gparmer - I would assume the signal handler would panic the process or something. I seem to recall that you can consider signal handlers to use a dedicated stack. Perhaps we should be doing that so a module stack overflow is recoverable?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in runtime/include/wasm_stack.h, especially the guard-page stack cleanup shown in the issue, and research how SIG_TRAP handling behaves when execution reaches that guard page. Determine whether a dedicated signal-handler stack is appropriate; the work is done when sandbox stack overflows can be handled recoverably without relying on the exhausted module stack.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, wasm
Domain
operating-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.