Skip to content

Syslog Ingestion M94

Chris Sutton edited this page Nov 30, 2026 · 2 revisions

Published documentation mirror. Edit the source through a repository PR. See Project status.

M9.4 — Authorized network-device syslog ingestion (#81)

Status: accepted native foundation; native IPv4 UDP datagram admission adapter, not an installed listener or operational agentless SIEM. See the network scope requirements, threat register and M9.3 connection telemetry.

Authorization and transport

KnetSentry::SyslogIngestion receives at most one datagram per call from a caller-owned, exclusively accessed, bound and unconnected IPv4 UDP socket. It does not create an IP listener, modify firewall rules, reply, resolve names, forward records, log, or persist received data. The trusted caller configures IP_PKTINFO, the socket lifetime, queue limits, and current immutable policy; remote message fields never supply that authority. Collection and explicit acceptance of unauthenticated UDP must both be enabled, and the current nonzero policy generation must match before receiving. No default listener or port.

Policy requires one exact numeric local address, port, interface name/index and 1–64 distinct numeric sender IPv4 addresses. Empty, duplicate, wildcard, multicast, invalid and out-of-subnet approvals fail closed. The current local address must be attached to exactly one up interface with a contiguous nonzero netmask; sender approvals must be in the same subnet (excluding conventional network and broadcast addresses). This initial on-link profile deliberately excludes routed VLANs; the broader LAN contract still permits them in future. Private versus public address classification is not authorization.

The adapter checks domain, UDP protocol, datagram type, exact bound address/port, IP_PKTINFO and absence of a connected peer. SO_NETNS_COOKIE is compared with a fresh unbound local AF_UNIX socket. Interface traversal is limited to 4096 entries; the OS snapshot allocation and syscall duration are not hard bounded. recvmsg(MSG_DONTWAIT | MSG_TRUNC) supplies sender address/port and actual IP_PKTINFO destination, local delivery address and ingress interface. All must match the configured binding and exact sender list. Missing, truncated or unexpected ancillary data and truncated datagrams are rejected. The socket and address attachment are sampled again before publication. A policy/scope failure before receive does not consume queued data; a rejected received datagram is consumed without publishing an event. No-data is distinct from failure. The caller must replace or discard pending socket queues across policy or topology epochs; the supplied generation is not a kernel arrival epoch. Checks are sampled rather than atomic; the caller must own the descriptor and policy for the entire call and stop/revalidate on topology or consent changes.

Input and privacy contract

The accepted profile is a bounded syslog PRI envelope, not a complete RFC 3164 or RFC 5424 parser. Legacy and versioned-looking bodies are retained only as opaque text, without claiming either full grammar is validated. One UDP datagram is one envelope; 1024 bytes maximum including PRI. The PRI must be <0> through <191>, decimal with no leading zero (except zero itself), followed by a nonempty, nonblank printable ASCII body. NUL, CR, LF, ESC, other control bytes, non-ASCII, malformed PRI and oversized messages are rejected rather than truncated or repaired. Some valid vendor/RFC messages (including Unicode and multiline bodies) are outside this initial profile.

The typed version-1 Event contains receiver acquisition time (CLOCK_REALTIME, not sender or kernel arrival time), policy generation, ingress interface index, observed sender and destination address/port, PRI facility and severity, and datagram size. Facility/severity are sender assertions, not KnetSentry alert severity. Optional opaque body retention requires explicit retain_text consent; the default returns zero text length and zero-filled storage. Even retained printable ASCII can contain sensitive text or markup; it must never be treated as a format string, command, HTML or authenticated hostname. There is no trusted sender timestamp, host, application, process, asset ID or structured-data field. No raw message is emitted to logs or test output. The transient receive buffer is not a secure-erasure guarantee; the caller must protect process memory and any future retained output and apply retention/privacy policies.

Every event is explicitly UnauthenticatedUdp: IP restrictions and local scope do not authenticate the source, prevent spoofing, ensure delivery, confidentiality, freshness, integrity, ordering or replay resistance. A forged message from an allowed IP can pass envelope checks. Never associate an enrolled identity or trigger trusted remediation based solely on such a record. M9.2 remains authoritative for authenticated identity. No acknowledgement or reply is sent. Do not expose plaintext UDP listeners to the public Internet.

Verification and outstanding operational scope

knetsentry_syslog_ingestion_contract uses real ephemeral loopback UDP sockets and two source addresses (127.0.0.1 and 127.0.0.2). It checks consent before queue consumption, sender restriction independent of claimed body, exact kernel address/port/interface, untrusted PRI, text omission and opt-in retention, malformed/control/NUL input, size boundary and oversized recovery, empty and invalid allowlists, off-link sender approval, wrong interface and local address, wildcard and connected sockets, missing packet metadata and invalid descriptor. The fixture prints bounded markers only and never contacts LAN or Internet systems. No privileged fixture is necessary. Cross-namespace rejection, non-loopback ingress, interface/destination race and hostile flood qualification remain outstanding. No claims of hard real-time latency or throughput.

Supports TB-02/TB-03, TH-004/005/006/019, KS-NET-001/003/005/006/007/031/033/041 and TV-03/04/05/13 without changing their requirements. Per-source rate limits, bounded kernel/user queues, explicit drop accounting, stale-source reporting, privilege separation, configuration publication/revocation, routed and IPv6 sources, authenticated TLS syslog, full vendor-specific parsing, durable schema, provenance, admission, retention, querying, alerting and GUI integration are still required for an operational profile. The adapter does not grant agent transport or intelligence egress authorization. Keep issue #81 open for that remaining operational work.

Maintainer qualification (2026-11-29 UTC): 195 local gates, 625 configured CTest executions, 85 structural verifiers, nine hosted checks on 22cede8, and reported manual review/merge. Remaining operational requirements are unchanged.

The LIVE6C device ingress owner adds separately authorized socket ownership and rate limits around this unchanged receive adapter. Neither is activated by an installed service.

The subsequent LIVE6D.4.4 candidate composes the native owner into an explicitly authorized foreground manager device-only lifecycle and separate typed ledger. The original native scope and unauthenticated UDP trust classification remain unchanged.

Clone this wiki locally