ADD Security options /proc/pid/mem access

This commit is contained in:
2025-03-10 18:30:32 +01:00
parent 9270d2e350
commit ee31579151
5 changed files with 852 additions and 29 deletions

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:32e095c81fc64d2704b960647d31f382917b94cbea1897575c24f3a2e6fe5732
size 2160314
oid sha256:ab8bc78d6b12079a9e4a4c5fbd0820b31aacc455f5e80299991c202ea17ce7fe
size 148931

View File

@@ -9,7 +9,7 @@
% pacman -S hyphen hyphen-de
% pacman -S texlive-mathscience
%\includeonly{linux_configuration_16_file_systems}
\includeonly{linux_configuration_17_security_options}
\documentclass[10pt,a4paper]{article}
%\documentclass[12pt,a4paper]{report}

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,123 @@
% Device Drivers (15)
% since 6.13
\section{Security options \texorpdfstring{$\longrightarrow$}{->}}
\textit{(Sicherheits\-optionen)}
%17.1
\subsection{Enable access key retention support}
CONFIG\_KEYS [=y] \textbf{[Y]}\\
Diese Option bietet Unterstützung für die Aufbewahrung von Authentifizierungs- und Zugriffsschlüsseln im Kernel.\\
Außerdem werden Methoden bereitgestellt, mit denen solche Schlüssel mit einem Prozess verknüpft werden können, so dass Netzwerkdateisysteme,
Verschlüsselungsunterstützung und ähnliches sie finden können.\\
Darüber hinaus gibt es einen speziellen Schlüsseltyp, der als Schlüsselbund fungiert: eine durchsuchbare Folge von Schlüsseln.
Jeder Prozess verfügt über den Zugang zu fünf Standard-Schlüsselbunden: UID-spezifisch, GID-spezifisch, Sitzung, Prozess und Thread.\\
Wenn Sie sich nicht sicher sind, ob dies erforderlich ist, antworten Sie mit N.
\english{This option provides support for retaining authentication tokens and access keys in the kernel.\\
It also includes provision of methods by which such keys might be associated with a process so that network file\-systems, encryption support and the like can find them.\\
Furthermore, a special type of key is available that acts as keyring: a searchable sequence of keys.
Each process is equipped with access to five standard keyrings: UID-specific, GID-specific, session, process and thread.\\
If you are unsure as to whether this is required, answer N.}
\subsubsection{Enable temporary caching of the last request\_key() result}
CONFIG\_KEYS\_REQUEST\_CACHE [=y] \textbf{[Y]}\\
Diese Option bewirkt, dass das Ergebnis des letzten erfolgreichen request\_key()-Aufrufs, der nicht zum Kernel hochgeladen wurde, vorübergehend im task\_struct zwischengespeichert wird.
Der Zwischenspeicher wird beim Beenden und kurz vor der Wiederaufnahme des Userspace geleert.\\
Dies ermöglicht die Verwendung des Schlüssels bei mehrstufigen Prozessen, bei denen jeder Schritt einen Schlüssel anfordert, der wahrscheinlich derselbe ist wie der vom letzten Schritt angeforderte, um die Suche zu sparen.\\
Ein Beispiel für einen solchen Prozess ist ein Pathwalk durch ein Netzwerkdateisystem, bei dem jede Methode einen Authentifizierungsschlüssel anfordern muss.
Pathwalk ruft mehrere Methoden für jede durchquerte Dentry auf (permission, d\_revalidate, lookup, getxattr, getacl, \dots).
\english{This option causes the result of the last successful request\_key() call that didn't upcall to the kernel to be cached temporarily in the task\_struct.
The cache is cleared by exit and just prior to the resumption of userspace.\\
This allows the key used for multiple step processes where each step wants to request a key that is likely the same as the one requested by the last step to save on the searching.\\
An example of such a process is a pathwalk through a network filesystem in which each method needs to request an authentication key.
Pathwalk will call multiple methods for each dentry traversed (permission, d\_revalidate, lookup, getxattr, getacl, \dots).}
\subsubsection{Enable register of persistent per-UID keyrings}
CONFIG\_PERSISTENT\_KEYRINGS [=y] \textbf{[Y]}\\
Diese Option stellt ein Register persistenter Schlüsselringe pro UID bereit, das in erster Linie für die Speicherung von Kerberos-Schlüsseln gedacht ist.
Die Schlüsselringe sind persistent in dem Sinne, dass sie auch dann noch vorhanden sind, wenn alle Prozesse dieser UID beendet sind, und nicht, dass sie den Neustart des Rechners überleben.\
Auf einen bestimmten Schlüsselbund kann entweder der Benutzer, dessen Schlüsselbund es ist, oder ein Prozess mit administrativen Rechten zugreifen.
Die aktiven LSMs können festlegen, welche Prozesse mit Administratorrechten auf den Cache zugreifen dürfen.\\
Schlüsselringe werden bei Bedarf erstellt und in das Register aufgenommen und werden entfernt, wenn sie ablaufen (bei der Erstellung wird eine Standardzeitüberschreitung festgelegt).
\english{This option provides a register of persistent per-UID keyrings, primarily aimed at Kerberos key storage.
The keyrings are persistent in the sense that they stay around after all processes of that UID have exited, not that they survive the machine being rebooted.\\
A particular keyring may be accessed by either the user whose keyring it is or by a process with administrative privileges.
The active LSMs gets to rule on which admin-level processes get to access the cache.\\
Keyrings are created and added into the register upon demand and get removed if they expire (a default timeout is set upon creation).}
\subsubsection{TRUSTED KEYS}
CONFIG\_TRUSTED\_KEYS [=m] \textbf{[M]}\\
Diese Option bietet Unterstützung für das Erstellen, Versiegeln und Entsiegeln von Schlüsseln im Kernel.
Vertrauenswürdige Schlüssel sind symmetrische Schlüssel mit Zufallszahlen, die von einer beim Booten des Kernels ausgewählten Vertrauensquelle erzeugt und versiegelt werden.
Der Userspace wird immer nur verschlüsselte Blobs sehen.\\
Wenn Sie sich nicht sicher sind, ob dies erforderlich ist, antworten Sie mit N.
\english{This option provides support for creating, sealing, and unsealing keys in the kernel.
Trusted keys are random number symmetric keys, generated and sealed by a trust source selected at kernel boot-time.
Userspace will only ever see encrypted blobs.\\
If you are unsure as to whether this is required, answer N.}
\paragraph{TPM-based trusted keys}$~$\\
CONFIG\_TRUSTED\_KEYS\_TPM [=y] \textbf{[Y]}\\
Aktivieren Sie die Verwendung des Trusted Platform Module (TPM) als vertrauenswürdiges Schlüssel-Backend.
Vertrauenswürdige Schlüssel sind symmetrische Schlüssel mit Zufallszahlen,
die vom TPM generiert und RSA-versiegelt werden. Das TPM entsiegelt die Schlüssel nur, wenn die Boot-PCRs und andere Kriterien übereinstimmen.
\english{Enable use of the Trusted Platform Module (TPM) as trusted key backend.
Trusted keys are random number symmetric keys, which will be generated and RSA-sealed by the TPM.
The TPM only unseals the keys, if the boot PCRs and other criteria match.}
\subsubsection{ENCRYPTED KEYS}
CONFIG\_ENCRYPTED\_KEYS [=m] \textbf{[M]}\\
Diese Option bietet Unterstützung für das Erstellen/Entschlüsseln/Entschlüsseln von Schlüsseln im Kernel.
Verschlüsselte Schlüssel werden mit vom Kernel generierten Zufallszahlen oder bereitgestellten entschlüsselten Daten instanziiert und
mit einem symmetrischen \glqq Master\grqq{}-Schlüssel ver-/entschlüsselt.
Der \glqq Master\grqq{}-Schlüssel kann entweder ein vertrauenswürdiger Schlüssel oder ein Benutzerschlüssel sein.
Es werden immer nur verschlüsselte Blobs in den Userspace ausgegeben.
Wenn Sie sich nicht sicher sind, ob dies erforderlich ist, antworten Sie mit N.
\english{This option provides support for create/encrypting/decrypting keys in the kernel.
Encrypted keys are instantiated using kernel generated random numbers or provided decrypted data, and are encrypted/decrypted with a `master' symmetric key.
The `master' key can be either a trusted-key or user-key type.
Only encrypted blobs are ever output to Userspace.\\
If you are unsure as to whether this is required, answer N.}
\paragraph{Allow encrypted keys with user decrypted data}$~$\\
CONFIG\_USER\_DECRYPTED\_DATA [=n] \textbf{[N]}\\
Diese Option bietet Unterstützung für die Instanziierung von verschlüsselten Schlüsseln mit vom Benutzer bereitgestellten entschlüsselten Daten.
Die entschlüsselten Daten müssen in Hex-Ascii kodiert sein.
Wenn Sie sich nicht sicher sind, ob dies erforderlich ist, antworten Sie mit N.
\english{This option provides support for instantiating encrypted keys using user-provided decrypted data.
The decrypted data must be hex-ascii encoded.\\
If you are unsure as to whether this is required, answer N.}
\subsubsection{Diffie-Hellman operations on retained keys}
CONFIG\_KEY\_DH\_OPERATIONS [=y] \textbf{[Y]}\\
Diese Option unterstützt die Berechnung von öffentlichen Diffie-Hellman-Schlüsseln und gemeinsam genutzten Geheimnissen unter Verwendung von Werten,
die als Schlüssel im Kernel gespeichert sind.\\
Wenn Sie sich nicht sicher sind, ob dies erforderlich ist, antworten Sie mit N.
\english{This option provides support for calculating Diffie-Hellman public keys and shared secrets using values stored as keys in the kernel.\\
If you are unsure as to whether this is required, answer N.}
%17.2
\subsection{Restrict unprivileged access to the kernel syslog}
CONFIG\_SECURITY\_DMESG\_RESTRICT [=y] \textbf{[Y]}\\
Dies erzwingt Beschränkungen für unprivilegierte Benutzer, die das Kernel-Syslog über dmesg(8) lesen.\\
Wenn diese Option nicht ausgewählt ist, werden keine Beschränkungen durchgesetzt, es sei denn, die Sysctl dmesg\_restrict ist explizit auf (1) gesetzt.\\
Wenn Sie unsicher sind, wie Sie diese Frage beantworten sollen, antworten Sie mit N.
\english{This enforces restrictions on unprivileged users reading the kernel syslog via dmesg(8).\\
If this option is not selected, no restrictions will be enforced unless the dmesg\_restrict sysctl is explicitly set to (1).\\
If you are unsure how to answer this question, answer N.}
\subsection{Allow /proc/pid/mem access override () \texorpdfstring{$\longrightarrow$}{->}}
\subsubsection{Traditional /proc/pid/mem behavior}
CONFIG\_PROC\_MEM\_ALWAYS\_FORCE [=y] \textbf{[Y]}\\
Damit können die \texttt{/proc/pid/mem}-Zugriffe die Speicherzuordnungsberechtigungen außer Kraft setzen, wenn Sie über ptrace-Zugriffsrechte verfügen.
\english{This allows /proc/pid/mem accesses to override memory mapping permissions if you have ptrace access rights.}
\subsubsection{Require active ptrace() use for access override}
CONFIG\_PROC\_MEM\_FORCE\_PTRACE [=n] \textbf{[N]}\\
Dadurch können /proc/pid/mem-Zugriffe die Speicherzuordnungsberechtigungen für aktive Ptracer wie gdb außer Kraft setzen.
\english{This allows /proc/pid/mem accesses to override memory mapping permissions for active ptracers like gdb.}
\subsubsection{Never}
CONFIG\_PROC\_MEM\_NO\_FORCE [=n] \textbf{[N]}\\
Niemals die Berechtigungen für die Speicherzuordnung außer Kraft setzen.
\english{Never override memory mapping permissions}