21KB INT8 recurrent net inside Linux 6.12 eBPF catches agent secret exfiltration in 5.65µs

AccBalanced · x · 2026-11-30

Developer superalesha squeezed a 21KB recurrent decision model into Linux 6.12 eBPF LSM hooks, catching AI-agent secret exfiltration in 5.65µs median latency before a packet leaves the machine.

Key architecture: 4 LSM hooks (taskalloc, bprmchecksecurity, fileopen, socketconnect) build a 32-byte feature vector via FNV-1a 3-gram embeddings; a 32-byte recurrent hidden state lives in BPFMAPTYPETASKSTORAGE and survives fork()/execve(); one bounded bpfloop runs a fixed-point INT8×INT8 (64→64→4) forward pass with a 256-byte calibrated sigmoid LUT, outputting 4 calibrated probabilities (exfil risk, evasion chain, benign workflow, uncertainty). Zero floats, zero tail calls, 21,457 verified instructions, all weights in L1 cache, plus zero-downtime double-buffered weight hot-swap.

On 3,840 unseen holdout flows the model hits F1 0.65 / ECE 0.025 on LLM-agent behavior with 5.65µs p50 deny latency, beating rule-based and MLP baselines; a float32 MLP only passes the eBPF verifier 58% of the time. Security teams usually refuse models in the syscall path — fixed-point arithmetic sidesteps the verifier's float restrictions.

Original post →

More from coding & agent

coding & agent channel →