Skip to content
WebsiteHosting.com

concept Linux & administration

seccomp filtering: allow, deny and log decisions

A seccomp filter can block a system call, but allowing it does not grant access to a file or other resource. A logging action is neither a denial nor proof that the operation succeeded.

Latest recorded source check · P0168

What it means

A Linux seccomp filter can stop a system call, but it cannot grant permission that the process does not already have. A system call is a request from a process to the kernel. If the filter allows a call to open a file, the process can make that request; whether it may open that file is a separate decision. A logging action also lets the request proceed. It is not a denial or proof of success.

Try it

Simulation. Start with Matched seccomp filter action set to allow, Underlying syscall permission set to allowed, and Required scenario evidence set to provided. The filter lets the request through, and the stipulated permission allows it. The result is proceed: modeled execution is yes, and the logging action is not selected. No real system call is made.

seccomp filtering: allow, deny and log decisions

Explain scoped syscall filtering and its limits as a defense

Simulation
Modeled outcome: Proceed

Filter permits execution, but kernel permission still determines actual success.

seccomp filtering: allow, deny and log decisions: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Matched filter action and subsequent kernel checks

Filter

  1. Matched actionallow
  2. Log actionNo

Kernel and execution

  1. Kernel permissionallowed
  2. ExecutionYes

Only one already-matched action is modeled. No rule matching, default fallback, filter precedence or permission-changing action is performed.

Evaluated inputs

Required scenario evidence
provided
Matched seccomp filter action
allow
Underlying syscall permission
allowed

Symbolic single filter action; log means selected logging action, not guaranteed audit event; no filter construction, syscall exploits or actual execution.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

  1. Change only the filter action to deny. Modeled execution changes to no. The underlying permission still says allowed, but it is not evaluated: the filter has already stopped the request.
  2. Select log. With permission still allowed, execution is yes again, this time with the logging action selected. Now change only the permission to denied. The branch is still proceed, and the logging action is still selected, but execution changes to no. Here, proceed means past the filter, not operation succeeded.
  3. Choose Reset to restore allow, allowed, and provided.

What the result establishes

The simulation answers two questions in order: Does this filter stop the call? If not, does the underlying permission allow it? The logging indicator answers neither question on its own. It identifies the selected action, not an observed audit record. On Linux, whether the action produces a record depends on logging configuration.

There are two different reasons a result can be unknown. With evidence provided, action allow, and permission unknown, you know the filter lets the request through; it is the permission decision you still need. With evidence missing, neither the action nor the permission is evaluated. The selected values are not findings about the request.

If the matched action is deny, a selected permission of unknown does not make the filter decision unknown: the permission was not reached. With allow and the same unknown permission, execution remains unresolved. This short-circuit does not implement a filter stack or a default rule, so an allow selection must never be read as the fallback for an unmatched syscall.

In practice

Suppose a service cannot open a file and you see allow in one of its seccomp filters. First ask whether that was the effective filter action for the call. When several filters apply, Linux uses the highest-precedence action they return. The simulation starts with one matched action; it does not choose among installed filters. If the effective action was allow, look for evidence about the process's access to the particular file rather than treating the allow rule as a grant. If the effective action blocked the call, that tells you nothing about whether file access would otherwise have been permitted.

Seccomp narrows the set of system calls a process can use. It is not a complete sandbox and does not by itself control where information may flow. Keep your conclusion as narrow as your evidence: identify the effective filter action, then look for the outcome of the operation as a separate fact. If the relevant facts or the system's supported behavior are unknown, stop before changing a real filter or broadening permissions. This example is not a basis for either change.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Does seccomp control all file access?

It filters syscalls, not a complete object permission policy.

Is LOG a denial?

No, its action permits execution subject to other checks.

Can several filters interact?

Yes. Linux uses the highest-precedence action returned by the installed filters. That is separate from other kernel permission and resource checks. The lab starts with one stipulated matched action and does not compute precedence across filters.

Does this execute a syscall?

No. It starts with one stipulated matched action and a permission observation. It neither evaluates rule precedence nor chooses an unmatched-rule fallback, and never invokes or installs a filter.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. seccomp(2)

    Return value; SECCOMP_RET_ALLOW, ERRNO and LOG. Linux seccomp chooses the highest-precedence action returned by installed filters. LOG can permit execution. The lab accepts one stipulated matched action and does not simulate multi-filter precedence.

    Checked .

  2. Linux kernel: Seccomp BPF

    What it isn’t. Linux seccomp narrows the system call surface; it is not by itself a complete sandbox or an information-flow policy.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.