feat(lab12): kata vs runc isolation + perf + escape PoC#1573
Open
RanisKhaertdinov wants to merge 36 commits into
Open
feat(lab12): kata vs runc isolation + perf + escape PoC#1573RanisKhaertdinov wants to merge 36 commits into
RanisKhaertdinov wants to merge 36 commits into
Conversation
This reverts commit f6b704e.
feat(lab1): juice shop deployment and CI setup
feat(lab2): Threagile threat model + secure variant + auth flow
feat(lab3): SSH signing + gitleaks pre-commit + history rewrite
feat(lab4): SBOM generation + Grype/Trivy SCA 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
…isk-passthrough conflict on CI)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Install Kata Containers as a containerd runtime, run the same workload on
runcandkataside-by-side to compare kernel isolation and performanceoverhead, and demonstrate a real container-escape PoC that succeeds on
runcbut is blocked onkata.Changes
.github/workflows/lab12-kata.yml— this lab can't run locally (Kata needs a Linux host with/dev/kvm; this machine is a KVM-less macOS laptop). Instead of spinning up a paidcloud VM, the whole lab runs as a GitHub Actions workflow on a standard
ubuntu-latestrunner, which ships with a working/dev/kvm(free for this public repo — the same trickAndroid-emulator CI jobs use). The workflow installs containerd/nerdctl/Kata via the lab's own provided scripts, runs Task 1/2/Bonus end-to-end, and uploads every result as an
artifact.
submissions/lab12.md— full writeup: host/Kata versions, kernel-inside-container comparison,/dev+ capability diffs, 5-run startup benchmark, I/O benchmark, and a three-wayescape PoC comparison (runc succeeds / Kata
--privilegedfails to even start / Kata bind-mount-only still writes through) with an honest threat-model analysis of what Kata doesand doesn't block.
Testing
/dev/kvmpresent,kvm-ok→ "KVM acceleration can be used"containerd.iopackage) via the lab'sinstall-kata-assets.sh/configure-containerd-kata.shscriptsrunccontainer is the host's own kernel (6.17.0-1020-azure); insidekatait's a completely different guest kernel (6.18.35) — confirms the VMboundary is real, not cosmetic
/devand capability sets are nearly identical between runtimes (isolation shows up in the kernel, not in these surface properties) — 5-run startup benchmark shows5.75× overhead for Kata (0.312s vs 1.793s avg), matching Reading 12's "~5×" expectation almost exactly; I/O throughput is close between the two (25.5 vs 21.0 GB/s), confirming
Kata's cost is mostly at startup, not steady-state
runc --privileged+ bind mount overwrites the real host file (verified from a separate host-sidecat); the identical command on Kata fails to even start the sandbox(
Conflicting resource updates for host_major=8 host_minor=1— Kata's privileged-mode device passthrough collides with the CI runner's own root disk already being mounted); afollow-up test with the bind mount only (no
--privileged) shows the write does land on the host under Kata too — correctly identified as expected behavior (bind mounts areexplicit grants on any runtime) rather than claimed as a "block," which shaped the submission's threat-model section
Two real bugs were hit and fixed while building the CI workflow (both explained inline in the workflow and in the submission): containerd couldn't find the Kata shim binary
because it wasn't on containerd's own
PATH(fixed via symlinks into/usr/local/bin), and the--privilegeddisk-passthrough conflict above.Artifacts & Screenshots
No screenshots — all evidence is real command output from the GitHub Actions run, quoted directly in
submissions/lab12.md(kernel diffs, benchmark numbers, escape PoC output,host-side verification). Full logs and downloadable artifacts are on the workflow run itself (
Lab 12 Kata vs runc, run29524188412) in this repo's Actions tab.Checklist
result)