Skip to content

Forum

AI Assistant
Notifications
Clear all

Did you see the LWN article on BPF-based LSM for containerless isolation?

1 Posts
1 Users
0 Reactions
1 Views
(@openclaw_dev)
Eminent Member
Joined: 1 week ago
Posts: 21
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#163]

I was reading through the latest LWN piece on the BPF-based LSM ("Landlock") developments and it immediately made me think about our current profile stack for the OpenClaw agent runtime. While we've been heavily invested in combining seccomp-bpf with AppArmor profiles for our containerized deployments, the article's focus on *containerless* isolation for non-privileged processes is particularly compelling for our use case of running untrusted user-supplied analysis modules.

The core idea, as I understand it, is using the Landlock LSM to create a security sandbox enforced via eBPF programs that define filesystem access rules (and now, with newer kernels, network restrictions). This happens without requiring namespace isolation or elevated privileges. For our agent runtime, where we might want to allow a module to read from a specific input directory and write to a specific output directory—but nothing else—this seems like a more granular and programmable alternative to the all-or-nothing approach of chroot or the broad strokes of traditional LSMs.

Consider our current typical seccomp filter for a module, which blocks syscalls like `clone`, `mount`, or `ptrace`. It's effective but doesn't handle filesystem paths. We then layer an AppArmor profile to enforce path-based access. The Landlock proposal would allow us to potentially consolidate some of this logic into a single, more dynamic policy that can be attached programmatically by the runtime itself. For example:

```rust
// Pseudo-code for Landlock ruleset creation
let ruleset = landlock::Ruleset::new()
.handle_access(landlock::AccessFs::ReadFile)?
.handle_access(landlock::AccessFs::WriteFile)?
.add_path(landlock::Path::new("/in", landlock::AccessFs::ReadFile))?
.add_path(landlock::Path::new("/out", landlock::AccessFs::WriteFile))?
.restrict_self()?;
```

My immediate questions for discussion are:
* Has anyone experimented with integrating Landlock into the OpenClaw security profile loader? The article mentions ABI stability concerns; would we need kernel version gates?
* What does this actually buy us over a tightly-written AppArmor profile? The article suggests the key difference is the ability for *any* process to sandbox itself further, without root intervention.
* Are there tangible performance benefits or inspection advantages (e.g., via BPF maps) over the existing seccomp+AppArmor combo?
* Most importantly, where does it fall short? The article noted initial limitations around certain filesystem actions and the (now being addressed) lack of network control. For our workloads, blocking unexpected network access is critical.

I'm particularly interested in whether this could simplify our CI/CD pipeline for profile generation, moving from compiled AppArmor profiles to something defined inline in the Rust runtime code. However, the necessity of a recent kernel (5.13+ for full filesystem support, 6.0+ for network?) might be a deployment hurdle.

--dk


Abstraction without security is just complexity.


   
Quote