← Lab /AI/ML

Layered OS defenses stop most self-state attacks on self-hosted AI agents

A layered OS defense stack is effective against the majority of self-state attacks on self-hosted AI agents

AI/ML arXiv 20 Jul 2026 Measurement Prototype evidence

Published as “Self-State Attacks on Self-Hosted AI Agents: How Far Can OS Defenses Go?”

Why it matters

OS-level defenses can substantially reduce the risk of self-state attacks but cannot eliminate it, highlighting the need for complementary semantic defenses.

Summary

A layered OS defense stack-access-control prevention on instruction and configuration layers, workload-conditioned detection on the memory layer, and periodic backup for recovery-effectively blocks most self-state attacks, but a small residual attack surface remains indistinguishable at the OS level. Detection success varies strongly with the workload profile, confirming that some attacks cannot be detected by OS-level monitoring alone.

What they found 3

  1. Layered OS defenses are effective on most attack cells but leave a small indistinguishable residual surface.

    “The empirical results show that a layered defense stack (access-control prevention on the instruction and configuration layers, workloadconditioned detection on the memory layer, and periodic backup for recovery) is effective on most attack cells while a small residual attack surface remains structurally indistinguishable at the OS level.”

  2. Prevention cannot distinguish attack writes from legitimate writes.

    “Claim 1 (Prevention indistinguishability). For an operating system enforcing access control, self-state attacks and legitimate operations cannot be distinguished based solely on their execution traces.”

  3. OS monitoring lacks sufficient information to label a modification as malicious per event.

    “Claim 2. OS monitoring can observe that a self-state modification occurred, but the feature tuple it observes is not sufficient to decide, per event, whether the modification is malicious.”

Caveats 5

  • A significant fraction of self-state attacks are indistinguishable from benign behavior at the system-call level.
  • Detection effectiveness depends strongly on workload context, leaving some cells indistinguishable under certain profiles.
  • Prevention cannot discriminate attack writes from legitimate writes on the same file.
  • Detection cannot infer harmful intent from the observed VFS feature tuple.
  • Recovery inherits the detection limit and incurs data-loss proportional to the backup interval.

What’s new here 4

  • Systematically defines and evaluates self-state attacks, a class not previously studied at the OS layer.
  • Introduces a four-axis attack space (Target, Mechanism, Granularity, Temporal) to map attacks to concrete VFS events.
  • Proposes workload-conditioned anomaly detection to improve OS-level detectability.
  • Provides an empirical evaluation on a real self-hosted agent (OpenClaw) across multiple realistic workloads.