﻿# A seccomp filter installed in one thread need not cover existing siblings

A practical investigation of a seccomp filter installed in one thread need not cover existing siblings, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-security-seccomp-tsync-sibling-thread-filter/
Language: en

## The operational scenario

A preprocessing worker starts a native thread pool before installing a syscall filter in its main thread. The main thread receives the expected denial, and the release record says the whole worker is restricted. That observation does not establish what existing sibling threads can do. The review must include filter installation timing and thread coverage, not merely the visible process identifier or successful model startup.

## The trust-boundary mechanism

Linux attaches seccomp filters to threads. Allowed child creation inherits the creating thread restrictions, but this does not retrospectively prove identical state for existing siblings. SECCOMP_FILTER_FLAG_TSYNC requests synchronization to the same filter tree. The manual explains that incompatible thread state can make synchronization fail without attaching the new filter. Identical filter programs installed separately are not necessarily the same filter tree for this purpose.

## Define the control contract

Define whether the design installs restrictions before worker threads exist or deliberately synchronizes existing threads. Preserve the selected flags and expected return contract. In the described TSYNC mode, a synchronization failure can return the offending thread ID rather than the ordinary negative error result. Checking only for a negative value can therefore misclassify failed synchronization as successful installation and leave the intended coverage unestablished.

## A step-by-step verification

First build a harmless multithreaded fixture with explicit barriers around thread creation and installation. Select a benign syscall probe whose result the controlled profile makes observable. Test the main thread and a preexisting sibling independently, then a child created by the restricted path where applicable. Repeat through the intended synchronized installation. Preserve the full return value and stop the fixture if installation does not meet its contract.

## Evidence required for acceptance

Acceptance requires per-thread observations tied to launch ordering, the profile identity and installation result. A process-wide smoke test from an unspecified thread is insufficient. Where the review includes a synchronization-failure case, label it as an intentionally constructed fixture and retain the failure outcome without proceeding as though protected. Record permitted operations too, so a general process failure cannot masquerade as a correctly scoped syscall restriction.

## Failure cases and limits

This check is about filter coverage, not proof that a particular profile is a complete sandbox. Kernel documentation explicitly separates syscall filtering from broader logical behavior and information-flow policy. Other restrictions can deny the same probe and need positive controls. A passing thread matrix does not establish safe decoder output, filesystem authorization or the absence of kernel vulnerabilities; those claims require independent evidence.

## Primary references and related reading

Verify filter installation scope and synchronization results before claiming that every worker thread shares the restriction. [Linux seccomp thread synchronization](https://man7.org/linux/man-pages/man2/seccomp.2.html); [Linux seccomp BPF scope and limitations](https://docs.kernel.org/userspace-api/seccomp_filter.html).

The proposed investigation of seccomp tsync sibling thread filter is a proposed control review; no live security test was executed. Related reading: [Operation not permitted in a GPU container: checking seccomp](/journal/container-seccomp-permission-denied/); [Read-only container will not start: where to allow temporary and cache writes](/journal/read-only-container-writable-caches/).
