summaryrefslogtreecommitdiffstats
path: root/servconf.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2024-10-14 03:57:50 +0200
committerDamien Miller <djm@mindrot.org>2024-10-14 05:01:37 +0200
commit6072e4c9385713e9c166f32cfca6a7e603d4f0b8 (patch)
treeea07b20ea04f48014ec2b958b432e3b6fc0b3b18 /servconf.c
parentupstream: don't start the ObscureKeystrokeTiming mitigations if (diff)
downloadopenssh-6072e4c9385713e9c166f32cfca6a7e603d4f0b8.tar.xz
openssh-6072e4c9385713e9c166f32cfca6a7e603d4f0b8.zip
upstream: Split per-connection sshd-session binary
This splits the user authentication code from the sshd-session binary into a separate sshd-auth binary. This will be executed by sshd-session to complete the user authentication phase of the protocol only. Splitting this code into a separate binary ensures that the crucial pre-authentication attack surface has an entirely disjoint address space from the code used for the rest of the connection. It also yields a small runtime memory saving as the authentication code will be unloaded after thhe authentication phase completes. Joint work with markus@ feedback deraadt@ Tested in snaps since last week OpenBSD-Commit-ID: 9c3b2087ae08626ec31b4177b023db600e986d9c
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/servconf.c b/servconf.c
index dd774f468..2abf2846a 100644
--- a/servconf.c
+++ b/servconf.c
@@ -214,6 +214,7 @@ initialize_server_options(ServerOptions *options)
options->num_channel_timeouts = 0;
options->unused_connection_timeout = -1;
options->sshd_session_path = NULL;
+ options->sshd_auth_path = NULL;
options->refuse_connection = -1;
}
@@ -493,6 +494,8 @@ fill_default_server_options(ServerOptions *options)
options->unused_connection_timeout = 0;
if (options->sshd_session_path == NULL)
options->sshd_session_path = xstrdup(_PATH_SSHD_SESSION);
+ if (options->sshd_auth_path == NULL)
+ options->sshd_auth_path = xstrdup(_PATH_SSHD_AUTH);
if (options->refuse_connection == -1)
options->refuse_connection = 0;
@@ -577,7 +580,7 @@ typedef enum {
sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding,
sExposeAuthInfo, sRDomain, sPubkeyAuthOptions, sSecurityKeyProvider,
sRequiredRSASize, sChannelTimeout, sUnusedConnectionTimeout,
- sSshdSessionPath, sRefuseConnection,
+ sSshdSessionPath, sSshdAuthPath, sRefuseConnection,
sDeprecated, sIgnore, sUnsupported
} ServerOpCodes;
@@ -745,6 +748,7 @@ static struct {
{ "channeltimeout", sChannelTimeout, SSHCFG_ALL },
{ "unusedconnectiontimeout", sUnusedConnectionTimeout, SSHCFG_ALL },
{ "sshdsessionpath", sSshdSessionPath, SSHCFG_GLOBAL },
+ { "sshdauthpath", sSshdAuthPath, SSHCFG_GLOBAL },
{ "refuseconnection", sRefuseConnection, SSHCFG_ALL },
{ NULL, sBadOption, 0 }
};
@@ -2703,6 +2707,10 @@ process_server_config_line_depth(ServerOptions *options, char *line,
charptr = &options->sshd_session_path;
goto parse_filename;
+ case sSshdAuthPath:
+ charptr = &options->sshd_auth_path;
+ goto parse_filename;
+
case sRefuseConnection:
intptr = &options->refuse_connection;
multistate_ptr = multistate_flag;
@@ -3288,6 +3296,7 @@ dump_config(ServerOptions *o)
dump_cfg_string(sRDomain, o->routing_domain);
#endif
dump_cfg_string(sSshdSessionPath, o->sshd_session_path);
+ dump_cfg_string(sSshdAuthPath, o->sshd_auth_path);
dump_cfg_string(sPerSourcePenaltyExemptList, o->per_source_penalty_exempt);
/* string arguments requiring a lookup */