Skip to content

feat(lab12): kata vs runc isolation + perf + escape PoC#1642

Open
Maflock wants to merge 29 commits into
inno-devops-labs:mainfrom
Maflock:feature/lab12
Open

feat(lab12): kata vs runc isolation + perf + escape PoC#1642
Maflock wants to merge 29 commits into
inno-devops-labs:mainfrom
Maflock:feature/lab12

Conversation

@Maflock

@Maflock Maflock commented Jul 17, 2026

Copy link
Copy Markdown

Goal

Install Kata as a containerd runtime, run the same workload on runc and kata to compare kernel isolation + performance overhead, then (bonus) demonstrate a real container-escape PoC succeeds on runc and fails on kata — the headline value-prop made concrete.

Changes

  • Added submissions/lab12.md
  • Added labs/lab12/results/

Testing

# 1. Verify KVM access and Kata installation
ls -la /dev/kvm && cat /opt/kata/VERSION
# Found: /dev/kvm accessible (crw-rw----+ 1 root kvm), Kata v3.32.0 installed


# 2. Verify both runtimes registered in containerd
grep -A 2 'runtimes.kata' /etc/containerd/config.toml
# Found: kata runtime registered as io.containerd.kata.v2


# 3. Verify kernel isolation — runc shares host kernel, kata uses guest kernel
sudo nerdctl run --rm alpine:3.20 uname -r && sudo nerdctl run --rm --runtime=io.containerd.kata.v2 alpine:3.20 uname -r
# Found: runc shows 6.17.0-40-generic (host kernel), kata shows 6.18.35-kata (guest VM kernel) — separate kernels confirmed


# 4. Verify performance overhead — cold start and I/O throughput
for r in runc kata; do echo "=== $r ==="; for i in 1 2 3 4 5; do START=$(date +%s.%N); sudo nerdctl run --rm ${FLAG} alpine:3.20 echo ok > /dev/null; END=$(date +%s.%N); echo "$(echo "$END - $START" | bc)s"; done; done
# Found: runc avg 0.657s, kata avg 2.152s — ~3.3× cold start overhead, better than Reading 12's expected ~5×


# 5. Verify container escape PoC — runc succeeds, kata fails
sudo nerdctl run --rm --privileged -v /tmp:/host_tmp alpine:3.20 sh -c 'echo "ESCAPED" > /host_tmp/lab12-target' && sudo cat /tmp/lab12-target
# Found: runc container writes directly to host filesystem — ESCAPED confirmed on host

sudo nerdctl run --rm --runtime=io.containerd.kata.v2 --privileged -v /tmp:/host_tmp alpine:3.20 sh -c 'echo "FAILED" > /host_tmp/lab12-target' 2>&1; sudo cat /tmp/lab12-target
# Found: Kata refuses to create container with full host device set — host file unchanged, escape blocked at hypervisor layer


# 6. Cleanup
sudo rm -f /tmp/lab12-target && sudo nerdctl ps -a -q | xargs -r sudo nerdctl rm -f
# All containers removed, host filesystem clean

Artifacts & Screenshots

  • submissions/lab12.md

Checklist

  • Title is clear (feat(lab12): kata vs runc isolation + perf + escape PoC)
  • No secrets/large temp files committed
  • submissions/lab12.md exists
  • Task 1 — Kata installed; both runtimes run; kernel diff documented
  • Task 2 — Isolation + 5-run startup + I/O benchmark with trade-off analysis
  • Bonus — Escape PoC succeeds on runc, fails on Kata (with host-side verification)

Maflock and others added 29 commits June 12, 2026 07:11
feat(lab1): juice shop deploy + PR template + triage report
feat(lab2): Threagile threat model + secure variant + auth flow
feat(lab3): SSH signing + gitleaks pre-commit + history rewrite practice
feat(lab4): juice-shop SBOM + Grype/Trivy comparison + sign-ready attestation
feat(lab5): ZAP baseline + auth + Semgrep + correlation
feat(lab6): Checkov + KICS scans + custom policy
feat(lab7): trivy + PSS restricted + conftest gate
feat(lab8): cosign sign + SBOM/provenance attestations + blob signing
feat(lab9): falco custom rules + conftest hardening policies
feat(lab10): defectdojo governance report + capstone walkthrough
feat(lab11): hardened nginx + WAF sidecar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant