13.3 The Attack Surface

SurfaceReachable byControlsProtected by
Control socketAnything that can connectService lifecycle, shutdownThe socket inode's descriptor, then the peer token and AccessCheck against the target's descriptor
Notification socketAnything that can connectService readiness, watchdog, stored descriptorsThe socket inode's descriptor, then PID matching verified through a pidfd, plus the start generation
Registry keysAnything with registry accessDefinitions, triggers, configurationRegistry key descriptors, enforced by LCS
Machine\System\Init\EnvVars\Anything with registry accessThe environment of every serviceThat key's descriptor, and nothing else — variable names are not filtered
Service cgroupspeinitProcess tracking and clean killOwnership of the hierarchy
Phase 1 mountspeinitVirtual filesystem availabilityHardcoded, no external input
/lcl/policy/autorun.dWhatever can write itArbitrary code as SYSTEM in early bootThe directory's descriptor
Boot attempt counterWhatever can write /.peinit/Recovery mode entryThat file's descriptor
JFS deviceWhatever holds the submission privilegeAd-hoc job submissionA KACS privilege check, kernel-enforced

13.3.1 What the socket descriptors mean in practice #

Both sockets inherit the single-entry descriptor peinit stamps on /run in Phase 1 (§2.3), which grants GENERIC_ALL to SYSTEM and names no other principal.

So both are reachable by SYSTEM alone. A connection from a non-SYSTEM principal is refused at connect(), by the filesystem, before peinit ever obtains a peer token — which means the ACCESS_DENIED path, the audit event, and the Administrators entries in both default descriptors (§4.6, §4.7) are unreachable for such a caller.

Since every service currently receives a SYSTEM token (§4.3), nothing observes this today: every notifier and every client is SYSTEM. The two have to move together, because a service correctly resolved to a non-SYSTEM identity could not reach the notification socket to report that it had started.

13.3.2 The autorun directory #

The Phase 1 autorun step (§2.3) executes every file in /lcl/policy/autorun.d as SYSTEM, before path provisioning and before any service. It is fail-open by design, so nothing about a script going wrong stops the boot.

Its only protection is the descriptor on that directory. Anything that can write there executes as SYSTEM at the earliest point in userspace that exists.

Edit this page