CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-VJGJ-42F6-7997
6.0

GHSA-vjgj-42f6-7997: Protection Mechanism Failure via Incomplete Seccomp Sandbox in Netfoil

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 30, 2026·5 min read·5 visits

No Known Exploit

Executive Summary (TL;DR)

Netfoil's `--filter-system-calls` feature fails to apply correctly due to a missing `SYS_RT_SIGACTION` syscall in its seccomp whitelist, leading to application crashes or sandbox bypass. This issue is resolved in version 0.2.1.

Netfoil versions prior to v0.2.1 suffer from a protection mechanism failure where the optional seccomp sandbox causes the application to crash or fails to apply due to an incomplete system call whitelist. This flaw neutralizes the intended defense-in-depth mechanisms, leaving the application with standard runtime privileges.

Vulnerability Overview

Netfoil is a minimal, filtering DNS proxy written in the Go programming language. It incorporates an optional defense-in-depth feature accessed via the --filter-system-calls command-line flag. This feature utilizes seccomp (Secure Computing mode) to apply a strict Berkeley Packet Filter (BPF) whitelist, restricting the system calls the process is permitted to execute post-initialization.

The vulnerability, tracked as GHSA-vjgj-42f6-7997, represents a Protection Mechanism Failure (CWE-693). The implementation of the seccomp filter relies on an incomplete whitelist that omits a critical system call required by the Go runtime. As a result, the application fails to establish the sandbox correctly.

When administrators attempt to harden the Netfoil deployment by enabling the --filter-system-calls flag, the application either crashes immediately upon initialization or fails silently, depending on how the error is handled downstream. This creates a state where the intended security controls are bypassed, leaving the proxy running with the full privileges of the executing user rather than the restricted seccomp profile.

Root Cause Analysis

The root cause of this vulnerability lies in the intersection of the Go runtime's architecture and the strict whitelist approach implemented in Netfoil's seccomp configuration. The applySystemCallFilter function is responsible for defining the array of permitted system calls before applying the BPF profile to the kernel.

The initial implementation omitted unix.SYS_RT_SIGACTION, a system call utilized by the Linux kernel to examine and alter signal actions. The Go runtime heavily depends on this specific syscall for critical internal operations, most notably garbage collection routines and goroutine preemption. The runtime must register signal handlers during execution to manage these concurrent processes effectively.

Once the seccomp filter is active, any attempt by the process to execute an unlisted syscall prompts the kernel to intervene. Because unix.SYS_RT_SIGACTION was absent from the whitelist, the Go runtime's standard operations trigger a violation. The kernel responds by sending a SIGSYS signal to the offending thread, forcing immediate termination of the process before it can process any DNS requests.

Code Analysis

The flaw resides in the cmd/netfoil/main.go file within the applySystemCallFilter function. The vulnerable code constructs a list of allowed system calls using the golang.org/x/sys/unix package but fails to account for the signal handling requirements of the Go runtime.

The patch applied in commit 8c84f1b03adf1df5b4e6d07a49043d13dbbf9ee1 is straightforward. It modifies the whitelist array to explicitly include unix.SYS_RT_SIGACTION. This single addition satisfies the runtime's requirements while maintaining the integrity of the sandbox against unrelated syscall abuse.

// File: cmd/netfoil/main.go
// Excerpt from applySystemCallFilter
 
		unix.SYS_RT_SIGRETURN,
		unix.SYS_RT_SIGPROCMASK,
		unix.SYS_SIGALTSTACK,
+		unix.SYS_RT_SIGACTION, // Added in v0.2.1
 
		// @process
		unix.SYS_CLONE,

The execution flow and failure condition are illustrated in the architecture diagram below. In the vulnerable version, the transition from seccomp application to runtime initialization results in a fatal kernel intervention.

Impact Assessment

The primary security impact of GHSA-vjgj-42f6-7997 is the failure of an intended defense-in-depth mechanism. While this does not directly expose Netfoil to remote code execution or privilege escalation, it severely limits the application's resilience. If a separate vulnerability (such as a buffer overflow or logic flaw) were to be discovered in Netfoil's request parsing logic, the absence of the seccomp sandbox would allow an attacker full access to the underlying system's syscall interface.

Additionally, the vulnerability introduces a localized availability impact. System administrators configuring deployments with strict security baselines will experience immediate service failures when applying the --filter-system-calls flag. This denial of service occurs consistently on startup, preventing the deployment of hardened configurations.

The preliminary CVSS v3.1 vector is estimated at CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L, yielding a base score of 6.0. This score reflects the local nature of the configuration requirement and the dual impact on integrity (sandbox bypass) and availability (crash).

Exploitation and Reproduction

There are no known active exploits or weaponized proofs-of-concept for this vulnerability, as it manifests primarily as a self-inflicted denial of service or passive security degradation. The "exploitation" relies entirely on the configuration state of the application.

To reproduce the vulnerability, an administrator must compile or obtain a Netfoil binary prior to version v0.2.1 on a Linux operating system. Executing the binary with the required parameter demonstrates the failure immediately.

# Reproduction on an affected release
./netfoil --filter-system-calls

Upon execution, the terminal will output a "Bad system call" error message, and the process will exit with a non-zero status code. Analysis using standard debugging tools like strace will reveal the SIGSYS signal being delivered exactly when the runtime invokes rt_sigaction.

Remediation Guidance

The official resolution for this vulnerability is to upgrade Netfoil to version v0.2.1 or later. The patch correctly implements the required system call whitelist, allowing the application to run stably while maintaining the intended seccomp sandbox boundaries.

For environments where immediate patching is not feasible, administrators must remove the --filter-system-calls flag from their startup scripts, systemd unit files, or container entrypoints. While this workaround allows the proxy to function without crashing, it explicitly acknowledges that the application will operate without seccomp protections.

Developers building Go applications with strict system call filtering must ensure they map the language runtime requirements accurately. The Go runtime abstracts many low-level OS interactions, making it critical to use dynamic tracing tools during the development phase to capture all mandatory system calls before finalizing a seccomp whitelist.

Official Patches

Netfoil RepositoryFix Commit 8c84f1b03adf1df5b4e6d07a49043d13dbbf9ee1
Netfoil ReleasesNetfoil v0.2.1 Release

Fix Analysis (1)

Technical Appendix

CVSS Score
6.0/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Affected Systems

Linux systems running Netfoil with the --filter-system-calls flag

Affected Versions Detail

Product
Affected Versions
Fixed Version
netfoil
tinfoil-factory
< v0.2.1v0.2.1
AttributeDetail
Vulnerability ClassProtection Mechanism Failure (CWE-693)
Attack VectorLocal (Configuration-dependent)
CVSS Base Score6.0 (Medium)
ImpactDefense Evasion / Denial of Service
Exploit StatusNone (No exploit required)
Componentnetfoil/seccomp filter

MITRE ATT&CK Mapping

T1562Impair Defenses
Defense Evasion
T1548Abuse Elevation Control Mechanism
Privilege Escalation
CWE-693
Protection Mechanism Failure

The product does not properly specify or configure the protection mechanism, resulting in a failure to apply the intended security policy.

Vulnerability Timeline

Vulnerability Discovered and Fixed
2026-04-21
Patch Committed to netfoil repository
2026-04-21

References & Sources

  • [1]GitHub Advisory Database: GHSA-VJGJ-42F6-7997
  • [2]Project Repository: tinfoil-factory/netfoil
  • [3]Netfoil Security Advisory: GHSA-vjgj-42f6-7997

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.