Menu

File Capabilities Narrow Root, but the Wrong Executable Can Widen It
📰

File Capabilities Narrow Root, but the Wrong Executable Can Widen It

DEV Community: security·yutianle·18 days ago
#TUDoAZdZ
#devtosecurity#devto#dev#capabilities#file
Long article (583 words) — no AI summary yet.
Reading 0:00
15s threshold

File Capabilities Narrow Root, but the Wrong Executable Can Widen It

Linux file capabilities let an executable receive a subset of root's powers without running as root. Instead of setting the setuid bit on a binary, an administrator can grant CAP_NET_BIND_SERVICE or another capability to the file. The kernel stores the capability set in a security.capability extended attribute and applies it during execve .

The model is narrower than full root, but it creates a direct relationship between a file and a privilege. A writable or replaceable executable with a powerful capability can become a privilege-escalation path. The risk is greater when a package upgrade, backup restore or deployment tool preserves the extended attribute on a file that is no longer reviewed.

Understand the sets

A process has permitted, effective and inheritable capability sets. File capabilities describe what an executable can add during execution.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.