Repository navigation
v0.2.3
Added
-
Inbound filtering. CFC now filters both directions, under one policy:
nothing enters without a rule, and inbound never prompts - an exposed
machine is scanned continuously, and a bubble per inbound SYN would be a
denial of service on the user's attention. A separate opt-in unit
(colony-firewall-nft-inbound) loads a fail-closed chain (policy drop),
guarded twice at start: the daemon must be active, and a lockout pre-flight
refuses to load if a live remote session has no rule to readmit it after a
restart. Theinboundbundle seeds mDNS/LLMNR/DHCP/SSH scoped to private
ranges only. -
In-kernel enforcement that survives the daemon - for new processes too.
The daemon compiles its process-wide deny rules into a pinned kernel table
(EXE_RULES); the exec tracepoint consults it and writes verdicts itself.
Kill the daemon: processes it knew keep their EPERM, and a denied binary
launched afterwards is refused in 0 ms by the kernel alone. The daemon
became a control plane. The exit tracepoint now evicts its own verdicts
(using the kernel'sgroup_dead, resolved from the live tracepoint format),
so the pinned map cannot rot through pid recycling. -
Content-bound rules.
cfc rules add --exe <path> --pin-hashbinds a
rule to the binary's sha256: replace the file and the rule stops applying,
instead of the replacement inheriting the permission. Per-rule and off by
default - a package update revokes such a rule too, by design. -
cfc statusnow reports where enforcement lives (pinned,inherited,
process,unavailable) - losing the kernel layer is otherwise silent. -
eBPF backend. Compiled into the daemon by default; still gated at
runtime by[ebpf] enabled, which remains off. Build without it with
cargo build -p cfc-daemon --no-default-features.
Three kernel programs:sched_process_exec/sched_process_exit
fill a kernel-sourced process table, so attribution no longer races a
short-lived process through/proc;cgroup_skb/ingressobserves the
DNS answers this host actually receives, and those outrank
PTR-derived names in the hostname cache. Verified live on kernel
7.1.8. The daemon degrades tosock_diag+/proc+ PTR whenever the
feature is off, the object is missing, or the load fails. -
colony-firewall-tray: a system-tray icon (StatusNotifierItem, so KDE
and most bars natively; GNOME needs the AppIndicator extension) in the
Windows Firewall Control mold. Shows enforcing / paused / unreachable
at a glance, flags waiting prompts (attention icon + a rate-limited
desktop notification), offers Pause 5 min / 30 min / 1 h / daemon
default and Resume, and opens the GUI on left-click. Autostarts with
the session; quitting the tray never touches the daemon. -
The GUI honors
$CFC_SOCKET, so it can be pointed at a daemon on a
non-default socket (a--dry-runinstance, a test socket) without a
rebuild - the CLI already had--socketfor this. -
bootstrap-defaultsnow also seeds the DHCP clients (dhcpcd,
NetworkManager, systemd-networkd; v4 renewals on 67/udp and DHCPv6 on
547/udp). With enforcement starting before the network is configured,
these are what let astrictmachine get a lease at boot.
Changed
-
Inbound connect latency 2.78 ms -> 0.13 ms (the packet path no longer
performs a socket lookup that cannot succeed for an inbound SYN); daemon
RSS 78 MB -> ~31 MB; 18 threads -> 7; SQLite in WAL at full durability,
2.5x faster event batches. Measured on a veth pair, method in the repo. -
Filtering now starts before the network does. Both units are
orderedBefore=network-pre.target(the systemd firewall convention)
instead of after it: the daemon is listening on the queue and the
nftables table is loaded before NetworkManager, systemd-networkd or
dhcpcd configure a single interface. There is no window at boot where
the network is up but filtering is not. The nft unit alsoWants=the
daemon, so enabling enforcement alone pulls the daemon in.
Fixed
- The inbound bundle opened three UDP ports to the whole internet. Its
mDNS, LLMNR and DHCP entries shipped without a source network, admitting
unicast UDP from any address on earth; the comment above them promised the
opposite. Now one entry per private range, with a bundle-wide test. - A rule scoped to
exe_path = "<unknown>"- the display placeholder for an
unattributable process - matched every unattributable flow, which is every
inbound flow. Four locks: the matcher, the API, load-time, and both UIs. parent_exewas counted in rule precedence but never compared, so a rule
carrying it matched every process while outranking narrower rules. Refused
at the API boundary until it can actually be evaluated.- An unset rule direction now means outbound - its meaning before inbound
filtering existed - instead of silently widening every pre-existing rule
into an inbound admission the day the input chain is enabled. - An unparseable inbound packet takes
inbound_action(which cannot be
Allow) instead ofno_ui_action(which can). - Deleting a deny rule now reliably lifts its in-kernel verdict, including
for processes older than the attribution table's TTL.