# Process security

---

# Process security

_Peios Kernel / Internals / KACS / Process security_

> Find the Peios kernel articles about process security.

Use these articles to understand process security in the Peios kernel.

- [State and lifetime](</kernel/internals/kacs/process-security/state-and-lifetime.md>)
- [PSB Fields](</kernel/internals/kacs/process-security/psb-fields.md>)
- [Process Security Descriptors](</kernel/internals/kacs/process-security/process-security-descriptors.md>)

---

# State and lifetime

_Peios Kernel / Internals / KACS / Process security_

> The per-process structure describing what a process is, independent of the principal running it.

<a id="trm-3-3-1"></a>

The Process Security Block is a per-process structure carrying
properties that describe **what the process is**, independent of the
principal running it.

Its PIP identity fields, `pip_type` and `pip_trust`, are determined by
the binary loaded at exec ([Binary Signature Verification](</kernel/internals/kacs/executable-trust/signature-verification.md#trm-3-6>)). Its other fields — process
mitigations and process restrictions — are process policy, set by
whoever launches the process. Neither category is token identity, and
neither is determined by the principal.

Keeping the PSB separate from the token is the point. The token
describes identity and travels with impersonation: when a thread
impersonates a client, the effective token changes. The PSB describes
the process, and impersonation never touches it. <a id="cite-psb.impersonation-untouched"></a>

> The PSB is never affected by impersonation. Impersonation changes
> who the thread is acting as. It does not change what the process is.

The canonical PSB reference lives on the task's LSM security blob,
`task_struct->security`, separate from the credential that holds the
token pointer. <a id="cite-psb.canonical-on-task-blob"></a> A mirrored, non-authoritative reference is also kept in
credential security blobs, for the benefit of Linux hooks that receive
only a credential. For any task-attached credential that mirror refers
to the same PSB as the task blob, and it never defines a different
process identity. <a id="cite-psb.cred-mirror-same-psb"></a>

Credentials are swapped during impersonation, and that swap may change
the credential's token pointer — but the canonical PSB is untouched
and any credential-level mirror continues to refer to it. <a id="cite-psb.cred-swap-preserves-psb"></a>

<a id="trm-3-3-4"></a>

<a id="trm-3-3-4-1"></a>

## Fork

The child receives a copy of the parent's PSB with a single exception:
`process_guid` is not copied, and the child is given a new
kernel-generated one. <a id="cite-psb.fork.new-guid"></a> Everything else — the PIP fields, the
mitigations, and any active restrictions — is inherited, so a
Protected process's children start Protected and PIP propagates across
fork. <a id="cite-psb.fork.inherits-rest"></a>

The child also receives a new default process descriptor. Its owner is
the forking thread's **primary** token's user SID, not the
impersonation token's, even when the thread is impersonating at the
time. <a id="cite-psb.fork.sd-owner-primary-token"></a> The DACL follows the default template.

<a id="trm-3-3-4-2"></a>

## Exec

The PIP fields are reset at exec from the new binary's cryptographic
signature. A Protected parent that execs an unsigned binary loses PIP
protection: protection follows the binary, not the lineage. <a id="cite-psb.exec.pip-reset-from-binary"></a>

The mitigation flags — `lsv`, `wxp`, `tlp`, `cfif`, `cfib`, `pie`,
`sml`, `ui_access` — are not reset. They persist across exec
unchanged, so a mitigation set between fork and exec survives whatever
binary is subsequently loaded. <a id="cite-psb.exec.mitigations-persist"></a> `no_child_process` persists in the same
way: a process restricted from creating children stays restricted no
matter what it execs. <a id="cite-psb.exec.no-child-process-persists"></a>

`process_guid` is not reset either, because it identifies the process
— the scheduling entity — rather than the binary. <a id="cite-psb.exec.guid-preserved"></a>

The process descriptor is not reset. Exec preserves it unchanged. <a id="cite-psb.exec.sd-preserved"></a> It
was initialised at fork from the forking thread's primary token and
reflects the process creation context, or a later explicit management
context, rather than the binary being executed. Primary token
installation and the other explicit process-descriptor mutation paths
replace or modify it only under their own rules ([Token Lifecycle](</kernel/internals/kacs/tokens/token-lifecycle.md#trm-3-2-3>)).

<a id="trm-3-3-4-3"></a>

## Clone with CLONE_THREAD

Threads share the process's PSB. <a id="cite-psb.clone-thread.shares-psb"></a> Thread creation is unaffected by
`no_child_process`, which blocks new processes only.

<a id="trm-3-3-4-4"></a>

## Relationship to AccessCheck

The PSB is not an input to AccessCheck in the general case. AccessCheck
takes a token and a descriptor and evaluates access; most PSB fields
are invisible to it.

PIP is the exception. The pipeline includes a PIP enforcement step
reading `pip_type` and `pip_trust`, which come from the PSB rather
than from any token: the enforcement layer extracts them and passes
them to AccessCheck as explicit parameters. <a id="cite-psb.accesscheck.pip-from-psb"></a>

The asymmetry between MIC and PIP follows from that. **MIC** uses the
effective token, so impersonation changes how it evaluates — which is
safe because the integrity ceiling on impersonation ([Impersonation Gates](</kernel/internals/kacs/impersonation/levels-and-admission.md#trm-3-5-2>)) prevents
escalation. **PIP** uses the PSB, so impersonation cannot change how
it evaluates — necessary because there is no impersonation gate
constraining the PIP dimensions, making the PSB the only safe source.

The process mitigations and `no_child_process` do not interact with
AccessCheck at all. Each is enforced at its own enforcement point,
independently of the access control pipeline.

---

# PSB Fields

_Peios Kernel / Internals / KACS / Process security_

> Every PSB field — the process GUID fixed at fork, the protection fields set at exec, the one-way mitigations and the UI access flag.

<a id="trm-3-3-2"></a>

<a id="trm-3-3-2-1"></a>

## Process identity (fixed at fork)

| Field | Type | Description |
|---|---|---|
| `process_guid` | UUID | 128-bit identifier for this process instance, generated by the kernel at fork and immutable for the process's lifetime. It is **not** copied from the parent — every process receives a new one. Used by KMES and kernel-internal consumers for identity stamping and event correlation. <a id="cite-psb.guid.new-and-immutable"></a> |

The process GUID is distinct from the PID. PIDs are recycled; process
GUIDs are unique within a boot, and globally unique in practice. <a id="cite-psb.guid.unique-within-boot"></a> It is
the stable correlation key that lets KMES attribute events to a
process across its whole lifetime.

<a id="trm-3-3-2-2"></a>

## Protection (set at exec, fixed)

| Field | Type | Description |
|---|---|---|
| `pip_type` | u32 | Process Integrity Protection type. Determined by the binary's cryptographic signature at exec. |
| `pip_trust` | uint | Trust tier within a PIP type; higher values can reach lower ones. Determined by the signer's identity. |

PIP fields are signing-based. At exec the kernel verifies the binary's
signature and derives both fields from the signer, using the algorithm
and key model of [Binary Signature Verification](</kernel/internals/kacs/executable-trust/signature-verification.md#trm-3-6>).

Both are plain unsigned integers rather than enumerations, and are
compared numerically. Three type values are conventional — None (0),
Protected (512) and Isolated (1024) — but only two are producible: the
key table validator accepts a key only at exactly Protected with
`PeiosTcb` trust (8192) and rejects the whole table otherwise, so
**Isolated is unreachable** and a signed binary is always
Protected/8192. <a id="cite-psb.pip.only-protected-tcb"></a> Neither None nor Isolated is defined as a named
constant in the public ABI at all. <a id="cite-psb.pip.none-isolated-absent-from-abi"></a> The parent process cannot influence the
determination at all — even a compromised peinit running as SYSTEM
cannot forge PIP protection for an unsigned binary. <a id="cite-psb.pip.parent-cannot-influence"></a> The public
verification key is compiled into the kernel image, and the kernel
only ever verifies; it never signs.

This is a deliberate departure from MS-DTYP, where the parent sets a
protection level at process creation and the kernel validates the
binary's signature against it. Peios removes the parent-controlled
half entirely: one input, one answer.

<a id="trm-3-3-2-3"></a>

## Process mitigations (one-way)

| Field | Description |
|---|---|
| `lsv` | **Library Signature Verification.** Only signed shared libraries load. When the process has `pip_type != None` the library's trust level has to be at or above the process's PIP trust; when `pip_type = None` any valid signature suffices and trust is not compared. <a id="cite-psb.lsv.trust-floor"></a> |
| `wxp` | **Write-XOR-Execute Protection.** No page is simultaneously writable and executable; W+X mappings and transitions between writable and executable are rejected. <a id="cite-psb.wxp.no-write-and-execute"></a> |
| `tlp` | **Trusted Library Paths.** Shared libraries load only from approved directory prefixes. Weaker than LSV, since it trusts the path rather than the binary. <a id="cite-psb.tlp.approved-prefixes-only"></a> |
| `cfif` | **Forward-Edge Control Flow Integrity.** Hardware indirect-branch tracking — Intel IBT, ARM BTI — is locked on and cannot be disabled by the process. Not settable: see below. |
| `cfib` | **Backward-Edge Control Flow Integrity.** The hardware shadow stack, Intel CET, is locked on and cannot be disabled by the process. <a id="cite-psb.cfib.shadow-stack-locked"></a> |
| `pie` | **Position-Independent Executable Requirement.** Non-PIE binaries are rejected at exec, so that ASLR is actually effective. <a id="cite-psb.pie.non-pie-rejected-at-exec"></a> |
| `sml` | **Speculation Mitigation Lock.** Speculation mitigations are locked on and cannot be disabled by the process. <a id="cite-psb.sml.speculation-locked"></a> |

Mitigations are inherited from the parent at fork and can be set by
syscall. They are one-way:
once set they are never cleared, and exec does not reset them — a
mitigation set by the launcher persists regardless of which binary is
loaded. <a id="cite-psb.mitigations.one-way"></a>

Do not infer an additional service policy from peinit launch: the
[source-checked peinit 0.0.12 path](/peios/using-peios/services-and-jobs/identity-and-privileges.md#token-installation-and-executable-trust)
does not make a per-service PSB mitigation request. Inherited and self-applied
flags are separate from that launcher behavior.

Setting a bit is **activation-backed**. Before a mitigation bit moves
from clear to set, KACS either activates the underlying protection for
the target process or verifies that the process already satisfies the
invariant. <a id="cite-psb.mitigations.activation-backed"></a> If any requested mitigation cannot be activated or
verified, the whole operation fails closed without mutating any bit
from that request. <a id="cite-psb.mitigations.all-or-nothing"></a> Once committed, later operations that would disable
the protection or make the process violate the invariant are rejected,
and re-requesting an already-set mitigation never weakens what is
already committed. <a id="cite-psb.mitigations.recommit-never-weakens"></a>

For the runtime memory mitigations, activation covers existing state
as well as future transitions. Enabling `wxp` fails if the process
already has a mapping that is simultaneously writable and executable,
or otherwise already violates the invariant in a way KACS can observe. <a id="cite-psb.wxp.enable-fails-on-existing-wx"></a>
Enabling `tlp` fails if the process already has a file-backed
executable mapping whose kernel-resolved path is missing,
unresolvable, outside the approved prefix cache, or otherwise
TLP-denied. <a id="cite-psb.tlp.enable-fails-on-denied-mapping"></a> Enabling `lsv` fails if the process already has a
file-backed executable mapping whose signing material is missing,
invalid, or below the required PIP trust. <a id="cite-psb.lsv.enable-fails-on-untrusted-mapping"></a> Anonymous executable
mappings are governed by `wxp` alone; `tlp` and `lsv` apply only to
file-backed ones. <a id="cite-psb.mitigations.anonymous-exec-is-wxp-only"></a>

For the architecture-backed mitigations, activation goes through the
architecture's kernel interface to place the process in the protected
state and prevent later process-controlled disablement. Enabling
`cfif`, `cfib`, or `sml` fails closed when the platform cannot make
the protection true for the target. <a id="cite-psb.mitigations.arch-fails-closed"></a>

`sml` also accepts a second route: a platform that reports speculation
as unconditionally not-affected satisfies activation by that fact
alone, with nothing to enable. <a id="cite-psb.sml.not-affected-satisfies"></a>

`cfif` cannot currently be committed at all. Activation against a live
task returns `ENODEV` unconditionally, because the kernel exposes no
userspace control surface for IBT or BTI, so the bit fails closed on
every request. <a id="cite-psb.cfif.enodev-always"></a> `cfib` works, through shadow-stack enable-and-lock,
with one restriction: enabling it on a task other than the caller
fails. <a id="cite-psb.cfib.self-only"></a>

Two mitigations are event-gated rather than retroactive: `pie` is
enforced at subsequent exec and `no_child_process` at subsequent
process creation. <a id="cite-psb.mitigations.event-gated"></a> They still follow the one-way commit rule, and have
to be set before the event they are meant to constrain.

All of this is distinct from PIP. Mitigations are policy set by the
launcher; PIP is a property of the binary determined by the kernel.

The mitigations compose deliberately: LSV ensures only signed
libraries load, WXP blocks code injection, CFIF blocks forward-edge
code reuse through indirect calls and jumps, CFIB blocks
return-oriented programming, and PIE makes ASLR effective. Together
they make exploitation dramatically harder than any one of them alone.

<a id="trm-3-3-2-4"></a>

## UI access (one-way) <a id="cite-psb.ui-access.set-once-fixed"></a>

| Field | Description |
|---|---|
| `ui_access` | Permits interaction with higher-integrity UI elements. Reserved for future desktop functionality. Set by syscall, typically by peinit between fork and exec, and fixed thereafter. |

<a id="trm-3-3-2-5"></a>

## Process restrictions (one-way)

| Field | Description |
|---|---|
| `no_child_process` | Once set, the process creates no child processes — fork, or clone without `CLONE_THREAD`. New threads are unaffected, and the flag is never cleared. <a id="cite-psb.no-child-process.blocks-fork"></a> |

Unlike the exec-time fields, this one can be set at two points. The
parent's code, running in the freshly forked child, can set it before
exec, so the new binary loads with the restriction already in place.
Or a process can restrict itself at any time during its life — after
it has finished spawning its own workers, for instance. <a id="cite-psb.no-child-process.two-set-points"></a>

<a id="trm-3-3-2-6"></a>

## The TLP cache

The approved directory prefixes for TLP live in a global kernel cache
rather than on individual PSBs: the `tlp` flag decides whether a
process is subject to enforcement, while the paths themselves are
machine-wide.

The cache is an array of absolute directory prefix byte strings
evaluated against kernel-resolved Linux path bytes, holding at most 64
entries of at most 4096 bytes each. <a id="cite-psb.tlp.cache-bounds"></a> Every prefix begins with `/` and
**ends** with `/` — so that `/usr/lib/` does not match `/usr/libevil`
— and contains no embedded NUL byte. <a id="cite-psb.tlp.prefix-slash-terminated"></a> An empty, relative,
NUL-containing, or non-slash-terminated prefix is invalid and is
rejected without mutating the existing cache, which is staged and
swapped under a mutex so a rejected update cannot leave it partly
written. <a id="cite-psb.tlp.invalid-prefix-rejected-atomically"></a>

**The cache has no production writer.** The only code that populates
it is a test helper compiled in solely under the KUnit configuration:
there is no syscall, no securityfs node, and no registry path that
fills it. <a id="cite-psb.tlp.no-production-writer"></a> In a shipping build the cache is therefore permanently
empty — and since an empty cache matches no path, enabling `tlp` on a
process denies *every* file-backed executable mapping it subsequently
attempts. <a id="cite-psb.tlp.empty-cache-denies-all"></a>

At `mmap(PROT_EXEC)` time, a process with TLP enabled has the mapped
file's current kernel-resolved backing path checked against every
approved prefix. If the path cannot be resolved, if no prefix matches,
or if the cache is empty, the mapping is rejected. <a id="cite-psb.tlp.mmap-rejects-unmatched"></a>

<a id="trm-3-3-2-7"></a>

## Reading the PSB

`/proc/<pid>/psb` gives a process's PSB as one line of text, in this
order:

```
pip_type=<u32> pip_trust=<u32> mitigations=0x<hex> process_guid=<uuid>
```

`mitigations` is the committed mitigation bitfield in at least three
hexadecimal digits, including `ui_access` and `no_child_process`, with
the bit values of [KACS ABI Reference](</kernel/userspace/native/kacs/generated-syscall-index.md#trm-3-a>). `process_guid` is the 16 bytes in order,
formatted 8-4-4-4-12. <a id="cite-psb.proc.psb-file"></a>

A process reads its own without any check. Reading another process's
needs `PROCESS_QUERY_LIMITED` on its process descriptor, with
`SeDebugPrivilege` rescuing a descriptor denial as it does for every
process right, and **does not** need PIP dominance. That a process is
protected is not a secret every other refusal keeps; it is what a
caller needs to see to understand those refusals. <a id="cite-psb.proc.psb-read-access"></a>

The PSB is otherwise written only: `kacs_set_psb` sets mitigations and
returns nothing about them.

<a id="trm-3-3-2-8"></a>

## Identity virtualization (reserved) <a id="cite-psb.virtualization.reserved"></a>

| Field | Description |
|---|---|
| `virtualization` | Per-process state for setuid compatibility redirection. Not active, and implementations may omit the field until it is. |

---

# Process Security Descriptors

_Peios Kernel / Internals / KACS / Process security_

> The descriptor controlling who may operate on a process — the access rights, signal classification, what bypasses the check, and the default.

<a id="trm-3-3-3"></a>

Every process carries a security descriptor controlling who may
operate on it, stored on the PSB alongside the PIP and mitigation
fields. It replaces Linux's UID-based process access control — a
patchwork of UID comparisons and capabilities — with a single
descriptor evaluation.

<a id="trm-3-3-3-1"></a>

## Process access rights

| Right | Value | Meaning |
|---|---|---|
| `PROCESS_TERMINATE` | 0x0001 | Send signals whose default action is termination. <a id="cite-psb.right.terminate"></a> |
| `PROCESS_SIGNAL` | 0x0002 | Send informational signals whose default action is to ignore: `SIGCHLD`, `SIGURG`, `SIGWINCH`. <a id="cite-psb.right.signal"></a> |
| `PROCESS_VM_READ` | 0x0010 | Read process memory — ptrace peek, `/proc/<pid>/mem`, `process_vm_readv`. <a id="cite-psb.right.vm-read"></a> |
| `PROCESS_VM_WRITE` | 0x0020 | Write process memory — ptrace poke, `/proc/<pid>/mem`, `process_vm_writev`. Includes debugger attach. <a id="cite-psb.right.vm-write"></a> |
| `PROCESS_DUP_HANDLE` | 0x0040 | Extract file descriptors from the process through `pidfd_getfd`. <a id="cite-psb.right.dup-handle"></a> |
| `PROCESS_SET_INFORMATION` | 0x0200 | Change priority, CPU affinity, I/O priority, resource limits, process group membership where Linux permits it, timer slack, memory-placement policy or pages, and mutable `/proc/<pid>` task state — `sched`, `autogroup`, `timens_offsets`, `timerslack_ns`, `coredump_filter`, `oom_adj`, `oom_score_adj`, `make-it-fail`, `fail-nth`, `latency` and `clear_refs`, plus write intent on the coupled `uid_map`, `gid_map`, `projid_map` and `setgroups` seq files. <a id="cite-psb.right.set-information"></a> |
| `PROCESS_QUERY_INFORMATION` | 0x0400 | Inspect the process's token; read the detailed `/proc/<pid>/*` files — `cmdline`, `status`, `io`, `limits`, `sched`, `autogroup`, `timens_offsets`, `personality`, `syscall`, `latency`, `timers`, `timerslack_ns`, `mounts`, `mountinfo`, `mountstats`, `coredump_filter`, `oom_adj`, `oom_score_adj`, `loginuid`, `make-it-fail`, `fail-nth`, `seccomp_cache`, `ksm_merging_pages` and `ksm_stat` — plus read intent on the coupled `uid_map`, `gid_map`, `projid_map` and `setgroups` seq files; query Linux compatibility capability state through `capget(pid)`; and query detailed scheduler, CPU-affinity and I/O-priority state. <a id="cite-psb.right.query-information"></a> |
| `PROCESS_SUSPEND_RESUME` | 0x0800 | Send signals whose default action is to stop or continue. <a id="cite-psb.right.suspend-resume"></a> |
| `PROCESS_QUERY_LIMITED` | 0x1000 | Read basic process information: PID, process group ID, session ID, image name, state, CPU and memory usage — `stat`, `statm`, `comm`, `wchan`, `schedstat`, `cpuset`, `cgroup`, `cpu_resctrl_groups`, `oom_score`, `sessionid`, `patch_state`, `stack_depth`, `arch_status` and `psb`. This is what `ps` and `top` show, it covers `/proc/<pid>/stat`, and it is the right required for `pidfd_open()` and for `kill(pid, 0)` existence probes. <a id="cite-psb.right.query-limited"></a> |
| `READ_CONTROL` | 0x20000 | Read the process's own descriptor. |
| `WRITE_DAC` | 0x40000 | Modify the process's DACL. |
| `WRITE_OWNER` | 0x80000 | Change the descriptor's owner. |

Three `/proc` entries are not where the right names suggest.
`maps`, `fd` and `environ` are not gated by
`PROCESS_QUERY_INFORMATION`: they keep their upstream
`PTRACE_MODE_READ_FSCREDS` gating, which maps to **`PROCESS_VM_READ`**
— reading a process's memory map is treated as reading its memory,
which is defensible but is not what the right's name implies. <a id="cite-psb.proc.maps-fd-environ-are-vm-read"></a> And
`cgroup` sits in the **`PROCESS_QUERY_LIMITED`** set rather than the
detailed one. <a id="cite-psb.proc.cgroup-in-query-limited"></a>

`psb` is the process's PSB, read under `PROCESS_QUERY_LIMITED` with no
PIP dominance ([PSB Fields](</kernel/internals/kacs/process-security/psb-fields.md#trm-3-3-2>)). It is the one `/proc` entry whose check is
KACS's own rather than the metadata rule's.

<a id="trm-3-3-3-2"></a>

## Signal classification <a id="cite-psb.signal.by-default-action"></a>

Each Linux signal maps to a process access right according to its
default action.

Signal 0 is not delivered at all. A `kill()`, `tkill()`, or `tgkill()`
call with signal 0 is an existence and permission probe, requiring
`PROCESS_QUERY_LIMITED` on the target plus PIP dominance. <a id="cite-psb.signal.zero-is-probe"></a>

**`PROCESS_TERMINATE`** — default action terminate, or terminate with
a core dump: <a id="cite-psb.signal.terminate-set"></a>

| Signal | # | Default | Notes |
|---|---|---|---|
| `SIGHUP` | 1 | Terminate | Session hangup |
| `SIGINT` | 2 | Terminate | Ctrl-C |
| `SIGQUIT` | 3 | Terminate + core | Quit request |
| `SIGILL` | 4 | Terminate + core | Illegal instruction |
| `SIGTRAP` | 5 | Terminate + core | Debug trap |
| `SIGABRT` | 6 | Terminate + core | Abort |
| `SIGBUS` | 7 | Terminate + core | Bus error |
| `SIGFPE` | 8 | Terminate + core | Floating point exception |
| `SIGKILL` | 9 | Terminate | Forced kill, cannot be caught |
| `SIGUSR1` | 10 | Terminate | User-defined |
| `SIGSEGV` | 11 | Terminate + core | Segfault |
| `SIGUSR2` | 12 | Terminate | User-defined |
| `SIGPIPE` | 13 | Terminate | Broken pipe |
| `SIGALRM` | 14 | Terminate | Alarm timer |
| `SIGTERM` | 15 | Terminate | Graceful termination request |
| `SIGSTKFLT` | 16 | Terminate | Stack fault |
| `SIGXCPU` | 24 | Terminate + core | CPU time exceeded |
| `SIGXFSZ` | 25 | Terminate + core | File size exceeded |
| `SIGVTALRM` | 26 | Terminate | Virtual timer |
| `SIGPROF` | 27 | Terminate | Profiling timer |
| `SIGIO` | 29 | Terminate | I/O possible |
| `SIGPWR` | 30 | Terminate | Power failure |
| `SIGSYS` | 31 | Terminate + core | Bad syscall |

**`PROCESS_SUSPEND_RESUME`** — default action stop or continue: <a id="cite-psb.signal.suspend-resume-set"></a>

| Signal | # | Default | Notes |
|---|---|---|---|
| `SIGSTOP` | 19 | Stop | Forced stop, cannot be caught |
| `SIGTSTP` | 20 | Stop | Terminal stop, Ctrl-Z |
| `SIGTTIN` | 21 | Stop | Background read from terminal |
| `SIGTTOU` | 22 | Stop | Background write to terminal |
| `SIGCONT` | 18 | Continue | Resume a stopped process |

**`PROCESS_SIGNAL`** — default action ignore: <a id="cite-psb.signal.ignore-set"></a>

| Signal | # | Default | Notes |
|---|---|---|---|
| `SIGCHLD` | 17 | Ignore | Child status change |
| `SIGURG` | 23 | Ignore | Urgent socket data |
| `SIGWINCH` | 28 | Ignore | Window resize |

The real-time signals, `SIGRTMIN` through `SIGRTMAX` (32–64), default
to terminate and therefore require `PROCESS_TERMINATE`. <a id="cite-psb.signal.realtime-terminate"></a>

<a id="trm-3-3-3-2-1"></a>

### What bypasses the check

This classification applies only to signals sent by userspace through
`kill()`, `tkill()`, and `tgkill()`. Kernel-generated signals —
hardware faults such as `SIGSEGV`, `SIGBUS` and `SIGFPE`, `SIGCHLD`
from a child exiting, `SIGPIPE` from a broken pipe — are delivered by
the kernel and bypass the process descriptor check entirely, because
the `task_kill` LSM hook does not fire for kernel-originated delivery. <a id="cite-psb.signal.kernel-generated-bypass"></a>

Terminal-generated job control signals are kernel-originated under
that rule and bypass the check the same way: `SIGINT`, `SIGQUIT` and
`SIGTSTP` from the tty driver's `isig` handling, and `SIGHUP` on
hangup. <a id="cite-psb.signal.tty-isig-bypass"></a> This is intentional. Authorization for keyboard-driven signals
is possession of the controlling terminal, which was gated by the
terminal's file descriptor at open time — so Ctrl-C reaches the whole
foreground process group even when a member of it is more privileged
or more PIP-trusted than whoever holds the terminal. A process that
cannot accept that exposure must not attach to an untrusted
controlling terminal.

The `si_uid` in a delivered signal's `siginfo_t` is the sender's
projected UID ([Credential Projection](</kernel/internals/security/credentials.md#trm-3-10-1>)), captured at send time. <a id="cite-psb.signal.si-uid-projected"></a> Like every projected
credential surface it is informational only and is not an
authorization input; `si_pid` carries the same caveat and is subject
to PID reuse besides.

<a id="trm-3-3-3-3"></a>

## Generic mapping <a id="cite-psb.generic-mapping"></a>

| Generic right | Maps to |
|---|---|
| `GENERIC_READ` | `PROCESS_QUERY_INFORMATION \| PROCESS_VM_READ \| READ_CONTROL` |
| `GENERIC_WRITE` | `PROCESS_SET_INFORMATION \| PROCESS_VM_WRITE \| WRITE_DAC` |
| `GENERIC_EXECUTE` | `PROCESS_TERMINATE \| PROCESS_SUSPEND_RESUME \| PROCESS_QUERY_LIMITED` |
| `GENERIC_ALL` | every process right above, together with `READ_CONTROL`, `WRITE_DAC` and `WRITE_OWNER` |

<a id="trm-3-3-3-4"></a>

## The default process descriptor <a id="cite-psb.sd.default-template"></a>

Every process receives a default descriptor at creation:

```
Owner: <creator's primary token user SID>
Group: <creator's primary token primary group SID>
DACL:
  ALLOW  <process's own user SID>   GENERIC_ALL
  ALLOW  BUILTIN\Administrators     GENERIC_ALL
  ALLOW  SYSTEM                     GENERIC_ALL
  ALLOW  Everyone                   PROCESS_QUERY_LIMITED
```

A process can therefore do anything to itself; Administrators and
SYSTEM have full control over every process; everyone can see basic
process information, which is what makes `ps` and `top` work for all
users; and detailed inspection — token, memory, environment — is
restricted to the process itself, administrators, and SYSTEM.

A service can modify its own descriptor at runtime with
`kacs_set_sd`, which requires `WRITE_DAC` — granted to the process
itself by the default DACL. <a id="cite-psb.sd.set-sd-requires-write-dac"></a> Requesting a custom descriptor *at launch*
through a service definition is not implemented: the only descriptor
creation path always builds the default template, so every process
starts from it and any deviation is a subsequent write. <a id="cite-psb.sd.no-custom-at-launch"></a>

<a id="trm-3-3-3-5"></a>

## How PIP relates to it

PIP and the process descriptor are complementary, and both checks have
to pass. <a id="cite-psb.pip.both-checks-must-pass"></a> The descriptor controls *who* may operate on the process; PIP
controls *what trust level* is required for invasive access to a
protected one. AccessCheck evaluates the caller's token against the
target's descriptor for the requested right, and PIP evaluates the
caller's trust against the target's `pip_type` and `pip_trust` for
operations crossing the process boundary.

The two are genuinely independent. A process may have a permissive
descriptor granting Administrators `GENERIC_ALL` and still be
PIP-protected, so administrators pass the descriptor check and are
stopped only by insufficient PIP trust.

The converse — a process with no PIP protection carrying a restrictive
descriptor that denies even administrators — holds with one
qualification. When a descriptor check denies access and PIP was not
the deciding factor, an enabled `SeDebugPrivilege` on the caller
grants the access anyway and is marked used. <a id="cite-psb.sd.sedebug-overrides-denial"></a> The privilege therefore
rescues a descriptor denial while remaining unable to cross a PIP
boundary, which is exactly the split [Privilege Catalogue](</kernel/internals/kacs/privileges/privilege-catalogue.md#trm-3-4-2>) describes for it.
