Skip to content

Commit a7199c4

Browse files
Add SECURITY.md, CI workflow, and build badge
SECURITY.md documents responsible disclosure policy and lists the two security bugs found via internal fuzzing. GitHub Actions CI builds the full system (supervisor, all shards) and boots in QEMU, verifying the supervisor completes without panic and the fuzz shard passes all tests.
1 parent c4915f1 commit a7199c4

3 files changed

Lines changed: 110 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Rust nightly
16+
uses: dtolnay/rust-toolchain@nightly
17+
with:
18+
components: rust-src
19+
20+
- name: Install system dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y qemu-system-x86 mtools ovmf clang lld
24+
25+
- name: Build and boot
26+
run: |
27+
# Run QEMU with a 30-second timeout — the OS boots, runs all shards
28+
# (including fuzz-syscall), prints profiling summary, and halts.
29+
timeout 30 ./scripts/qemu-run.sh -no-reboot 2>&1 | tee boot.log || true
30+
31+
- name: Verify boot succeeded
32+
run: |
33+
echo "==> Checking boot log..."
34+
35+
# Must reach the halt message
36+
if ! grep -q "all shards completed" boot.log; then
37+
echo "FAIL: supervisor did not complete"
38+
cat boot.log
39+
exit 1
40+
fi
41+
42+
# Must not have a kernel panic
43+
if grep -q "KERNEL PANIC" boot.log; then
44+
echo "FAIL: kernel panic detected"
45+
cat boot.log
46+
exit 1
47+
fi
48+
49+
# Fuzz shard must pass all tests
50+
if grep -q "FAILURES DETECTED" boot.log; then
51+
echo "FAIL: fuzz shard reported failures"
52+
grep "FAIL:" boot.log
53+
exit 1
54+
fi
55+
56+
if grep -q "ALL TESTS PASSED" boot.log; then
57+
echo "OK: fuzz shard passed all tests"
58+
else
59+
echo "WARN: fuzz shard output not found (may not have run)"
60+
fi
61+
62+
echo "==> Boot log summary:"
63+
grep -E "(booting|completed|PASS:|FAIL:|Fuzz Summary|Profiling)" boot.log || true
64+
echo "==> CI passed"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# coconutOS
22

3+
[![CI](https://github.com/coconut-os/coconutOS/actions/workflows/ci.yml/badge.svg)](https://github.com/coconut-os/coconutOS/actions/workflows/ci.yml)
4+
35
A Rust microkernel for GPU-isolated AI inference.
46

57
> **Status:** GPU isolation and inference stack complete — runs a transformer forward pass end-to-end with per-token benchmarking.

SECURITY.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Security Policy
2+
3+
coconutOS is a security-focused microkernel. Isolation guarantees are a core design goal, not a feature — bugs in the syscall boundary, capability system, or GPU isolation are treated with the same severity as data loss.
4+
5+
## Reporting a Vulnerability
6+
7+
If you find a security issue in coconutOS, please report it privately:
8+
9+
1. **Email:** security@raskell.io
10+
2. **GitHub:** Use [Security Advisories](https://github.com/coconut-os/coconutOS/security/advisories/new) to report privately.
11+
12+
Please include:
13+
- Which syscall, capability, or isolation boundary is affected
14+
- A minimal reproduction (a shard binary or syscall sequence that triggers the issue)
15+
- Whether it causes a kernel panic, information leak, privilege escalation, or isolation bypass
16+
17+
## Response
18+
19+
- Acknowledgment within 48 hours
20+
- Fix or mitigation within 7 days for confirmed issues
21+
- Credit in the commit message unless you prefer anonymity
22+
23+
## Scope
24+
25+
The following are in scope:
26+
27+
- **Syscall boundary:** Buffer validation bypass, missing bounds checks, panics from user input
28+
- **Capability system:** Forgery, escalation, revocation bypass
29+
- **GPU isolation:** IOMMU bypass, cross-partition VRAM access, DMA without capability
30+
- **Shard isolation:** Page table escapes, kernel memory reads, side-channel leaks
31+
- **Scheduler:** Priority inversion, starvation, state corruption
32+
33+
Out of scope:
34+
35+
- Denial of service via excessive syscalls (shards are preemptively scheduled)
36+
- Issues in the QEMU emulation layer
37+
- Build system or tooling bugs
38+
39+
## Track Record
40+
41+
coconutOS includes a built-in [fuzz shard](shards/fuzz-syscall/) that exercises all syscall handlers with adversarial inputs on every boot. Two security bugs have been found and fixed through internal fuzzing:
42+
43+
- **User-mode page fault kernel panic** — #PF handler did not check CS RPL, allowing a malicious shard to crash the supervisor by accessing unmapped memory. Fixed in `c4915f1`.
44+
- **mmap gap validation bypass** — Non-contiguous mmap calls created gaps in the data region where buffer validation passed but pages were absent. Fixed in `c4915f1`.

0 commit comments

Comments
 (0)