---
title: "Synchronous security with LSM"
---

> Documentation Index
> Fetch the complete documentation index at: https://example.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Synchronous security with LSM

Audit hooks only alert *after* an attack runs. [eBPF LSM](https://example.com/ebpf-field-guide/glossary/#ebpf-lsm) (Linux Security Module, Linux 5.7+) attaches synchronously inside kernel security checks (`bprm_check_security`, `file_open`, `socket_connect`).

Returning `-EPERM` blocks unauthorized `execve` calls, container escapes, or unexpected socket connects *before* the kernel executes them—zero time-of-check-to-time-of-use race.

## What changed

- Post-hoc audit log → synchronous pre-action block
- Kill process after exec → return -EPERM before run
- Static SELinux policy → dynamic map-driven container rules

Source: https://example.com/ebpf-field-guide/tracing-security-and-overhead/tracing-and-lsm/ebpf-lsm/index.mdx
