forked from pool/openssh
Compare commits
29 Commits
Author | SHA256 | Date | |
---|---|---|---|
18d888f3cc | |||
35f0e177c1 | |||
19a564c163 | |||
e33b294c28 | |||
7808b8b65c | |||
2eacf2cfde | |||
28522f6381 | |||
291502af75 | |||
0636d865dc | |||
52583b8481 | |||
b867c42e05 | |||
92eb08400f | |||
5697319adc | |||
5ccb79f3f3 | |||
865baddeec | |||
d77e0c9092 | |||
d7201bdb47 | |||
964d8415a2 | |||
5b8687e2a3 | |||
67e6fdb025 | |||
717dd2da2c | |||
33d804a345 | |||
01365117e3 | |||
219dd97d90 | |||
77745960a4 | |||
77273f8679 | |||
fef82d94da | |||
a77a72fabb | |||
3f6eda5c88 |
@@ -1,23 +0,0 @@
|
||||
Index: openssh-9.8p1/sshd-session.c
|
||||
===================================================================
|
||||
--- openssh-9.8p1.orig/sshd-session.c
|
||||
+++ openssh-9.8p1/sshd-session.c
|
||||
@@ -1624,9 +1624,6 @@ cleanup_exit(int i)
|
||||
}
|
||||
}
|
||||
}
|
||||
- /* Override default fatal exit value when auth was attempted */
|
||||
- if (i == 255 && auth_attempted)
|
||||
- _exit(EXIT_AUTH_ATTEMPTED);
|
||||
#ifdef SSH_AUDIT_EVENTS
|
||||
/* done after do_cleanup so it can cancel the PAM auth 'thread' */
|
||||
if (the_active_state != NULL &&
|
||||
@@ -1636,5 +1633,8 @@ cleanup_exit(int i)
|
||||
#endif
|
||||
|
||||
clobber_stack();
|
||||
+ /* Override default fatal exit value when auth was attempted */
|
||||
+ if (i == 255 && auth_attempted)
|
||||
+ _exit(EXIT_AUTH_ATTEMPTED);
|
||||
_exit(i);
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
From fcc66557503124ab98491a598b706a24eb3cf0e1 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Larrosa <alarrosa@suse.com>
|
||||
Date: Mon, 12 Aug 2024 11:32:42 +0200
|
||||
Subject: [PATCH] Fix a small memory leak in process_server_config_line_depth
|
||||
|
||||
The return value of argv_assemble is owned by the caller and should be
|
||||
free'd. When processing the sSubsystem case there are two calls to
|
||||
argv_assemble but only one of them is freed. This patch fixes the small
|
||||
(29 bytes according to valgrind) memory leak.
|
||||
|
||||
The output from valgrind:
|
||||
==115369== 29 bytes in 1 blocks are definitely lost in loss record 573 of 913
|
||||
==115369== at 0x4845794: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
|
||||
==115369== by 0x124A22: argv_assemble (misc.c:2165)
|
||||
==115369== by 0x1385E5: process_server_config_line_depth.constprop.0 (servconf.c:2004)
|
||||
==115369== by 0x13984D: parse_server_config_depth.constprop.0 (servconf.c:3032)
|
||||
==115369== by 0x139986: parse_server_config.constprop.0 (servconf.c:3049)
|
||||
==115369== by 0x111C6E: main (sshd.c:1445)
|
||||
|
||||
Submitted to upstream at https://github.com/openssh/openssh-portable/pull/515
|
||||
---
|
||||
servconf.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/servconf.c b/servconf.c
|
||||
index 5a20d6f8..0b989b95 100644
|
||||
--- a/servconf.c
|
||||
+++ b/servconf.c
|
||||
@@ -2006,6 +2006,7 @@ process_server_config_line_depth(ServerOptions *options, char *line,
|
||||
xasprintf(&options->subsystem_args[options->num_subsystems],
|
||||
"%s%s%s", arg, *arg2 == '\0' ? "" : " ", arg2);
|
||||
free(arg2);
|
||||
+ free(arg);
|
||||
argv_consume(&ac);
|
||||
options->num_subsystems++;
|
||||
break;
|
||||
--
|
||||
2.45.2
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index f0ea07e7b..35dcf45f1 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -56,6 +56,7 @@ SSHDLIBS=@SSHDLIBS@
|
||||
Index: openssh-10.0p1/Makefile.in
|
||||
===================================================================
|
||||
--- openssh-10.0p1.orig/Makefile.in
|
||||
+++ openssh-10.0p1/Makefile.in
|
||||
@@ -64,6 +64,7 @@ SSHDLIBS=@SSHDLIBS@
|
||||
LIBEDIT=@LIBEDIT@
|
||||
LIBFIDO2=@LIBFIDO2@
|
||||
LIBWTMPDB=@LIBWTMPDB@
|
||||
@@ -10,20 +10,20 @@ index f0ea07e7b..35dcf45f1 100644
|
||||
AR=@AR@
|
||||
AWK=@AWK@
|
||||
RANLIB=@RANLIB@
|
||||
@@ -208,7 +209,7 @@ ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
|
||||
@@ -244,7 +245,7 @@ ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SS
|
||||
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(GSSLIBS) $(CHANNELLIBS)
|
||||
|
||||
sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
|
||||
- $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS) $(LIBWTMPDB)
|
||||
+ $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS) $(LIBWTMPDB) $(LIBSYSTEMD)
|
||||
- $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS)
|
||||
+ $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS) $(LIBSYSTEMD)
|
||||
|
||||
sshd-session$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHD_SESSION_OBJS)
|
||||
$(LD) -o $@ $(SSHD_SESSION_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) $(CHANNELLIBS) $(LIBWTMPDB)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a12c6f7ad..860df3379 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1789,6 +1789,47 @@ AC_ARG_WITH([wtmpdb],
|
||||
Index: openssh-10.0p1/configure.ac
|
||||
===================================================================
|
||||
--- openssh-10.0p1.orig/configure.ac
|
||||
+++ openssh-10.0p1/configure.ac
|
||||
@@ -1872,6 +1872,47 @@ AC_ARG_WITH([wtmpdb],
|
||||
)
|
||||
|
||||
|
||||
@@ -71,11 +71,11 @@ index a12c6f7ad..860df3379 100644
|
||||
AUDIT_MODULE=none
|
||||
AC_ARG_WITH([audit],
|
||||
[ --with-audit=module Enable audit support (modules=debug,bsm,linux)],
|
||||
diff --git a/loginrec.c b/loginrec.c
|
||||
index 86caf83b2..8b413190b 100644
|
||||
--- a/loginrec.c
|
||||
+++ b/loginrec.c
|
||||
@@ -191,6 +191,10 @@
|
||||
Index: openssh-10.0p1/loginrec.c
|
||||
===================================================================
|
||||
--- openssh-10.0p1.orig/loginrec.c
|
||||
+++ openssh-10.0p1/loginrec.c
|
||||
@@ -170,6 +170,10 @@
|
||||
# include <wtmpdb.h>
|
||||
#endif
|
||||
|
||||
@@ -86,7 +86,7 @@ index 86caf83b2..8b413190b 100644
|
||||
/**
|
||||
** prototypes for helper functions in this file
|
||||
**/
|
||||
@@ -214,6 +218,9 @@ int syslogin_write_entry(struct logininfo *li);
|
||||
@@ -193,6 +197,9 @@ int syslogin_write_entry(struct logininf
|
||||
#ifdef USE_WTMPDB
|
||||
int wtmpdb_write_entry(struct logininfo *li);
|
||||
#endif
|
||||
@@ -96,7 +96,7 @@ index 86caf83b2..8b413190b 100644
|
||||
|
||||
int getlast_entry(struct logininfo *li);
|
||||
int lastlog_get_entry(struct logininfo *li);
|
||||
@@ -477,6 +484,9 @@ login_write(struct logininfo *li)
|
||||
@@ -456,6 +463,9 @@ login_write(struct logininfo *li)
|
||||
#ifdef USE_WTMPDB
|
||||
wtmpdb_write_entry(li);
|
||||
#endif
|
||||
@@ -106,10 +106,14 @@ index 86caf83b2..8b413190b 100644
|
||||
#ifdef CUSTOM_SYS_AUTH_RECORD_LOGIN
|
||||
if (li->type == LTYPE_LOGIN &&
|
||||
!sys_auth_record_login(li->username,li->hostname,li->line,
|
||||
@@ -1476,6 +1486,91 @@ wtmpdb_write_entry(struct logininfo *li)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1459,6 +1469,100 @@ wtmpdb_write_entry(struct logininfo *li)
|
||||
default:
|
||||
logit("%s: invalid type field", __func__);
|
||||
return (0);
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#ifdef USE_LOGIND
|
||||
+#define DBUS_DESTINATION "org.freedesktop.login1"
|
||||
+#define DBUS_PATH_ID "/org/freedesktop/login1/session/auto"
|
||||
@@ -139,6 +143,7 @@ index 86caf83b2..8b413190b 100644
|
||||
+ "Id", &error, &session_id) < 0)
|
||||
+ {
|
||||
+ logit("logind: cannot get session ID");
|
||||
+ sd_bus_unref(bus);
|
||||
+ return (0);
|
||||
+ }
|
||||
+
|
||||
@@ -150,13 +155,17 @@ index 86caf83b2..8b413190b 100644
|
||||
+ fd = open(tty, O_RDWR|O_CLOEXEC|O_NOCTTY);
|
||||
+
|
||||
+ if (asprintf (&dbus_path, DBUS_PATH, session_id) < 0)
|
||||
+ {
|
||||
+ sd_bus_unref(bus);
|
||||
+ return (0);
|
||||
+ }
|
||||
+
|
||||
+ if (sd_bus_call_method(bus, DBUS_DESTINATION, dbus_path,
|
||||
+ DBUS_INTERFACE, "TakeControl", &error, NULL,
|
||||
+ "b", 1) < 0) {
|
||||
+ logit("logind: cannot take control");
|
||||
+ free(dbus_path);
|
||||
+ sd_bus_unref(bus);
|
||||
+ return (0);
|
||||
+ }
|
||||
+
|
||||
@@ -165,13 +174,17 @@ index 86caf83b2..8b413190b 100644
|
||||
+ "h", fd)) < 0) {
|
||||
+ if (r != -EBADR) /* logind does not support "SetTTY" */
|
||||
+ logit("logind: cannot set TTY(%s, %s): %s", session_id, tty, strerror(-r));
|
||||
+ else
|
||||
+ logit("logind: logind does not support SetTTY (%s, %s): %s", session_id, tty, strerror(-r));
|
||||
+ free(dbus_path);
|
||||
+ sd_bus_unref(bus);
|
||||
+ return (0);
|
||||
+ }
|
||||
+
|
||||
+ free(dbus_path);
|
||||
+
|
||||
+ if (sd_bus_flush(bus) < 0) {
|
||||
+ if (r = sd_bus_flush(bus) < 0) {
|
||||
+ logit("logind: bus flush failed: %s", strerror(-r));
|
||||
+ sd_bus_unref(bus);
|
||||
+ return (0);
|
||||
+ }
|
||||
@@ -191,10 +204,6 @@ index 86caf83b2..8b413190b 100644
|
||||
+ default:
|
||||
+ logit("%s: invalid type field", __func__);
|
||||
+ return (0);
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
|
||||
/**
|
||||
** Low-level libutil login() functions
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
BIN
openssh-10.0p1.tar.gz
(Stored with Git LFS)
Normal file
BIN
openssh-10.0p1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
16
openssh-10.0p1.tar.gz.asc
Normal file
16
openssh-10.0p1.tar.gz.asc
Normal file
@@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEcWi5g4FaXu9ZpK39Kj9BTnNgYLoFAmf2G9sACgkQKj9BTnNg
|
||||
YLotnA//ffB/6FpNdutTHMItUiZC693bQyyOAFGfnSMp6IwTkMdXa0rMdzch0wQ7
|
||||
Uu3qQIeOqah8gd6tTqX4s26OqXflnMJtL2vf1d8zhD1deMJeIKnrJW39hiSLFTsU
|
||||
vgcYXR/02yGpBXkAzm4A7kieW3PkBV9WT/Y2HV1qbHc78vZt76iWuD5AZb4D3WG8
|
||||
5aD/XfLE3a5ZVBrgwPPCaHKjtJY7WMnDMHlX5pdEUAj4wjC9KjRKdbpsg/Tad8DO
|
||||
bhVvT7CqrcJx6Q/qr0/PoTBOIRksB4rKH2XVRu4ZrEI/LN7ghu/rFEYJyiNgtjFK
|
||||
NMaXFc5Ie4uPzEJJ5O0dGHcO5B2LWZbOJE0Cr7d2lJBJfeci3sm34FdKZnK6SDsG
|
||||
j4WETUSKiwogHzhT1oA/Pr8vKWnWy7rbCDHnjRrWWjszR7W3YZ4BT2Rc4hCuh3rC
|
||||
wrt1kGzwgLfCRGWP4QarybGOsNNIFTEZovwLD3Az3p0cnG3XPQsQQ9ZofvhjZgU7
|
||||
g8N/8wndQ72U8Gsmb/KPUeOpO0uMGOUHK3Bl0/apPdF1o54jzHeOy1D76IPZxbjn
|
||||
ystFba6IKA3iLU7P8qe+6oa4Uvi0mHCawKtds4QHlIjy8cXwjXfeF+jRUEimqKeG
|
||||
jw1oF5OLwvF6ZgDkPz2Pcfie6Bee4BBUrLOT9Un+29qDYYCpnR8=
|
||||
=XwX3
|
||||
-----END PGP SIGNATURE-----
|
@@ -104,12 +104,12 @@ Index: openssh-9.6p1/openbsd-compat/port-linux.h
|
||||
#endif
|
||||
|
||||
#ifdef LINUX_OOM_ADJUST
|
||||
Index: openssh-9.6p1/sshd-session.c
|
||||
Index: openssh-9.6p1/sshd-auth.c
|
||||
===================================================================
|
||||
--- openssh-9.6p1.orig/sshd-session.c
|
||||
+++ openssh-9.6p1/sshd-session.c
|
||||
--- openssh-9.6p1.orig/sshd-auth.c
|
||||
+++ openssh-9.6p1/sshd-auth.c
|
||||
@@ -511,7 +511,7 @@ privsep_preauth_child(struct ssh *ssh)
|
||||
demote_sensitive_data(ssh);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_SELINUX
|
||||
- ssh_selinux_change_context("sshd_net_t");
|
||||
|
@@ -81,7 +81,7 @@ Index: openssh-9.3p2/session.c
|
||||
@@ -1487,9 +1495,6 @@ do_pwchange(Session *s)
|
||||
if (s->ttyfd != -1) {
|
||||
fprintf(stderr,
|
||||
"You must change your password now and login again!\n");
|
||||
"You must change your password now and log in again!\n");
|
||||
-#ifdef WITH_SELINUX
|
||||
- setexeccon(NULL);
|
||||
-#endif
|
||||
@@ -98,14 +98,15 @@ Index: openssh-9.3p2/session.c
|
||||
exit(sftp_server_main(i, argv, s->pw));
|
||||
}
|
||||
|
||||
Index: openssh-9.3p2/sshd-session.c
|
||||
Index: openssh-10/sshd-auth.c
|
||||
===================================================================
|
||||
--- openssh-9.3p2.orig/sshd-session.c
|
||||
+++ openssh-9.3p2/sshd-session.c
|
||||
@@ -342,6 +342,10 @@ privsep_preauth_child(struct ssh *ssh)
|
||||
/* Demote the private keys to public keys. */
|
||||
demote_sensitive_data(ssh);
|
||||
|
||||
--- openssh-10.orig/sshd-auth.c
|
||||
+++ openssh-10/sshd-auth.c
|
||||
@@ -200,6 +200,11 @@ privsep_preauth_child(struct ssh *ssh)
|
||||
if ((box = ssh_sandbox_init(pmonitor)) == NULL)
|
||||
fatal_f("ssh_sandbox_init failed");
|
||||
#endif
|
||||
+
|
||||
+#ifdef WITH_SELINUX
|
||||
+ ssh_selinux_change_context("sshd_net_t");
|
||||
+#endif
|
||||
@@ -113,7 +114,11 @@ Index: openssh-9.3p2/sshd-session.c
|
||||
/* Demote the child */
|
||||
if (privsep_chroot) {
|
||||
/* Change our root directory */
|
||||
@@ -444,7 +448,7 @@ privsep_postauth(struct ssh *ssh, Authct
|
||||
Index: openssh-9.3p2/sshd-session.c
|
||||
===================================================================
|
||||
--- openssh-9.3p2.orig/sshd-session.c
|
||||
+++ openssh-9.3p2/sshd-session.c
|
||||
@@ -490,7 +490,7 @@ privsep_postauth(struct ssh *ssh, Authct
|
||||
* fd passing, as AFAIK PTY allocation on this platform doesn't require
|
||||
* special privileges to begin with.
|
||||
*/
|
||||
|
@@ -265,6 +265,19 @@ Index: openssh-9.3p2/sshd-session.c
|
||||
#endif
|
||||
#ifdef USE_PAM
|
||||
if (options.use_pam) {
|
||||
Index: openssh-10.0p1/sshd-auth.c
|
||||
===================================================================
|
||||
--- openssh-10.0p1.orig/sshd-auth.c
|
||||
+++ openssh-10.0p1/sshd-auth.c
|
||||
@@ -122,7 +122,7 @@ char *config_file_name = _PATH_SERVER_CO
|
||||
int debug_flag = 0;
|
||||
|
||||
/* Flag indicating that the daemon is being started from inetd. */
|
||||
-static int inetd_flag = 0;
|
||||
+int inetd_flag = 0;
|
||||
|
||||
/* Saved arguments to main(). */
|
||||
static char **saved_argv;
|
||||
Index: openssh-9.3p2/sshconnect.c
|
||||
===================================================================
|
||||
--- openssh-9.3p2.orig/sshconnect.c
|
||||
|
@@ -7,7 +7,7 @@ Index: openssh-8.8p1/Makefile.in
|
||||
--- openssh-8.8p1.orig/Makefile.in
|
||||
+++ openssh-8.8p1/Makefile.in
|
||||
@@ -26,6 +26,7 @@ SFTP_SERVER=$(libexecdir)/sftp-server
|
||||
SSHD_SESSION=$(libexecdir)/sshd-session
|
||||
SSHD_AUTH=$(libexecdir)/sshd-auth
|
||||
SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
|
||||
SSH_SK_HELPER=$(libexecdir)/ssh-sk-helper
|
||||
+CAVSTEST_CTR=$(libexecdir)/cavstest-ctr
|
||||
@@ -16,7 +16,7 @@ Index: openssh-8.8p1/Makefile.in
|
||||
STRIP_OPT=@STRIP_OPT@
|
||||
@@ -69,6 +70,8 @@ MKDIR_P=@MKDIR_P@
|
||||
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT)
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) sshd-auth$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT) $(SK_STANDALONE)
|
||||
|
||||
+TARGETS += cavstest-ctr$(EXEEXT)
|
||||
+
|
||||
|
@@ -16,7 +16,7 @@ Index: openssh-8.8p1/Makefile.in
|
||||
STRIP_OPT=@STRIP_OPT@
|
||||
@@ -70,7 +71,7 @@ MKDIR_P=@MKDIR_P@
|
||||
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT)
|
||||
TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) sshd-session$(EXEEXT) sshd-auth$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT) $(SK_STANDALONE)
|
||||
|
||||
-TARGETS += cavstest-ctr$(EXEEXT)
|
||||
+TARGETS += cavstest-ctr$(EXEEXT) cavstest-kdf$(EXEEXT)
|
||||
|
@@ -574,8 +574,8 @@ Index: openssh-9.6p1/readconf.c
|
||||
--- openssh-9.6p1.orig/readconf.c
|
||||
+++ openssh-9.6p1/readconf.c
|
||||
@@ -71,6 +71,8 @@
|
||||
#include "myproposal.h"
|
||||
#include "digest.h"
|
||||
#include "version.h"
|
||||
|
||||
+#include "fips.h"
|
||||
+
|
||||
@@ -642,9 +642,9 @@ Index: openssh-9.6p1/servconf.c
|
||||
--- openssh-9.6p1.orig/servconf.c
|
||||
+++ openssh-9.6p1/servconf.c
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "auth.h"
|
||||
#include "myproposal.h"
|
||||
#include "digest.h"
|
||||
#include "version.h"
|
||||
+#include "fips.h"
|
||||
|
||||
#if !defined(SSHD_PAM_SERVICE)
|
||||
@@ -754,7 +754,7 @@ Index: openssh-9.6p1/ssh-keygen.c
|
||||
@@ -3794,6 +3815,15 @@ main(int argc, char **argv)
|
||||
key_type_name = DEFAULT_KEY_TYPE_NAME;
|
||||
|
||||
type = sshkey_type_from_name(key_type_name);
|
||||
type = sshkey_type_from_shortname(key_type_name);
|
||||
+
|
||||
+ /* protocol v1 is not allowed in FIPS mode, DSA is not acceptable because
|
||||
+ * it has to be 1024 bit due to RFC 4253 using SHA-1 which implies 1024 bit
|
||||
@@ -785,14 +785,14 @@ Index: openssh-9.6p1/sshd.c
|
||||
--- openssh-9.6p1.orig/sshd.c
|
||||
+++ openssh-9.6p1/sshd.c
|
||||
@@ -128,6 +128,8 @@
|
||||
#include "addr.h"
|
||||
#include "srclimit.h"
|
||||
#include "atomicio.h"
|
||||
|
||||
+#include "fips.h"
|
||||
+
|
||||
/* Re-exec fds */
|
||||
#define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1)
|
||||
#define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2)
|
||||
#define REEXEC_CONFIG_PASS_FD (STDERR_FILENO + 2)
|
||||
Index: openssh-9.6p1/sshd_config.5
|
||||
===================================================================
|
||||
--- openssh-9.6p1.orig/sshd_config.5
|
||||
|
@@ -444,7 +444,7 @@ Index: openssh-8.8p1/ssh.c
|
||||
|
||||
/* Saves a copy of argv for setproctitle emulation */
|
||||
@@ -632,6 +634,10 @@ main(int ac, char **av)
|
||||
u_int j;
|
||||
struct utsname utsname;
|
||||
struct ssh_conn_info *cinfo = NULL;
|
||||
|
||||
+ /* initialize fips - can go before ssh_malloc_init(), since that is a
|
||||
@@ -459,7 +459,7 @@ Index: openssh-8.8p1/sshd.c
|
||||
--- openssh-8.8p1.orig/sshd.c
|
||||
+++ openssh-8.8p1/sshd.c
|
||||
@@ -1547,6 +1547,10 @@ main(int ac, char **av)
|
||||
struct connection_info connection_info;
|
||||
struct utsname utsname;
|
||||
sigset_t sigmask;
|
||||
|
||||
+ /* initialize fips - can go before ssh_malloc_init(), since that is a
|
||||
|
@@ -128,7 +128,7 @@ Index: openssh-8.9p1/Makefile.in
|
||||
--- openssh-8.9p1.orig/Makefile.in
|
||||
+++ openssh-8.9p1/Makefile.in
|
||||
@@ -27,6 +27,8 @@ SFTP_SERVER=$(libexecdir)/sftp-server
|
||||
SSHD_SESSION=$(libexecdir)/sshd-session
|
||||
SSHD_AUTH=$(libexecdir)/sshd-auth
|
||||
SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
|
||||
SSH_SK_HELPER=$(libexecdir)/ssh-sk-helper
|
||||
+SSH_LDAP_HELPER=$(libexecdir)/ssh-ldap-helper
|
||||
@@ -168,7 +168,7 @@ Index: openssh-8.9p1/Makefile.in
|
||||
$(LD) -o $@ $(SFTPSERVER_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
|
||||
|
||||
@@ -421,6 +429,10 @@ install-files:
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) sshd-session$(EXEEXT) $(DESTDIR)$(SSHD_SESSION)$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) sshd-auth$(EXEEXT) $(DESTDIR)$(SSHD_AUTH)$(EXEEXT)
|
||||
$(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
|
||||
$(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
|
||||
+ if test ! -z "$(INSTALL_SSH_LDAP_HELPER)" ; then \
|
||||
|
@@ -276,8 +276,8 @@ diff -up openssh/monitor.h.role-mls openssh/monitor.h
|
||||
--- openssh/monitor.h.role-mls 2018-08-20 07:57:29.000000000 +0200
|
||||
+++ openssh/monitor.h 2018-08-22 11:14:56.818430941 +0200
|
||||
@@ -55,6 +55,10 @@ enum monitor_reqtype {
|
||||
MONITOR_REQ_GSSCHECKMIC = 48, MONITOR_ANS_GSSCHECKMIC = 49,
|
||||
MONITOR_REQ_TERM = 50,
|
||||
MONITOR_REQ_STATE = 51, MONITOR_ANS_STATE = 52,
|
||||
|
||||
+#ifdef WITH_SELINUX
|
||||
+ MONITOR_REQ_AUTHROLE = 80,
|
||||
|
@@ -5,7 +5,7 @@ index e7549470..b68c1710 100644
|
||||
@@ -109,6 +109,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
|
||||
kex.o kex-names.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
|
||||
kexgexc.o kexgexs.o \
|
||||
kexsntrup761x25519.o sntrup761.o kexgen.o \
|
||||
kexsntrup761x25519.o kexmlkem768x25519.o sntrup761.o kexgen.o \
|
||||
+ kexgssc.o \
|
||||
sftp-realpath.o platform-pledge.o platform-tracing.o platform-misc.o \
|
||||
sshbuf-io.o
|
||||
@@ -19,6 +19,15 @@ index e7549470..b68c1710 100644
|
||||
auth2-gss.o gss-serv.o gss-serv-krb5.o \
|
||||
loginrec.o auth-pam.o auth-shadow.o auth-sia.o \
|
||||
sftp-server.o sftp-common.o \
|
||||
@@ -155,7 +156,7 @@ SSHD_AUTH_OBJS=sshd-auth.o \
|
||||
groupaccess.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
|
||||
auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-pubkeyfile.o \
|
||||
auth2-gss.o gss-serv.o gss-serv-krb5.o \
|
||||
- monitor_wrap.o auth-krb5.o \
|
||||
+ monitor_wrap.o auth-krb5.o kexgsss.o \
|
||||
audit.o audit-bsm.o audit-linux.o platform.o \
|
||||
loginrec.o auth-pam.o auth-shadow.o auth-sia.o \
|
||||
sandbox-null.o sandbox-rlimit.o sandbox-darwin.o \
|
||||
@@ -523,7 +523,7 @@ regress-prep:
|
||||
ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
|
||||
|
||||
@@ -1293,9 +1302,9 @@ index a5ae6ac0..fe714141 100644
|
||||
--- a/kex.h
|
||||
+++ b/kex.h
|
||||
@@ -102,6 +102,15 @@ enum kex_exchange {
|
||||
KEX_ECDH_SHA2,
|
||||
KEX_C25519_SHA256,
|
||||
KEX_KEM_SNTRUP761X25519_SHA512,
|
||||
KEX_KEM_MLKEM768X25519_SHA256,
|
||||
+#ifdef GSSAPI
|
||||
+ KEX_GSS_GRP1_SHA1,
|
||||
+ KEX_GSS_GRP14_SHA1,
|
||||
@@ -2534,11 +2543,11 @@ index 2ce89fe9..ebf76c7f 100644
|
||||
+ {MONITOR_REQ_GSSSIGN, 0, mm_answer_gss_sign},
|
||||
+ {MONITOR_REQ_GSSUPCREDS, 0, mm_answer_gss_updatecreds},
|
||||
+#endif
|
||||
{MONITOR_REQ_STATE, MON_ONCE, mm_answer_state},
|
||||
#ifdef WITH_OPENSSL
|
||||
{MONITOR_REQ_MODULI, 0, mm_answer_moduli},
|
||||
#endif
|
||||
@@ -293,6 +302,10 @@ monitor_child_preauth(struct ssh *ssh, struct monitor *pmonitor)
|
||||
/* Permit requests for moduli and signatures */
|
||||
monitor_permit(mon_dispatch, MONITOR_REQ_STATE, 1);
|
||||
monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
|
||||
monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
|
||||
+#ifdef GSSAPI
|
||||
@@ -2869,9 +2878,9 @@ diff -up a/readconf.c.gsskex b/readconf.c
|
||||
--- a/readconf.c.gsskex 2021-08-20 06:03:49.000000000 +0200
|
||||
+++ b/readconf.c 2021-08-27 12:25:42.556421509 +0200
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "uidswap.h"
|
||||
#include "myproposal.h"
|
||||
#include "digest.h"
|
||||
#include "version.h"
|
||||
+#include "ssh-gss.h"
|
||||
|
||||
#include "fips.h"
|
||||
@@ -3020,9 +3029,9 @@ diff -up a/servconf.c.gsskex b/servconf.c
|
||||
--- a/servconf.c.gsskex 2021-08-20 06:03:49.000000000 +0200
|
||||
+++ b/servconf.c 2021-08-27 12:28:15.887735189 +0200
|
||||
@@ -70,6 +70,7 @@
|
||||
#include "auth.h"
|
||||
#include "myproposal.h"
|
||||
#include "digest.h"
|
||||
#include "version.h"
|
||||
+#include "ssh-gss.h"
|
||||
#include "fips.h"
|
||||
|
||||
@@ -3297,8 +3306,8 @@ index 60de6087..db5c65bc 100644
|
||||
--- a/ssh.1
|
||||
+++ b/ssh.1
|
||||
@@ -503,7 +503,13 @@ For full details of the options listed below, and their possible values, see
|
||||
.It GatewayPorts
|
||||
.It GlobalKnownHostsFile
|
||||
.It ForwardX11Timeout
|
||||
.It ForwardX11Trusted
|
||||
.It GSSAPIAuthentication
|
||||
+.It GSSAPIKeyExchange
|
||||
+.It GSSAPIClientIdentity
|
||||
@@ -3307,9 +3316,9 @@ index 60de6087..db5c65bc 100644
|
||||
+.It GSSAPIRenewalForcesRekey
|
||||
+.It GSSAPIServerIdentity
|
||||
+.It GSSAPITrustDns
|
||||
.It GatewayPorts
|
||||
.It GlobalKnownHostsFile
|
||||
.It HashKnownHosts
|
||||
.It Host
|
||||
.It HostbasedAcceptedAlgorithms
|
||||
@@ -624,6 +624,8 @@
|
||||
(supported message integrity codes),
|
||||
.Ar kex
|
||||
@@ -3488,7 +3497,7 @@ index af00fb30..03bc87eb 100644
|
||||
|
||||
free(hkalgs);
|
||||
|
||||
@@ -224,14 +256,44 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port)
|
||||
@@ -224,15 +256,45 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port)
|
||||
# ifdef OPENSSL_HAS_ECC
|
||||
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
|
||||
# endif
|
||||
@@ -3507,6 +3516,7 @@ index af00fb30..03bc87eb 100644
|
||||
+#endif /* WITH_OPENSSL */
|
||||
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
|
||||
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
|
||||
ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client;
|
||||
ssh->kex->verify_host_key=&verify_host_key_callback;
|
||||
|
||||
+#if defined(GSSAPI) && defined(WITH_OPENSSL)
|
||||
@@ -3690,7 +3700,11 @@ index 60b2aaf7..d92f03aa 100644
|
||||
sshpkt_fatal(ssh, r, "%s: send", __func__);
|
||||
sshbuf_free(buf);
|
||||
}
|
||||
@@ -2347,6 +2348,48 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
diff --git a/sshd-auth.c b/sshd-auth.c
|
||||
index 60b2aaf7..d92f03aa 100644
|
||||
--- a/sshd-auth.c
|
||||
+++ b/sshd-auth.c
|
||||
@@ -840,6 +840,48 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
|
||||
free(hkalgs);
|
||||
|
||||
@@ -3739,11 +3753,11 @@ index 60b2aaf7..d92f03aa 100644
|
||||
/* start key exchange */
|
||||
if ((r = kex_setup(ssh, myproposal)) != 0)
|
||||
fatal_r(r, "kex_setup");
|
||||
@@ -2362,7 +2405,18 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
#ifdef OPENSSL_HAS_ECC
|
||||
@@ -855,7 +898,18 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
# ifdef OPENSSL_HAS_ECC
|
||||
kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
|
||||
#endif
|
||||
-#endif
|
||||
# endif /* OPENSSL_HAS_ECC */
|
||||
-#endif /* WITH_OPENSSL */
|
||||
+# ifdef GSSAPI
|
||||
+ if (options.gss_keyex) {
|
||||
+ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
|
||||
@@ -3758,7 +3772,7 @@ index 60b2aaf7..d92f03aa 100644
|
||||
+#endif /* WITH_OPENSSL */
|
||||
kex->kex[KEX_C25519_SHA256] = kex_gen_server;
|
||||
kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
|
||||
kex->load_host_public_key=&get_hostkey_public_by_type;
|
||||
kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
|
||||
diff --git a/sshd_config b/sshd_config
|
||||
index 19b7c91a..2c48105f 100644
|
||||
--- a/sshd_config
|
||||
|
@@ -3,7 +3,7 @@ Index: openssh-8.9p1/Makefile.in
|
||||
--- openssh-8.9p1.orig/Makefile.in
|
||||
+++ openssh-8.9p1/Makefile.in
|
||||
@@ -116,7 +116,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
|
||||
kexsntrup761x25519.o sntrup761.o kexgen.o \
|
||||
kexsntrup761x25519.o kexmlkem768x25519.o sntrup761.o kexgen.o \
|
||||
kexgssc.o \
|
||||
sftp-realpath.o platform-pledge.o platform-tracing.o platform-misc.o \
|
||||
- sshbuf-io.o
|
||||
@@ -1122,7 +1122,7 @@ Index: openssh-8.9p1/monitor.c
|
||||
#include "ssherr.h"
|
||||
#include "sk-api.h"
|
||||
@@ -107,6 +108,8 @@ extern u_int utmp_len;
|
||||
extern struct sshbuf *loginmsg;
|
||||
extern struct include_list includes;
|
||||
extern struct sshauthopt *auth_opts; /* XXX move to permanent ssh->authctxt? */
|
||||
|
||||
+extern void destroy_sensitive_data(struct ssh *);
|
||||
@@ -1878,12 +1878,9 @@ Index: openssh-8.9p1/session.c
|
||||
#endif
|
||||
if (s->ttyfd != -1)
|
||||
ret = do_exec_pty(ssh, s, command);
|
||||
@@ -1550,8 +1562,11 @@ do_child(struct ssh *ssh, Session *s, co
|
||||
sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
|
||||
@@ -1550,6 +1562,9 @@ do_child(struct ssh *ssh, Session *s, co
|
||||
|
||||
/* remove hostkey from the child's memory */
|
||||
- destroy_sensitive_data();
|
||||
+ destroy_sensitive_data(ssh);
|
||||
/* remove keys from memory */
|
||||
ssh_packet_clear_keys(ssh);
|
||||
+ /* Don't audit this - both us and the parent would be talking to the
|
||||
+ monitor over a single socket, with no synchronization. */
|
||||
@@ -2075,9 +2072,9 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
#endif
|
||||
#include "monitor_wrap.h"
|
||||
+#include "audit.h"
|
||||
#include "ssh-sandbox.h"
|
||||
#include "auth-options.h"
|
||||
#include "version.h"
|
||||
#include "ssherr.h"
|
||||
@@ -265,8 +266,8 @@ struct sshbuf *loginmsg;
|
||||
struct sshbuf *loginmsg;
|
||||
|
||||
@@ -2086,9 +2083,9 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
-void demote_sensitive_data(void);
|
||||
+void destroy_sensitive_data(struct ssh *);
|
||||
+void demote_sensitive_data(struct ssh *);
|
||||
static void do_ssh2_kex(struct ssh *);
|
||||
|
||||
/*
|
||||
/* XXX reduce to stub once postauth split */
|
||||
int
|
||||
@@ -382,18 +383,40 @@ grace_alarm_handler(int sig)
|
||||
_exit(EXIT_LOGIN_GRACE);
|
||||
}
|
||||
@@ -2173,42 +2170,42 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
}
|
||||
/* Certs do not need demotion */
|
||||
}
|
||||
@@ -443,7 +489,7 @@ reseed_prngs(void)
|
||||
}
|
||||
|
||||
static void
|
||||
-privsep_preauth_child(void)
|
||||
+privsep_preauth_child(struct ssh *ssh)
|
||||
{
|
||||
gid_t gidset[1];
|
||||
|
||||
@@ -458,7 +504,7 @@ privsep_preauth_child(void)
|
||||
reseed_prngs();
|
||||
|
||||
/* Demote the private keys to public keys. */
|
||||
- demote_sensitive_data();
|
||||
+ demote_sensitive_data(ssh);
|
||||
|
||||
/* Demote the child */
|
||||
if (privsep_chroot) {
|
||||
@@ -493,7 +539,7 @@ privsep_preauth(struct ssh *ssh)
|
||||
pmonitor->m_pkex = &ssh->kex;
|
||||
|
||||
box = ssh_sandbox_init(pmonitor);
|
||||
- pid = fork();
|
||||
+ pmonitor->m_pid = pid = fork();
|
||||
if (pid == -1) {
|
||||
fatal("fork of unprivileged child failed");
|
||||
} else if (pid != 0) {
|
||||
@@ -538,7 +584,7 @@ privsep_preauth(struct ssh *ssh)
|
||||
/* Arrange for logging to be sent to the monitor */
|
||||
set_log_handler(mm_log_handler, pmonitor);
|
||||
|
||||
- privsep_preauth_child();
|
||||
+ privsep_preauth_child(ssh);
|
||||
setproctitle("%s", "[net]");
|
||||
if (box != NULL)
|
||||
ssh_sandbox_child(box);
|
||||
#@@ -443,7 +489,7 @@ reseed_prngs(void)
|
||||
# }
|
||||
#
|
||||
# static void
|
||||
#-privsep_preauth_child(void)
|
||||
#+privsep_preauth_child(struct ssh *ssh)
|
||||
# {
|
||||
# gid_t gidset[1];
|
||||
#
|
||||
#@@ -458,7 +504,7 @@ privsep_preauth_child(void)
|
||||
# reseed_prngs();
|
||||
#
|
||||
# /* Demote the private keys to public keys. */
|
||||
#- demote_sensitive_data();
|
||||
#+ demote_sensitive_data(ssh);
|
||||
#
|
||||
# /* Demote the child */
|
||||
# if (privsep_chroot) {
|
||||
#@@ -493,7 +539,7 @@ privsep_preauth(struct ssh *ssh)
|
||||
# pmonitor->m_pkex = &ssh->kex;
|
||||
#
|
||||
# box = ssh_sandbox_init(pmonitor);
|
||||
#- pid = fork();
|
||||
#+ pmonitor->m_pid = pid = fork();
|
||||
# if (pid == -1) {
|
||||
# fatal("fork of unprivileged child failed");
|
||||
# } else if (pid != 0) {
|
||||
#@@ -538,7 +584,7 @@ privsep_preauth(struct ssh *ssh)
|
||||
# /* Arrange for logging to be sent to the monitor */
|
||||
# set_log_handler(mm_log_handler, pmonitor);
|
||||
#
|
||||
#- privsep_preauth_child();
|
||||
#+ privsep_preauth_child(ssh);
|
||||
# setproctitle("%s", "[net]");
|
||||
# if (box != NULL)
|
||||
# ssh_sandbox_child(box);
|
||||
@@ -582,7 +628,7 @@ privsep_postauth(struct ssh *ssh, Authct
|
||||
pmonitor->m_sendfd = -1;
|
||||
|
||||
@@ -2218,7 +2215,7 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
|
||||
reseed_prngs();
|
||||
|
||||
@@ -2311,6 +2358,9 @@ main(int ac, char **av)
|
||||
@@ -1352,6 +1398,9 @@ main(int ac, char **av)
|
||||
do_authenticated(ssh, authctxt);
|
||||
|
||||
/* The connection has been terminated. */
|
||||
@@ -2228,7 +2225,7 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
ssh_packet_get_bytes(ssh, &ibytes, &obytes);
|
||||
verbose("Transferred: sent %llu, received %llu bytes",
|
||||
(unsigned long long)obytes, (unsigned long long)ibytes);
|
||||
@@ -2491,6 +2541,15 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
@@ -1397,6 +1446,15 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
void
|
||||
cleanup_exit(int i)
|
||||
{
|
||||
@@ -2244,8 +2241,8 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
extern int auth_attempted; /* monitor.c */
|
||||
|
||||
if (the_active_state != NULL && the_authctxt != NULL) {
|
||||
@@ -2525,7 +2593,9 @@ cleanup_exit(int i)
|
||||
_exit(EXIT_AUTH_ATTEMPTED);
|
||||
@@ -1413,7 +1471,9 @@ cleanup_exit(int i)
|
||||
}
|
||||
#ifdef SSH_AUDIT_EVENTS
|
||||
/* done after do_cleanup so it can cancel the PAM auth 'thread' */
|
||||
- if (the_active_state != NULL && mm_is_monitor())
|
||||
@@ -2254,12 +2251,22 @@ Index: openssh-8.9p1/sshd-session.c
|
||||
+ mm_is_monitor())
|
||||
audit_event(the_active_state, SSH_CONNECTION_ABANDON);
|
||||
#endif
|
||||
_exit(i);
|
||||
/* Override default fatal exit value when auth was attempted */
|
||||
Index: openssh-8.9p1/sshkey.c
|
||||
===================================================================
|
||||
--- openssh-8.9p1.orig/sshkey.c
|
||||
+++ openssh-8.9p1/sshkey.c
|
||||
@@ -400,6 +400,38 @@ sshkey_type_is_valid_ca(int type)
|
||||
@@ -35,6 +35,9 @@ sshkey_type_is_valid_ca(int type)
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/pem.h>
|
||||
+# if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
|
||||
+# include <openssl/core_names.h>
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#include "crypto_api.h"
|
||||
@@ -400,6 +403,53 @@ sshkey_type_is_valid_ca(int type)
|
||||
}
|
||||
|
||||
int
|
||||
@@ -2267,23 +2274,38 @@ Index: openssh-8.9p1/sshkey.c
|
||||
+{
|
||||
+ switch (k->type) {
|
||||
+#ifdef WITH_OPENSSL
|
||||
+# if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
|
||||
+ case KEY_RSA_CERT:
|
||||
+ case KEY_RSA: {
|
||||
+ const BIGNUM *d;
|
||||
+ RSA_get0_key(k->rsa, NULL, NULL, &d);
|
||||
+ case KEY_RSA:
|
||||
+ case KEY_ECDSA_CERT:
|
||||
+ case KEY_ECDSA: {
|
||||
+ BIGNUM *d = NULL;
|
||||
+ EVP_PKEY_get_bn_param(k->pkey, OSSL_PKEY_PARAM_PRIV_KEY, &d);
|
||||
+ return d != NULL;
|
||||
+ }
|
||||
+# else /* OPENSSL < 3.0.0 */
|
||||
+ case KEY_RSA_CERT:
|
||||
+ case KEY_RSA: {
|
||||
+ const BIGNUM *d = NULL;
|
||||
+ RSA *rsakey = EVP_PKEY_get0_RSA(k->pkey);
|
||||
+ if (rsakey)
|
||||
+ RSA_get0_key(rsakey, NULL, NULL, &d);
|
||||
+ return d != NULL;
|
||||
+ }
|
||||
+# ifdef OPENSSL_HAS_ECC
|
||||
+ case KEY_ECDSA_CERT:
|
||||
+ case KEY_ECDSA: {
|
||||
+ EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(k->pkey);
|
||||
+ return (eckey != NULL) && (EC_KEY_get0_private_key(eckey) != NULL);
|
||||
+ }
|
||||
+# endif /* OPENSSL_HAS_ECC */
|
||||
+# endif /* OPENSSL < 3.0.0 */
|
||||
+ case KEY_DSA_CERT:
|
||||
+ case KEY_DSA: {
|
||||
+ const BIGNUM *priv_key;
|
||||
+ const BIGNUM *priv_key = NULL;
|
||||
+ DSA_get0_key(k->dsa, NULL, &priv_key);
|
||||
+ return priv_key != NULL;
|
||||
+ }
|
||||
+#ifdef OPENSSL_HAS_ECC
|
||||
+ case KEY_ECDSA_CERT:
|
||||
+ case KEY_ECDSA:
|
||||
+ return EC_KEY_get0_private_key(k->ecdsa) != NULL;
|
||||
+#endif /* OPENSSL_HAS_ECC */
|
||||
+#endif /* WITH_OPENSSL */
|
||||
+ case KEY_ED25519_CERT:
|
||||
+ case KEY_ED25519:
|
||||
@@ -2303,9 +2325,9 @@ Index: openssh-8.9p1/sshkey.h
|
||||
--- openssh-8.9p1.orig/sshkey.h
|
||||
+++ openssh-8.9p1/sshkey.h
|
||||
@@ -189,6 +189,7 @@ int sshkey_shield_private(struct sshke
|
||||
int sshkey_unshield_private(struct sshkey *);
|
||||
|
||||
int sshkey_type_from_name(const char *);
|
||||
int sshkey_type_from_shortname(const char *);
|
||||
+int sshkey_is_private(const struct sshkey *);
|
||||
int sshkey_is_cert(const struct sshkey *);
|
||||
int sshkey_is_sk(const struct sshkey *);
|
||||
|
@@ -58,11 +58,11 @@ Index: openssh-8.9p1/ssh.c
|
||||
--- openssh-8.9p1.orig/ssh.c
|
||||
+++ openssh-8.9p1/ssh.c
|
||||
@@ -549,6 +549,7 @@ static void
|
||||
process_config_files(const char *host_name, struct passwd *pw, int final_pass,
|
||||
int *want_final_pass)
|
||||
process_config_files(const char *host_name, struct passwd *pw,
|
||||
int final_pass, int *want_final_pass)
|
||||
{
|
||||
+ struct stat st;
|
||||
char buf[PATH_MAX];
|
||||
char *cmd, buf[PATH_MAX];
|
||||
int r;
|
||||
|
||||
@@ -567,10 +568,23 @@ process_config_files(const char *host_na
|
||||
@@ -71,7 +71,7 @@ Index: openssh-8.9p1/ssh.c
|
||||
|
||||
- /* Read systemwide configuration file after user config. */
|
||||
- (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw,
|
||||
- host, host_name, &options,
|
||||
- host, host_name, cmd, &options,
|
||||
- final_pass ? SSHCONF_FINAL : 0, want_final_pass);
|
||||
+ /* If only the vendor configuration file exists, use that.
|
||||
+ * Else use the standard configuration file.
|
||||
@@ -80,19 +80,19 @@ Index: openssh-8.9p1/ssh.c
|
||||
+ stat(_PATH_HOST_CONFIG_FILE, &st) == -1) {
|
||||
+ /* Read vendor distributed configuration file. */
|
||||
+ (void)read_config_file(_PATH_HOST_VENDOR_CONFIG_FILE,
|
||||
+ pw, host, host_name, &options,
|
||||
+ pw, host, host_name, cmd, &options,
|
||||
+ final_pass ? SSHCONF_FINAL : 0,
|
||||
+ want_final_pass);
|
||||
+ } else {
|
||||
+ /* Read systemwide configuration file after user config. */
|
||||
+ (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw,
|
||||
+ host, host_name, &options,
|
||||
+ host, host_name, cmd, &options,
|
||||
+ final_pass ? SSHCONF_FINAL : 0,
|
||||
+ want_final_pass);
|
||||
+ }
|
||||
}
|
||||
free(cmd);
|
||||
}
|
||||
|
||||
Index: openssh-8.9p1/ssh_config.5
|
||||
===================================================================
|
||||
--- openssh-8.9p1.orig/ssh_config.5
|
||||
@@ -187,14 +187,14 @@ Index: openssh-8.9p1/ssh-keysign.c
|
||||
|
||||
/* verify that ssh-keysign is enabled by the admin */
|
||||
initialize_options(&options);
|
||||
- (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw, "", "",
|
||||
- (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw, "", "", "",
|
||||
- &options, 0, NULL);
|
||||
+
|
||||
+ if (stat(_PATH_HOST_CONFIG_FILE, &st) == 0)
|
||||
+ (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw, "", "",
|
||||
+ (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw, "", "", "",
|
||||
+ &options, 0, NULL);
|
||||
+ else
|
||||
+ (void)read_config_file(_PATH_HOST_VENDOR_CONFIG_FILE, pw, "", "",
|
||||
+ (void)read_config_file(_PATH_HOST_VENDOR_CONFIG_FILE, pw, "", "", "",
|
||||
+ &options, 0, NULL);
|
||||
+
|
||||
(void)fill_default_options(&options);
|
||||
|
@@ -64,8 +64,8 @@ Index: openssh-9.6p1/ssh_config.5
|
||||
-The default is:
|
||||
-.Bd -literal -offset indent
|
||||
-chacha20-poly1305@openssh.com,
|
||||
-aes128-ctr,aes192-ctr,aes256-ctr,
|
||||
-aes128-gcm@openssh.com,aes256-gcm@openssh.com
|
||||
-aes128-gcm@openssh.com,aes256-gcm@openssh.com,
|
||||
-aes128-ctr,aes192-ctr,aes256-ctr
|
||||
-.Ed
|
||||
-.Pp
|
||||
The list of available ciphers may also be obtained using
|
||||
@@ -172,7 +172,7 @@ Index: openssh-9.6p1/ssh_config.5
|
||||
+.Pp
|
||||
Specifies the permitted KEX (Key Exchange) algorithms that will be used and
|
||||
their preference order.
|
||||
The selected algorithm will the the first algorithm in this list that
|
||||
The selected algorithm will be the first algorithm in this list that
|
||||
the server also supports.
|
||||
Multiple algorithms must be comma-separated.
|
||||
.Pp
|
||||
@@ -194,14 +194,14 @@ Index: openssh-9.6p1/ssh_config.5
|
||||
-.Pp
|
||||
-The default is:
|
||||
-.Bd -literal -offset indent
|
||||
-sntrup761x25519-sha512@openssh.com,
|
||||
-mlkem768x25519-sha256,
|
||||
-sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,
|
||||
-curve25519-sha256,curve25519-sha256@libssh.org,
|
||||
-ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
|
||||
-diffie-hellman-group-exchange-sha256,
|
||||
-diffie-hellman-group16-sha512,
|
||||
-diffie-hellman-group18-sha512,
|
||||
-diffie-hellman-group14-sha256,
|
||||
-diffie-hellman-group14-sha1
|
||||
-diffie-hellman-group14-sha256
|
||||
-.Ed
|
||||
+built-in openssh default set.
|
||||
.Pp
|
||||
@@ -385,8 +385,8 @@ Index: openssh-9.6p1/sshd_config.5
|
||||
-The default is:
|
||||
-.Bd -literal -offset indent
|
||||
-chacha20-poly1305@openssh.com,
|
||||
-aes128-ctr,aes192-ctr,aes256-ctr,
|
||||
-aes128-gcm@openssh.com,aes256-gcm@openssh.com
|
||||
-aes128-gcm@openssh.com,aes256-gcm@openssh.com,
|
||||
-aes128-ctr,aes192-ctr,aes256-ctr
|
||||
-.Ed
|
||||
-.Pp
|
||||
The list of available ciphers may also be obtained using
|
||||
@@ -534,18 +534,16 @@ Index: openssh-9.6p1/sshd_config.5
|
||||
.Pp
|
||||
The supported algorithms are:
|
||||
.Pp
|
||||
@@ -1072,16 +1057,6 @@ ecdh-sha2-nistp521
|
||||
@@ -1072,14 +1057,6 @@ ecdh-sha2-nistp521
|
||||
sntrup761x25519-sha512@openssh.com
|
||||
.El
|
||||
.Pp
|
||||
-The default is:
|
||||
-.Bd -literal -offset indent
|
||||
-sntrup761x25519-sha512@openssh.com,
|
||||
-mlkem768x25519-sha256,
|
||||
-sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,
|
||||
-curve25519-sha256,curve25519-sha256@libssh.org,
|
||||
-ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
|
||||
-diffie-hellman-group-exchange-sha256,
|
||||
-diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
|
||||
-diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
|
||||
-ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
|
||||
-.Ed
|
||||
-.Pp
|
||||
The list of supported key exchange algorithms may also be obtained using
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd8bd002a379b5d499dfb050dd1fa9af8029e80461f4bb6c523c49973f5a39f3
|
||||
size 1910393
|
@@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEcWi5g4FaXu9ZpK39Kj9BTnNgYLoFAmaCMn0ACgkQKj9BTnNg
|
||||
YLrjcBAAgO7xhKUXp8YxdqSZigDbcHu7T37bm1pRTKg2ihPepz+q6pV+DY8AHSRu
|
||||
eyuOCOHYzjLyArFpiMX3z9iT2NqO+KNBvKQoh8loaxNrECmgRGk2jBEKiibFSP5M
|
||||
i6CYkF3sET9xnVDkt4P6KievWXY1/Tl93qve3K2a/bvvgT8s2AaBMM8u4BMGNm3D
|
||||
sc3A6euN0aiXRts2V6I885VyrQDMK++E7+eTHet0ex82KH4I+ceIOwB48hny4wpb
|
||||
Zaqy9pTFisTmFNOF6d3TB58yMWoLQIbLuVrbbbcr7hFYCWsgj0yN5iYQNOR9pU4E
|
||||
ooF+aC0kK9M4iUXthzjjgIjnMzsCmPeKisbwblsPSfSgccj/pCMzW8C3CMVL6AvG
|
||||
slSSLK42qm3f38kx3sg2S8LDW0v+hoyvBmKNFMiBwsF2tWCXIG+oP1PDYpJUpaOJ
|
||||
RFHG7JEPtY94UJGdo5C4YhqDWr3HOqEwuVIt1gWMMPs9IvDkDRo6emmDd64FFAKH
|
||||
ss3hHixu6OHqU5iw6JIVVtYiur6s9m6N/Xxt5Ho6wuqnzUZ+Dwj3L6lF9IOJbJxU
|
||||
Ufb70I1Uko9kXcoje9ONUsqr88wfQY+JZxxVTlzDUDadytCzmO3wXsz+cosMQ5Rw
|
||||
aOZwXYyvmcoZuUQG8GIqRO1wfOcD7o7pI6IyVJQjOeG/rA0eu/4=
|
||||
=Gj2n
|
||||
-----END PGP SIGNATURE-----
|
@@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 10 08:16:09 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- "Update" to openssh 10.0p2:
|
||||
* No changes for askpass, see main package changelog for
|
||||
details.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 9 09:33:10 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Update to openssh 10.0p1:
|
||||
* No changes for askpass, see main package changelog for
|
||||
details.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 06:16:59 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Update to openssh 9.9p1:
|
||||
* No changes for askpass, see main package changelog for
|
||||
details.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 1 09:17:11 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
|
@@ -18,14 +18,15 @@
|
||||
|
||||
%define _name openssh
|
||||
Name: openssh-askpass-gnome
|
||||
Version: 9.8p1
|
||||
Version: 10.0p2
|
||||
%define wrongly_named_version 10.0p1
|
||||
Release: 0
|
||||
Summary: A GNOME-Based Passphrase Dialog for OpenSSH
|
||||
License: BSD-2-Clause
|
||||
Group: Productivity/Networking/SSH
|
||||
URL: https://www.openssh.com/
|
||||
Source: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{_name}-%{version}.tar.gz
|
||||
Source42: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{_name}-%{version}.tar.gz.asc
|
||||
Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{_name}-%{wrongly_named_version}.tar.gz
|
||||
Source1: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{_name}-%{wrongly_named_version}.tar.gz.asc
|
||||
Requires: %{_name}-clients = %{version}
|
||||
Supplements: packageand(openssh-clients:libgtk-3-0)
|
||||
%if 0%{?suse_version} >= 1550
|
||||
@@ -40,7 +41,7 @@ for executing commands on a remote machine. This package contains a
|
||||
GNOME-based passphrase dialog for OpenSSH.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{_name}-%{version}
|
||||
%autosetup -p1 -n %{_name}-%{wrongly_named_version}
|
||||
|
||||
%build
|
||||
cd contrib
|
||||
|
@@ -269,7 +269,7 @@ Index: openssh-9.3p2/sshd-session.c
|
||||
--- openssh-9.3p2.orig/sshd-session.c
|
||||
+++ openssh-9.3p2/sshd-session.c
|
||||
@@ -197,6 +197,19 @@ static void do_ssh2_kex(struct ssh *);
|
||||
static void do_ssh2_kex(struct ssh *);
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Clear some stack space. This is a bit naive, but hopefully helps mitigate
|
||||
@@ -306,14 +306,14 @@ Index: openssh-9.3p2/sshd-session.c
|
||||
/*
|
||||
* Hack for systems that don't support FD passing: retain privileges
|
||||
* in the post-auth privsep process so it can allocate PTYs directly.
|
||||
@@ -1354,6 +1356,7 @@ main(int ac, char **av)
|
||||
*/
|
||||
mm_send_keystate(ssh, pmonitor);
|
||||
ssh_packet_clear_keys(ssh);
|
||||
+ clobber_stack();
|
||||
exit(0);
|
||||
|
||||
authenticated:
|
||||
#@@ -1354,6 +1356,7 @@ main(int ac, char **av)
|
||||
# */
|
||||
# mm_send_keystate(ssh, pmonitor);
|
||||
# ssh_packet_clear_keys(ssh);
|
||||
#+ clobber_stack();
|
||||
# exit(0);
|
||||
#
|
||||
# authenticated:
|
||||
@@ -1431,6 +1434,7 @@ main(int ac, char **av)
|
||||
|
||||
mm_terminate();
|
||||
@@ -334,11 +334,44 @@ Index: openssh-9.3p2/sshd-session.c
|
||||
in_cleanup = 1;
|
||||
extern int auth_attempted; /* monitor.c */
|
||||
|
||||
@@ -1604,5 +1610,7 @@ cleanup_exit(int i)
|
||||
@@ -1604,6 +1610,8 @@ cleanup_exit(int i)
|
||||
mm_is_monitor())
|
||||
audit_event(the_active_state, SSH_CONNECTION_ABANDON);
|
||||
#endif
|
||||
+
|
||||
+ clobber_stack();
|
||||
_exit(i);
|
||||
/* Override default fatal exit value when auth was attempted */
|
||||
if (i == 255 && auth_attempted)
|
||||
_exit(EXIT_AUTH_ATTEMPTED);
|
||||
Index: openssh-9.9p2/sshd-auth.c
|
||||
===================================================================
|
||||
--- openssh-9.9p2.orig/sshd-auth.c
|
||||
+++ openssh-9.9p2/sshd-auth.c
|
||||
@@ -197,6 +197,19 @@ static void do_ssh2_kex(struct ssh *);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Clear some stack space. This is a bit naive, but hopefully helps mitigate
|
||||
+ * information leaks due to registers and other data having been stored on
|
||||
+ * the stack. Called after fork() and before exit().
|
||||
+ */
|
||||
+static void
|
||||
+clobber_stack(void)
|
||||
+{
|
||||
+ char data [32768];
|
||||
+
|
||||
+ explicit_bzero(data, 32768);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
privsep_child_demote(void)
|
||||
{
|
||||
@@ -796,6 +796,7 @@ main(int ac, char **av)
|
||||
*/
|
||||
mm_send_keystate(ssh, pmonitor);
|
||||
ssh_packet_clear_keys(ssh);
|
||||
+ clobber_stack();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@@ -1,41 +0,0 @@
|
||||
Index: openssh-8.9p1/myproposal.h
|
||||
===================================================================
|
||||
--- openssh-8.9p1.orig/myproposal.h
|
||||
+++ openssh-8.9p1/myproposal.h
|
||||
@@ -34,7 +34,8 @@
|
||||
"diffie-hellman-group-exchange-sha256," \
|
||||
"diffie-hellman-group16-sha512," \
|
||||
"diffie-hellman-group18-sha512," \
|
||||
- "diffie-hellman-group14-sha256"
|
||||
+ "diffie-hellman-group14-sha256," \
|
||||
+ "diffie-hellman-group14-sha1"
|
||||
|
||||
#define KEX_CLIENT_KEX KEX_SERVER_KEX
|
||||
|
||||
Index: openssh-8.9p1/ssh_config.5
|
||||
===================================================================
|
||||
--- openssh-8.9p1.orig/ssh_config.5
|
||||
+++ openssh-8.9p1/ssh_config.5
|
||||
@@ -1228,7 +1228,8 @@ sntrup761x25519-sha512@openssh.com,
|
||||
diffie-hellman-group-exchange-sha256,
|
||||
diffie-hellman-group16-sha512,
|
||||
diffie-hellman-group18-sha512,
|
||||
-diffie-hellman-group14-sha256
|
||||
+diffie-hellman-group14-sha256,
|
||||
+diffie-hellman-group14-sha1
|
||||
.Ed
|
||||
.Pp
|
||||
The list of supported key exchange algorithms may also be obtained using
|
||||
Index: openssh-8.9p1/sshd_config.5
|
||||
===================================================================
|
||||
--- openssh-8.9p1.orig/sshd_config.5
|
||||
+++ openssh-8.9p1/sshd_config.5
|
||||
@@ -996,7 +996,7 @@ ecdh-sha2-nistp256,ecdh-sha2-nistp384,ec
|
||||
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
|
||||
diffie-hellman-group-exchange-sha256,
|
||||
diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
|
||||
-diffie-hellman-group14-sha256
|
||||
+diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
|
||||
.Ed
|
||||
.Pp
|
||||
The list of supported key exchange algorithms may also be obtained using
|
30
openssh-send-extra-term-env.patch
Normal file
30
openssh-send-extra-term-env.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
Index: openssh-10.0p1/ssh_config
|
||||
===================================================================
|
||||
--- openssh-10.0p1.orig/ssh_config
|
||||
+++ openssh-10.0p1/ssh_config
|
||||
@@ -49,6 +49,10 @@ Host *
|
||||
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
|
||||
SendEnv LC_IDENTIFICATION LC_ALL
|
||||
|
||||
+# Send environment variables useful for terminal identification.
|
||||
+ SendEnv LC_TERMINAL LC_TERMINAL_VERSION
|
||||
+ SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION
|
||||
+
|
||||
# PasswordAuthentication yes
|
||||
# HostbasedAuthentication no
|
||||
# GSSAPIAuthentication no
|
||||
Index: openssh-10.0p1/sshd_config
|
||||
===================================================================
|
||||
--- openssh-10.0p1.orig/sshd_config
|
||||
+++ openssh-10.0p1/sshd_config
|
||||
@@ -123,6 +123,10 @@ AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TI
|
||||
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
|
||||
AcceptEnv LC_IDENTIFICATION LC_ALL
|
||||
|
||||
+# Accept environment variables useful for terminal identification.
|
||||
+AcceptEnv LC_TERMINAL LC_TERMINAL_VERSION
|
||||
+AcceptEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION
|
||||
+
|
||||
# Example of overriding settings on a per-user basis
|
||||
#Match User anoncvs
|
||||
# X11Forwarding no
|
503
openssh.changes
503
openssh.changes
@@ -1,3 +1,506 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 13 09:32:44 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Enable --with-logind to call the SetTTY dbus method in systemd
|
||||
in SLE15 too. This allows "wall" to print messages in ssh ttys
|
||||
(bsc#1239671)
|
||||
- Small fixes to unref the dbus session when any error occurs:
|
||||
* logind_set_tty.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 22 16:45:33 UTC 2025 - Hans Petter Jansson <hpj@suse.com>
|
||||
|
||||
- Add openssh-send-extra-term-env.patch, which appends a few
|
||||
environment variables useful for terminal identification to the
|
||||
default send and accept lists.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 10 08:16:09 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- "Update" to openssh 10.0p2:
|
||||
- There was an issue during the packaging of 10.0p1 which made it
|
||||
identify itself as 10.0p2 so 10.0p1 is now considered identical
|
||||
to 10.0p2 and upstream won't release a separate 10.0p2 package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 9 09:33:10 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Update to openssh 10.0p1:
|
||||
= Potentially-incompatible changes
|
||||
* This release removes support for the weak DSA signature
|
||||
algorithm, completing the deprecation process that began in
|
||||
2015 (when DSA was disabled by default) and repeatedly warned
|
||||
over the last 12 months.
|
||||
* scp(1), sftp(1): pass "ControlMaster no" to ssh when invoked by
|
||||
scp & sftp. This disables implicit session creation by these
|
||||
tools when ControlMaster was set to yes/auto by configuration,
|
||||
which some users found surprising. This change will not prevent
|
||||
scp/sftp from using an existing multiplexing session if one had
|
||||
already been created. GHPR557
|
||||
* This release has the version number 10.0 and announces itself
|
||||
as "SSH-2.0-OpenSSH_10.0". Software that naively matches
|
||||
versions using patterns like "OpenSSH_1*" may be confused by
|
||||
this.
|
||||
* sshd(8): this release removes the code responsible for the
|
||||
user authentication phase of the protocol from the per-
|
||||
connection sshd-session binary to a new sshd-auth binary.
|
||||
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 the authentication
|
||||
phase completes. This change should be largely invisible to
|
||||
users, though some log messages may now come from "sshd-auth"
|
||||
instead of "sshd-session". Downstream distributors of OpenSSH
|
||||
will need to package the sshd-auth binary.
|
||||
* sshd(8): this release disables finite field (a.k.a modp)
|
||||
Diffie-Hellman key exchange in sshd by default. Specifically,
|
||||
this removes the "diffie-hellman-group*" and
|
||||
"diffie-hellman-group-exchange-*" methods from the default
|
||||
KEXAlgorithms list. The client is unchanged and continues to
|
||||
support these methods by default. Finite field Diffie Hellman
|
||||
is slow and computationally expensive for the same security
|
||||
level as Elliptic Curve DH or PQ key agreement while offering
|
||||
no redeeming advantages. ECDH has been specified for the SSH
|
||||
protocol for 15 years and some form of ECDH has been the
|
||||
default key exchange in OpenSSH for the last 14 years.
|
||||
* sshd(8): this release removes the implicit fallback to
|
||||
compiled-in groups for Diffie-Hellman Group Exchange KEX when
|
||||
the moduli file exists but does not contain moduli within the
|
||||
client-requested range. The fallback behaviour remains for the
|
||||
case where the moduli file does not exist at all. This allows
|
||||
administrators more explicit control over which DH groups will
|
||||
be selected, but can lead to connection failures if the moduli
|
||||
file is edited incorrectly. bz#2793
|
||||
|
||||
= Security
|
||||
* sshd(8): fix the DisableForwarding directive, which was failing
|
||||
to disable X11 forwarding and agent forwarding as documented.
|
||||
X11 forwarding is disabled by default in the server and agent
|
||||
forwarding is off by default in the client (bsc#1241012,
|
||||
CVE-2025-32728)
|
||||
|
||||
= New features
|
||||
* ssh(1): the hybrid post-quantum algorithm mlkem768x25519-sha256
|
||||
is now used by default for key agreement. This algorithm is
|
||||
considered to be safe against attack by quantum computers,
|
||||
is guaranteed to be no less strong than the popular
|
||||
curve25519-sha256 algorithm, has been standardised by NIST
|
||||
and is considerably faster than the previous default.
|
||||
* ssh(1): prefer AES-GCM to AES-CTR mode when selecting a cipher
|
||||
for the connection. The default cipher preference list is now
|
||||
Chacha20/Poly1305, AES-GCM (128/256) followed by AES-CTR
|
||||
(128/192/256).
|
||||
* ssh(1): add %-token and environment variable expansion to the
|
||||
ssh_config SetEnv directive.
|
||||
* ssh(1): allow %-token and environment variable expansion in
|
||||
the ssh_config User directive, with the exception of %r and %C
|
||||
which would be self-referential. bz#3477
|
||||
* ssh(1), sshd(8): add "Match version" support to ssh_config and
|
||||
sshd_config. Allows matching on the local version of OpenSSH,
|
||||
e.g. "Match version OpenSSH_10.*".
|
||||
* ssh(1): add support for "Match sessiontype" to ssh_config.
|
||||
Allows matching on the type of session initially requested,
|
||||
either "shell" for interactive sessions, "exec" for command
|
||||
execution sessions, "subsystem" for subsystem requests, such as
|
||||
sftp, or "none" for transport/forwarding-only sessions.
|
||||
* ssh(1): add support for "Match command ..." support to
|
||||
ssh_config, allowing matching on the remote command as
|
||||
specified on the command-line.
|
||||
* ssh(1): allow 'Match tagged ""' and 'Match command ""' to match
|
||||
empty tag and command values respectively.
|
||||
* sshd(8): allow glob(3) patterns to be used in sshd_config
|
||||
AuthorizedKeysFile and AuthorizedPrincipalsFile directives.
|
||||
bz2755
|
||||
* sshd(1): support the VersionAddendum in the client, mirroring
|
||||
the option of the same name in the server; bz2745
|
||||
* ssh-agent(1): the agent will now delete all loaded keys when
|
||||
signaled with SIGUSR1. This allows deletion of keys without
|
||||
having access to $SSH_AUTH_SOCK.
|
||||
* Portable OpenSSH, ssh-agent(1): support systemd-style socket
|
||||
activation in ssh-agent using the LISTEN_PID/LISTEN_FDS
|
||||
mechanism. Activated when these environment variables are set,
|
||||
the agent is started with the -d or -D option and no socket
|
||||
path is set. GHPR502
|
||||
* ssh-keygen(1): support FIDO tokens that return no attestation
|
||||
data, e.g. recent WinHello. GHPR542
|
||||
* ssh-agent(1): add a "-Owebsafe-allow=..." option to allow the
|
||||
default FIDO application ID allow-list to be overridden.
|
||||
* Add a work-in-progress tool to verify FIDO attestation blobs
|
||||
that ssh-keygen can optionally write when enrolling FIDO keys.
|
||||
This tool is available under
|
||||
regress/misc/ssh-verify-attestation for experimentation but is
|
||||
not installed by "make install".
|
||||
* ssh-keygen(1): allow "-" as output file for moduli screening.
|
||||
GHPR393
|
||||
= Bugfixes
|
||||
* sshd(8): remove assumption that the sshd_config and any configs
|
||||
it includes can fit in a (possibly enlarged) socket buffer.
|
||||
Previously it was possible to create a sufficiently large
|
||||
configuration that could cause sshd to fail to accept any
|
||||
connection. sshd(8) will now actively manage sending its config
|
||||
to the sshd-session sub-process.
|
||||
* ssh(1): don't start the ObscureKeystrokeTiming mitigations if
|
||||
there has been traffic on a X11 forwarding channel recently.
|
||||
Should fix X11 forwarding performance problems when this
|
||||
setting is enabled. bz3655
|
||||
* ssh(1): prohibit the comma character in hostnames accepted, but
|
||||
allow an underscore as the first character in a hostname.
|
||||
* sftp(1): set high-water when resuming a "put". Prevents bogus
|
||||
"server reordered acks" debug message.
|
||||
* ssh(1), sshd(8): fix regression in openssh-9.8, which would
|
||||
fail to accept "Match criteria=argument" as well as the
|
||||
documented "Match criteria argument" syntax in ssh_config and
|
||||
sshd_config. bz3739
|
||||
* sftp(1), ssh(1): fix a number possible NULL dereference bugs,
|
||||
including Coverity CIDs 405019 and 477813.
|
||||
* sshd(8): fix PerSourcePenalty incorrectly using "crash" penalty
|
||||
when LoginGraceTime was exceeded. bz3797
|
||||
* sshd(8): fix "Match invalid-user" from incorrectly being
|
||||
activated in initial configuration pass when no other
|
||||
predicates were present on the match line
|
||||
* sshd(8): fix debug logging of user specific delay. GHPR#552
|
||||
* sshd(8): improve debug logging across sub-process boundaries.
|
||||
Previously some log messages were lost early in the sshd-auth
|
||||
and sshd-session processes' life.
|
||||
* ssh(1): require control-escape character sequences passed via
|
||||
the '-e ^x' command-line to be exactly two characters long.
|
||||
Avoids one byte out-of-bounds read if ssh is invoked as
|
||||
"ssh -e^ ..." GHPR368
|
||||
* ssh(1), sshd(8): prevent integer overflow in x11 port handling.
|
||||
These are theoretically possible if the admin misconfigured
|
||||
X11DisplayOffset or the user misconfigures their own $DISPLAY,
|
||||
but don't happen in normal operation. bz#3730
|
||||
* ssh-keygen(1): don't mess up ssh-keygen -l output when the file
|
||||
contains CR characters; GHPR236 bz3385.
|
||||
* sshd(8): add rate limits to logging of connections dropped by
|
||||
PerSourcePenalties. Previously these could be noisy in logs.
|
||||
* ssh(1): fix argument of "Compression" directive in ssh -G
|
||||
config dump, which regressed in openssh-9.8.
|
||||
* sshd(8): fix a corner-case triggered by UpdateHostKeys when
|
||||
sshd refuses to accept the signature returned by an agent
|
||||
holding host keys during the hostkey rotation sub-protocol.
|
||||
This situation could occur in situations where a PKCS#11
|
||||
smartcard that lacked support for particular signature
|
||||
algorithms was used to store host keys.
|
||||
* ssh-keygen(1): when using RSA keys to sign messages with
|
||||
"ssh-keygen -Y", select the signature algorithm based on the
|
||||
requested hash algorithm ("-Ohashalg=xxx"). This allows using
|
||||
something other than the default of rsa-sha2-512, which may not
|
||||
be supported on all signing backends, e.g. some smartcards only
|
||||
support SHA256.
|
||||
* ssh(1), sshd(8), ssh-keyscan(1): fix ML-KEM768x25519 KEX on
|
||||
big-endian systems.
|
||||
* Many regression and interop test improvements.
|
||||
|
||||
= Portability
|
||||
* All: add support for AWS-LC (AWS libcrypto). bz3784
|
||||
* sshd(8): add wtmpdb support as a Y2038 safe wtmp replacement.
|
||||
* sshd(8): add support for locking sshd into memory, enabled with
|
||||
the --with-linux-memlock-onfault configure flag.
|
||||
* Add support for building a standalone sk-libfido2 library,
|
||||
enabled by --with-security-key-standalone
|
||||
* ssh(1), sshd(8), ssh-keyscan(1): include __builtin_popcount
|
||||
replacement function. for compilers that lack it.
|
||||
* All: Check for and replace le32toh, le64toh, htole64
|
||||
separately. It appears that at least some versions of endian.h
|
||||
in glibc do not have the latter two. bz#3794
|
||||
* Remove ancient RHL 6.x config in RPM spec.
|
||||
|
||||
- Rebase patches:
|
||||
* openssh-7.7p1-fips.patch
|
||||
* openssh-7.7p1-cavstest-ctr.patch
|
||||
* openssh-7.7p1-cavstest-kdf.patch
|
||||
* openssh-7.7p1-fips_checks.patch
|
||||
* openssh-8.0p1-gssapi-keyex.patch
|
||||
* openssh-8.1p1-audit.patch
|
||||
* openssh-7.7p1-ldap.patch
|
||||
* openssh-reenable-dh-group14-sha1-default.patch
|
||||
* openssh-8.4p1-vendordir.patch
|
||||
* logind_set_tty.patch
|
||||
* openssh-mitigate-lingering-secrets.patch
|
||||
* openssh-7.8p1-role-mls.patch
|
||||
* openssh-6.6p1-privsep-selinux.patch
|
||||
* openssh-6.6.1p1-selinux-contexts.patch
|
||||
* openssh-9.6p1-crypto-policies-man.patch
|
||||
* openssh-7.6p1-cleanup-selinux.patch
|
||||
|
||||
- Drop patches now included upstream:
|
||||
* wtmpdb.patch
|
||||
* fix-x11-regression-bsc1229449.patch
|
||||
* fix-nopie-flag.patch
|
||||
|
||||
- Drop patch since SHA-1 isn't considered secure and the default
|
||||
kex list comes from crypto-policies anyway:
|
||||
* openssh-reenable-dh-group14-sha1-default.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 7 12:24:12 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Do not try to create /etc/ssh in sshd-gen-keys-start
|
||||
(bsc#1238191). sshd-gen-keys-start transitions to a SELinux
|
||||
domain that doesn't have the necessary permissions. Based on
|
||||
a SR by Johannes Segitz <jsegitz@suse.com>.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 2 06:28:42 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Add patch to fix parsing of CFLAGS with duplicated -pie flags,
|
||||
which break 'make tests'. Submitted to upstream in
|
||||
https://bugzilla.mindrot.org/show_bug.cgi?id=3806 .
|
||||
* fix-nopie-flag.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 18 08:51:16 UTC 2025 - Hillwood Yang <hillwood@opensuse.org>
|
||||
|
||||
- Disable seccomp_filter and rlimitsandbox sandbox for loongarch.
|
||||
seccomp_filter and rlimitsandbox not supported on loongarch64 yet.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 19 09:17:41 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- merge openssh-fips into the main openssh package (bsc#1185116)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 18 09:15:48 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Update to openssh 9.9p2:
|
||||
= Security
|
||||
* Fix CVE-2025-26465 - ssh(1) in OpenSSH versions 6.8p1 to 9.9p1
|
||||
(inclusive) contained a logic error that allowed an on-path
|
||||
attacker (a.k.a MITM) to impersonate any server when the
|
||||
VerifyHostKeyDNS option is enabled. This option is off by
|
||||
default.
|
||||
* Fix CVE-2025-26466 - sshd(8) in OpenSSH versions 9.5p1 to 9.9p1
|
||||
(inclusive) is vulnerable to a memory/CPU denial-of-service
|
||||
related to the handling of SSH2_MSG_PING packets. This
|
||||
condition may be mitigated using the existing
|
||||
PerSourcePenalties feature.
|
||||
|
||||
Both vulnerabilities were discovered and demonstrated to be
|
||||
exploitable by the Qualys Security Advisory team. The openSSH
|
||||
team thanks them for their detailed review of OpenSSH.
|
||||
|
||||
= Bugfixes
|
||||
* ssh(1), sshd(8): fix regression in Match directive that caused
|
||||
failures when predicates and their arguments were separated by
|
||||
'=' characters instead of whitespace (bz3739).
|
||||
* sshd(8): fix the "Match invalid-user" predicate, which was
|
||||
matching incorrectly in the initial pass of config evaluation.
|
||||
* ssh(1), sshd(8), ssh-keyscan(1): fix mlkem768x25519-sha256 key
|
||||
exchange on big-endian systems.
|
||||
* Fix a number of build problems on particular operating systems
|
||||
and configurations.
|
||||
|
||||
- Remove patches that are already included in 9.9p2:
|
||||
* 0001-fix-utmpx-ifdef.patch
|
||||
* 0002-upstream-fix-regression-introduced-when-I-switched-the-Match.patch
|
||||
* 0003-upstream-fix-previous-change-to-ssh_config-Match_-which-broken-on.patch
|
||||
* 0004-upstream-fix-ML-KEM768x25519-KEX-on-big-endian-systems-spotted-by.patch
|
||||
* fix-CVE-2025-26465-and-CVE-2025-26466.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 13 11:29:19 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Fix a MitM attack against OpenSSH's VerifyHostKeyDNS-enabled
|
||||
client and a DoS attack against OpenSSH's client and server
|
||||
(bsc#1237040, CVE-2025-26465, bsc#1237041, CVE-2025-26466):
|
||||
* fix-CVE-2025-26465-and-CVE-2025-26466.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 22 15:25:28 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Drop rcFOO symlinks for CODE16 (PED-266).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 11:18:04 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Don't force using gcc11 on SLFO/ALP which have a newer version.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 10:29:33 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Add patches from upstream:
|
||||
- To fix a copy&paste oversight in an ifdef :
|
||||
* 0001-fix-utmpx-ifdef.patch
|
||||
- To fix a regression introduced when the "Match" criteria
|
||||
tokenizer was modified since it stopped supporting the
|
||||
"Match criteria=argument" format:
|
||||
* 0002-upstream-fix-regression-introduced-when-I-switched-the-Match.patch
|
||||
- To fix the previous patch which broke on negated Matches:
|
||||
* 0003-upstream-fix-previous-change-to-ssh_config-Match_-which-broken-on.patch
|
||||
- To fix the ML-KEM768x25519 kex algorithm on big-endian systems:
|
||||
* 0004-upstream-fix-ML-KEM768x25519-KEX-on-big-endian-systems-spotted-by.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 15:06:19 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Use %{with ...} instead of 0%{with ...}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 11 09:28:30 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Add a patch to fix a regression introduced in 9.6 that makes X11
|
||||
forwarding very slow. Submitted to upstream in
|
||||
https://bugzilla.mindrot.org/show_bug.cgi?id=3655#c4 . Fixes
|
||||
bsc#1229449:
|
||||
* fix-x11-regression-bsc1229449.patch
|
||||
- Remove empty line at the end of sshd-sle.pamd (bsc#1227456)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 25 10:45:17 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Add a const to the openssl 1.1/RSA section of sshkey_is_private
|
||||
to keep it similar to what it used before the 9.9 rebase:
|
||||
* openssh-8.1p1-audit.patch
|
||||
- Add a openssl11 bcond to the spec file for the SLE12 case
|
||||
instead of checking suse_version in different parts.
|
||||
- Move conditional patches to a number >= 1000.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 06:16:59 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Update to openssh 9.9p1:
|
||||
= Future deprecation notice
|
||||
* OpenSSH plans to remove support for the DSA signature algorithm
|
||||
in early 2025. This release disables DSA by default at compile
|
||||
time. DSA, as specified in the SSHv2 protocol, is inherently
|
||||
weak - being limited to a 160 bit private key and use of the
|
||||
SHA1 digest. Its estimated security level is only 80 bits
|
||||
symmetric equivalent.
|
||||
OpenSSH has disabled DSA keys by default since 2015 but has
|
||||
retained run-time optional support for them. DSA was the only
|
||||
mandatory-to-implement algorithm in the SSHv2 RFCs, mostly
|
||||
because alternative algorithms were encumbered by patents when
|
||||
the SSHv2 protocol was specified.
|
||||
This has not been the case for decades at this point and better
|
||||
algorithms are well supported by all actively-maintained SSH
|
||||
implementations. We do not consider the costs of maintaining
|
||||
DSA in OpenSSH to be justified and hope that removing it from
|
||||
OpenSSH can accelerate its wider deprecation in supporting
|
||||
cryptography libraries.
|
||||
|
||||
= Potentially-incompatible changes
|
||||
* ssh(1): remove support for pre-authentication compression.
|
||||
OpenSSH has only supported post-authentication compression in
|
||||
the server for some years. Compression before authentication
|
||||
significantly increases the attack surface of SSH servers and
|
||||
risks creating oracles that reveal information about
|
||||
information sent during authentication.
|
||||
* ssh(1), sshd(8): processing of the arguments to the "Match"
|
||||
configuration directive now follows more shell-like rules for
|
||||
quoted strings, including allowing nested quotes and \-escaped
|
||||
characters. If configurations contained workarounds for the
|
||||
previous simplistic quote handling then they may need to be
|
||||
adjusted. If this is the case, it's most likely to be in the
|
||||
arguments to a "Match exec" confition. In this case, moving the
|
||||
command to be evaluated from the Match line to an external
|
||||
shell script is easiest way to preserve compatibility with both
|
||||
the old and new versions.
|
||||
|
||||
= New features
|
||||
* ssh(1), sshd(8): add support for a new hybrid post-quantum key
|
||||
exchange based on the FIPS 203 Module-Lattice Key Enapsulation
|
||||
mechanism (ML-KEM) combined with X25519 ECDH as described by
|
||||
https://datatracker.ietf.org/doc/html/draft-kampanakis-curdle-ssh-pq-ke-03
|
||||
This algorithm "mlkem768x25519-sha256" is available by default.
|
||||
* ssh(1): the ssh_config "Include" directive can now expand
|
||||
environment as well as the same set of %-tokens "Match Exec"
|
||||
supports.
|
||||
* sshd(8): add a sshd_config "RefuseConnection" option that, if
|
||||
set will terminate the connection at the first authentication
|
||||
request.
|
||||
* sshd(8): add a "refuseconnection" penalty class to sshd_config
|
||||
PerSourcePenalties that is applied when a connection is dropped
|
||||
by the new RefuseConnection keyword.
|
||||
* sshd(8): add a "Match invalid-user" predicate to sshd_config
|
||||
Match options that matches when the target username is not
|
||||
valid on the server.
|
||||
* ssh(1), sshd(8): update the Streamlined NTRUPrime code to a
|
||||
substantially faster implementation.
|
||||
* ssh(1), sshd(8): the hybrid Streamlined NTRUPrime/X25519 key
|
||||
exchange algorithm now has an IANA-assigned name in addition to
|
||||
the "@openssh.com" vendor extension name. This algorithm is now
|
||||
also available under this name "sntrup761x25519-sha512"
|
||||
* ssh(1), sshd(8), ssh-agent(1): prevent private keys from being
|
||||
included in core dump files for most of their lifespans. This
|
||||
is in addition to pre-existing controls in ssh-agent(1) and
|
||||
sshd(8) that prevented coredumps. This feature is supported on
|
||||
OpenBSD, Linux and FreeBSD.
|
||||
* All: convert key handling to use the libcrypto EVP_PKEY API,
|
||||
with the exception of DSA.
|
||||
* sshd(8): add a random amount of jitter (up to 4 seconds) to the
|
||||
grace login time to make its expiry unpredictable.
|
||||
|
||||
= Bugfixes
|
||||
* sshd(8): relax absolute path requirement back to what it was
|
||||
prior to OpenSSH 9.8, which incorrectly required that sshd was
|
||||
started with an absolute path in inetd mode. bz3717
|
||||
* sshd(8): fix regression introduced in openssh-9.8 that swapped
|
||||
the order of source and destination addresses in some sshd log
|
||||
messages.
|
||||
* sshd(8): do not apply authorized_keys options when signature
|
||||
verification fails. Prevents more restrictive key options being
|
||||
incorrectly applied to subsequent keys in authorized_keys.
|
||||
bz3733
|
||||
* ssh-keygen(1): include pathname in some of ssh-keygen's
|
||||
passphrase prompts. Helps the user know what's going on when
|
||||
ssh-keygen is invoked via other tools. Requested in GHPR503
|
||||
* ssh(1), ssh-add(1): make parsing user@host consistently look
|
||||
for the last '@' in the string rather than the first. This
|
||||
makes it possible to more consistently use usernames that
|
||||
contain '@' characters.
|
||||
* ssh(1), sshd(8): be more strict in parsing key type names. Only
|
||||
allow short names (e.g "rsa") in user-interface code and
|
||||
require full SSH protocol names (e.g. "ssh-rsa") everywhere
|
||||
else. bz3725
|
||||
* regress: many performance and correctness improvements to the
|
||||
re-keying regression test.
|
||||
* ssh-keygen(1): clarify that ed25519 is the default key type
|
||||
generated and clarify that rsa-sha2-512 is the default
|
||||
signature scheme when RSA is in use. GHPR505
|
||||
* sshd(8): fix minor memory leak in Subsystem option parsing;
|
||||
GHPR515
|
||||
* All: additional hardening and consistency checks for the sshbuf
|
||||
code.
|
||||
* sshd(8): reduce default logingrace penalty to ensure that a
|
||||
single forgotton login that times out will be below the penalty
|
||||
threshold.
|
||||
* ssh(1): fix proxy multiplexing (-O proxy) bug. If a mux started
|
||||
with ControlPersist then later has a forwarding added using mux
|
||||
proxy connection and the forwarding was used, then when the mux
|
||||
proxy session terminated, the mux master process would issue a
|
||||
bad message that terminated the connection.
|
||||
|
||||
= Portability
|
||||
* sync contrib/ssh-copy-id to the latest upstream version.
|
||||
* regress: improve portablility for some awk(1) usage
|
||||
(e.g. Solaris)
|
||||
* In the contrib/redhat RPM spec file, without_openssl was
|
||||
previously incorrectly enabled unconditionally.
|
||||
* sshd(8) restore audit call before exit that regressed in
|
||||
openssh-9.8. Fixes an issue where the SSH_CONNECTION_ABANDON
|
||||
event was not recorded.
|
||||
* sshd(8): add support for class-imposed loging restrictions on
|
||||
FreeBSD. Allowing auth_hostok(3) and auth_timeok(3) to control
|
||||
logins.
|
||||
* Build fixes for Musl libc.
|
||||
* Fix detection of setres*id on GNU/Hurd
|
||||
|
||||
- Drop patches that were already merged by upstream:
|
||||
* fix-memleak-in-process_server_config_line_depth.patch
|
||||
* fix-audit-fail-attempt.patch
|
||||
- Rebase patch with significant changes:
|
||||
* openssh-8.1p1-audit.patch
|
||||
- Rebase patches with context or trivial changes:
|
||||
* openssh-7.7p1-fips.patch
|
||||
* openssh-8.0p1-gssapi-keyex.patch
|
||||
* openssh-9.6p1-crypto-policies-man.patch
|
||||
* openssh-mitigate-lingering-secrets.patch
|
||||
- Several spec file fixes so the package builds and can be
|
||||
installed in SLE 15 SP5 and SLE 12 SP5
|
||||
- Use gcc11 when building in SLE12 and SLE15.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 12 07:43:18 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
|
151
openssh.spec
151
openssh.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package openssh
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,10 +15,18 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define sandbox_seccomp 0
|
||||
%ifnarch ppc
|
||||
%ifnarch ppc loongarch64
|
||||
%define sandbox_seccomp 1
|
||||
%endif
|
||||
%if !%{sandbox_seccomp}
|
||||
%ifarch loongarch64
|
||||
%define sandbox_rlimit 0
|
||||
%else
|
||||
%define sandbox_rlimit 1
|
||||
%endif
|
||||
%endif
|
||||
%define _fwdir %{_sysconfdir}/sysconfig/SuSEfirewall2.d
|
||||
%define _fwdefdir %{_fwdir}/services
|
||||
%define _appdefdir %( grep "configdirspec=" $( which xmkmf ) | sed -r 's,^[^=]+=.*-I(.*)/config.*$,\\1/app-defaults,' )
|
||||
@@ -34,19 +42,32 @@
|
||||
%bcond_without allow_root_password_login_by_default
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600
|
||||
%bcond_without crypto_policies
|
||||
%else
|
||||
%bcond_with crypto_policies
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} < 1500
|
||||
%bcond_without openssl11
|
||||
%else
|
||||
%bcond_with openssl11
|
||||
%endif
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
Name: openssh
|
||||
Version: 9.8p1
|
||||
Version: 10.0p2
|
||||
%define wrongly_named_version 10.0p1
|
||||
Release: 0
|
||||
Summary: Secure Shell Client and Server (Remote Login Program)
|
||||
License: BSD-2-Clause AND MIT
|
||||
Group: Productivity/Networking/SSH
|
||||
URL: https://www.openssh.com/
|
||||
Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
|
||||
Source1: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc
|
||||
Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{wrongly_named_version}.tar.gz
|
||||
Source1: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{wrongly_named_version}.tar.gz.asc
|
||||
Source2: sshd.pamd
|
||||
Source3: README.SUSE
|
||||
Source4: README.kerberos
|
||||
@@ -111,14 +132,12 @@ Patch39: openssh-8.1p1-use-openssl-kdf.patch
|
||||
Patch40: openssh-8.1p1-ed25519-use-openssl-rng.patch
|
||||
Patch41: openssh-fips-ensure-approved-moduli.patch
|
||||
Patch42: openssh-link-with-sk.patch
|
||||
Patch43: openssh-reenable-dh-group14-sha1-default.patch
|
||||
Patch45: openssh-8.4p1-ssh_config_d.patch
|
||||
Patch46: openssh-whitelist-syscalls.patch
|
||||
Patch47: openssh-8.4p1-vendordir.patch
|
||||
Patch48: openssh-8.4p1-pam_motd.patch
|
||||
Patch49: openssh-do-not-send-empty-message.patch
|
||||
Patch50: openssh-openssl-3.patch
|
||||
Patch51: wtmpdb.patch
|
||||
Patch52: logind_set_tty.patch
|
||||
Patch54: openssh-mitigate-lingering-secrets.patch
|
||||
Patch102: openssh-7.8p1-role-mls.patch
|
||||
@@ -126,20 +145,23 @@ Patch103: openssh-6.6p1-privsep-selinux.patch
|
||||
Patch104: openssh-6.6p1-keycat.patch
|
||||
Patch105: openssh-6.6.1p1-selinux-contexts.patch
|
||||
Patch106: openssh-7.6p1-cleanup-selinux.patch
|
||||
# PATCH-FIX-OPENSUSE bsc#1211301 Add crypto-policies support
|
||||
Patch107: openssh-9.6p1-crypto-policies.patch
|
||||
Patch108: openssh-9.6p1-crypto-policies-man.patch
|
||||
Patch109: fix-memleak-in-process_server_config_line_depth.patch
|
||||
# PATCH-FIX-UPSTREAM alarrosa@suse.com -- https://github.com/openssh/openssh-portable/pull/516
|
||||
Patch110: fix-audit-fail-attempt.patch
|
||||
Patch107: openssh-send-extra-term-env.patch
|
||||
# 200 - 300 -- Patches submitted to upstream
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/openssh/openssh-portable/pull/452 boo#1229010
|
||||
Patch111: 0001-auth-pam-Immediately-report-instructions-to-clients-and-fix-handling-in-ssh-client.patch
|
||||
%if 0%{with allow_root_password_login_by_default}
|
||||
Patch1000: openssh-7.7p1-allow_root_password_login.patch
|
||||
Patch200: 0001-auth-pam-Immediately-report-instructions-to-clients-and-fix-handling-in-ssh-client.patch
|
||||
# 1000 - 2000 -- Conditional patches
|
||||
%if %{with crypto_policies}
|
||||
# PATCH-FIX-OPENSUSE bsc#1211301 Add crypto-policies support
|
||||
Patch1000: openssh-9.6p1-crypto-policies.patch
|
||||
Patch1001: openssh-9.6p1-crypto-policies-man.patch
|
||||
%endif
|
||||
%if %{with allow_root_password_login_by_default}
|
||||
# PATCH-FIX-SLE Allow root login with password by default (for SLE12 and SLE15)
|
||||
Patch1002: openssh-7.7p1-allow_root_password_login.patch
|
||||
%endif
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: automake
|
||||
%if 0%{?sle_version} >= 150500
|
||||
%if 0%{?suse_version} < 1600
|
||||
BuildRequires: gcc11
|
||||
%endif
|
||||
BuildRequires: groff
|
||||
@@ -148,17 +170,22 @@ BuildRequires: libselinux-devel
|
||||
%if %{with ldap}
|
||||
BuildRequires: openldap2-devel
|
||||
%endif
|
||||
%if %{with openssl11}
|
||||
BuildRequires: libopenssl-1_1-devel
|
||||
BuildRequires: openssl-1_1
|
||||
%else
|
||||
BuildRequires: openssl-devel
|
||||
%endif
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: sysuser-shadow
|
||||
BuildRequires: sysuser-tools
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(libfido2) >= 1.2.0
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: sysuser-shadow
|
||||
BuildRequires: sysuser-tools
|
||||
Requires: %{name}-clients = %{version}-%{release}
|
||||
Requires: %{name}-server = %{version}-%{release}
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%if 0%{?suse_version} >= 1550 || 0%{?suse_version} < 1500
|
||||
BuildRequires: pkgconfig(krb5)
|
||||
%else
|
||||
BuildRequires: krb5-mini-devel
|
||||
@@ -185,8 +212,8 @@ components.
|
||||
Summary: SSH (Secure Shell) common files
|
||||
Group: Productivity/Networking/SSH
|
||||
Conflicts: nonfreessh
|
||||
Conflicts: %{name}-fips < %{version}-%{release}
|
||||
Conflicts: %{name}-fips > %{version}-%{release}
|
||||
Provides: %{name}-fips = %{version}-%{release}
|
||||
Obsoletes: %{name}-fips < %{version}-%{release}
|
||||
|
||||
%description common
|
||||
SSH (Secure Shell) is a program for logging into and executing commands
|
||||
@@ -204,14 +231,16 @@ clients.
|
||||
Summary: SSH (Secure Shell) server
|
||||
Group: Productivity/Networking/SSH
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
%if %{with crypto_policies}
|
||||
Requires: crypto-policies >= 20220824
|
||||
%endif
|
||||
Recommends: audit
|
||||
Requires(pre): findutils
|
||||
Requires(pre): grep
|
||||
Requires(post): %fillup_prereq
|
||||
Requires(post): permissions
|
||||
Provides: openssh:%{_sbindir}/sshd
|
||||
%if 0%{with allow_root_password_login_by_default}
|
||||
%if %{with allow_root_password_login_by_default}
|
||||
# For a brief period of time this package existed in SLE/Leap.
|
||||
# It was removed before GM but some people might have it from
|
||||
# a beta distribution version (boo#1227350)
|
||||
@@ -231,7 +260,7 @@ also be forwarded over the secure channel.
|
||||
This package contains the Secure Shell daemon, which allows clients to
|
||||
securely connect to your server.
|
||||
|
||||
%if 0%{with allow_root_password_login_by_default}
|
||||
%if %{with allow_root_password_login_by_default}
|
||||
%package server-config-disallow-rootlogin
|
||||
Summary: Config to disallow password root logins to sshd
|
||||
Group: Productivity/Networking/SSH
|
||||
@@ -244,6 +273,7 @@ root logins. This package provides a config that disallows root
|
||||
to log in using the passwor. It's useful to secure your system
|
||||
preventing password attacks on the root account over ssh.
|
||||
%else
|
||||
|
||||
%package server-config-rootlogin
|
||||
Summary: Config to permit root logins to sshd
|
||||
Group: Productivity/Networking/SSH
|
||||
@@ -260,7 +290,9 @@ ssh-copy-id(1).
|
||||
%package clients
|
||||
Summary: SSH (Secure Shell) client applications
|
||||
Group: Productivity/Networking/SSH
|
||||
%if %{with crypto_policies}
|
||||
Requires: crypto-policies >= 20220824
|
||||
%endif
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Provides: openssh:%{_bindir}/ssh
|
||||
|
||||
@@ -295,18 +327,6 @@ This package contains helper applications for OpenSSH which retrieve
|
||||
keys from various sources.
|
||||
%endif
|
||||
|
||||
%package fips
|
||||
Summary: OpenSSH FIPS crypto module HMACs
|
||||
Group: Productivity/Networking/SSH
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Conflicts: %{name}-common < %{version}-%{release}
|
||||
Conflicts: %{name}-common > %{version}-%{release}
|
||||
Obsoletes: %{name}-hmac
|
||||
|
||||
%description fips
|
||||
This package contains hashes that, together with the main openssh packages,
|
||||
form the FIPS certifiable crypto module.
|
||||
|
||||
%package cavs
|
||||
Summary: OpenSSH FIPS crypto module CAVS tests
|
||||
Group: Productivity/Networking/SSH
|
||||
@@ -317,7 +337,7 @@ This package contains the FIPS-140 CAVS (Cryptographic Algorithm
|
||||
Validation Program/Suite) related tests of OpenSSH.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n "%{name}-%{wrongly_named_version}"
|
||||
cp %{SOURCE3} %{SOURCE4} %{SOURCE11} .
|
||||
|
||||
%autopatch -p1
|
||||
@@ -329,7 +349,7 @@ sed -i.libexec 's,@LIBEXECDIR@,%{_libexecdir}/ssh,' \
|
||||
)
|
||||
|
||||
%build
|
||||
%if 0%{?sle_version} >= 150500
|
||||
%if 0%{?suse_version} < 1600
|
||||
export CC=gcc-11
|
||||
%endif
|
||||
autoreconf -fiv
|
||||
@@ -356,7 +376,9 @@ export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
|
||||
%if %{sandbox_seccomp}
|
||||
--with-sandbox=seccomp_filter \
|
||||
%else
|
||||
%if %{sandbox_rlimit}
|
||||
--with-sandbox=rlimit \
|
||||
%endif
|
||||
%endif
|
||||
--disable-strip \
|
||||
--with-audit=linux \
|
||||
@@ -370,9 +392,8 @@ export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1550
|
||||
--disable-lastlog \
|
||||
--with-logind \
|
||||
%endif
|
||||
--enable-dsa-keys \
|
||||
--with-logind \
|
||||
--with-security-key-builtin \
|
||||
--target=%{_target_cpu}-suse-linux
|
||||
|
||||
@@ -399,7 +420,9 @@ install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/slp.reg.d/
|
||||
install -D -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/sshd.service
|
||||
install -D -m 0644 %{SOURCE16} %{buildroot}%{_unitdir}/sshd@.service
|
||||
install -D -m 0644 %{SOURCE17} %{buildroot}%{_unitdir}/sshd.socket
|
||||
%if 0%{?suse_version} < 1600
|
||||
ln -s service %{buildroot}%{_sbindir}/rcsshd
|
||||
%endif
|
||||
install -d -m 755 %{buildroot}%{_fillupdir}
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_fillupdir}
|
||||
# install shell script to automate the process of adding your public key to a remote machine
|
||||
@@ -407,7 +430,7 @@ install -m 755 contrib/ssh-copy-id %{buildroot}%{_bindir}
|
||||
install -m 644 contrib/ssh-copy-id.1 %{buildroot}%{_mandir}/man1
|
||||
sed -i -e s@%{_prefix}/libexec@%{_libexecdir}@g %{buildroot}%{_sysconfdir}/ssh/sshd_config
|
||||
|
||||
%if 0%{with allow_root_password_login_by_default}
|
||||
%if %{with allow_root_password_login_by_default}
|
||||
echo "PermitRootLogin prohibit-password" > %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||
%else
|
||||
echo "PermitRootLogin yes" > %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
||||
@@ -419,19 +442,21 @@ mkdir -p %{buildroot}%{_distconfdir}/ssh/ssh{,d}_config.d
|
||||
mv %{buildroot}%{_sysconfdir}/ssh/moduli %{buildroot}%{_distconfdir}/ssh/
|
||||
mv %{buildroot}%{_sysconfdir}/ssh/ssh_config %{buildroot}%{_distconfdir}/ssh/
|
||||
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config %{buildroot}%{_distconfdir}/ssh/
|
||||
%if 0%{with allow_root_password_login_by_default}
|
||||
%if %{with allow_root_password_login_by_default}
|
||||
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf %{buildroot}%{_distconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||
%else
|
||||
mv %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/50-permit-root-login.conf %{buildroot}%{_distconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with crypto_policies}
|
||||
install -m 644 ssh_config_suse %{buildroot}%{_sysconfdir}/ssh/ssh_config.d/50-suse.conf
|
||||
%if %{defined _distconfdir}
|
||||
install -m 644 sshd_config_suse_cp %{buildroot}%{_distconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
||||
%else
|
||||
install -m 644 sshd_config_suse_cp %{buildroot}%{_sysconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} < 1550
|
||||
# install firewall definitions
|
||||
@@ -457,13 +482,19 @@ install -m 644 %{SOURCE14} %{buildroot}%{_sysusersdir}/sshd.conf
|
||||
#
|
||||
# this shows up earlier because otherwise the %%expand of
|
||||
# the macro is too late.
|
||||
%if %{with openssl11}
|
||||
%define opensslbin openssl-1_1
|
||||
%else
|
||||
%define opensslbin openssl
|
||||
%endif
|
||||
|
||||
%{expand:%%global __os_install_post {%__os_install_post
|
||||
for b in \
|
||||
%{_bindir}/ssh \
|
||||
%{_sbindir}/sshd \
|
||||
%{_libexecdir}/ssh/sftp-server \
|
||||
; do
|
||||
openssl dgst -sha256 -binary -hmac %{CHECKSUM_HMAC_KEY} < %{buildroot}$b > %{buildroot}$b%{CHECKSUM_SUFFIX}
|
||||
%{opensslbin} dgst -sha256 -binary -hmac %{CHECKSUM_HMAC_KEY} < %{buildroot}$b > %{buildroot}$b%{CHECKSUM_SUFFIX}
|
||||
done
|
||||
|
||||
}}
|
||||
@@ -481,6 +512,7 @@ test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/
|
||||
%{fillup_only -n ssh}
|
||||
%service_add_post sshd.service sshd.socket
|
||||
|
||||
%if %{with crypto_policies}
|
||||
%if ! %{defined _distconfdir}
|
||||
test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.conf" /etc/ssh/sshd_config || ( \
|
||||
echo "WARNING: /etc/ssh/sshd_config doesn't include config files from"
|
||||
@@ -489,20 +521,15 @@ test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.c
|
||||
echo "/etc/ssh/sshd_config :"
|
||||
echo "Include /etc/ssh/sshd_config.d/*.conf" ) ) ||:
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%preun server
|
||||
%service_del_preun sshd.service sshd.socket
|
||||
|
||||
%postun server
|
||||
# The openssh-fips trigger script for openssh will normally restart sshd once
|
||||
# it gets installed, so only restart the service here if openssh-fips is not
|
||||
# present.
|
||||
if rpm -q openssh-fips >/dev/null 2>/dev/null; then
|
||||
%service_del_postun_without_restart sshd.service sshd.socket
|
||||
else
|
||||
%service_del_postun sshd.service sshd.socket
|
||||
fi
|
||||
|
||||
%if %{with crypto_policies}
|
||||
%if ! %{defined _distconfdir}
|
||||
%post server-config-disallow-rootlogin
|
||||
test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.conf" /etc/ssh/sshd_config || ( \
|
||||
@@ -512,6 +539,7 @@ test -f /etc/ssh/sshd_config && (grep -q "^Include /etc/ssh/sshd_config\.d/\*\.c
|
||||
echo "the following line is added at the start of /etc/ssh/sshd_config :"
|
||||
echo "Include /etc/ssh/sshd_config.d/*.conf" ) ) ||:
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{defined _distconfdir}
|
||||
%posttrans server
|
||||
@@ -526,6 +554,7 @@ test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/
|
||||
test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config.rpmsave.old ||:
|
||||
%endif
|
||||
|
||||
%if %{with crypto_policies}
|
||||
%if ! %{defined _distconfdir}
|
||||
%post clients
|
||||
test -f /etc/ssh/ssh_config && (grep -q "^Include /etc/ssh/ssh_config\.d/\*\.conf" /etc/ssh/ssh_config || ( \
|
||||
@@ -535,6 +564,7 @@ test -f /etc/ssh/ssh_config && (grep -q "^Include /etc/ssh/ssh_config\.d/\*\.con
|
||||
echo "/etc/ssh/ssh_config :"
|
||||
echo "Include /etc/ssh/ssh_config.d/*.conf" ) ) ||:
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{defined _distconfdir}
|
||||
%posttrans clients
|
||||
@@ -542,9 +572,6 @@ test -f /etc/ssh/ssh_config && (grep -q "^Include /etc/ssh/ssh_config\.d/\*\.con
|
||||
test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config ||:
|
||||
%endif
|
||||
|
||||
%triggerin -n openssh-fips -- %{name} = %{version}-%{release}
|
||||
%restart_on_update sshd
|
||||
|
||||
%files
|
||||
# openssh is an empty package that depends on -clients and -server,
|
||||
# resulting in a clean upgrade path from prior to the split even when
|
||||
@@ -569,7 +596,10 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
|
||||
%files server
|
||||
%attr(0755,root,root) %{_sbindir}/sshd
|
||||
%attr(0444,root,root) %{_sbindir}/sshd%{CHECKSUM_SUFFIX}
|
||||
%if 0%{?suse_version} < 1600
|
||||
%attr(0755,root,root) %{_sbindir}/rcsshd
|
||||
%endif
|
||||
%attr(0755,root,root) %{_sbindir}/sshd-gen-keys-start
|
||||
%dir %attr(0755,root,root) %{_localstatedir}/lib/sshd
|
||||
%dir %attr(0755,root,root) %{_sysconfdir}/ssh/sshd_config.d
|
||||
@@ -582,11 +612,13 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
%attr(0640,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
|
||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/sshd
|
||||
%endif
|
||||
%if %{with crypto_policies}
|
||||
%if %{defined _distconfdir}
|
||||
%attr(0600,root,root) %config(noreplace) %{_distconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
||||
%else
|
||||
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config.d/40-suse-crypto-policies.conf
|
||||
%endif
|
||||
%endif
|
||||
%attr(0644,root,root) %{_unitdir}/sshd.service
|
||||
%attr(0644,root,root) %{_unitdir}/sshd@.service
|
||||
%attr(0644,root,root) %{_unitdir}/sshd.socket
|
||||
@@ -595,7 +627,9 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
%attr(0444,root,root) %{_mandir}/man8/sftp-server.8*
|
||||
%attr(0444,root,root) %{_mandir}/man8/sshd.8*
|
||||
%attr(0755,root,root) %{_libexecdir}/ssh/sftp-server
|
||||
%attr(0444,root,root) %{_libexecdir}/ssh/sftp-server%{CHECKSUM_SUFFIX}
|
||||
%attr(0755,root,root) %{_libexecdir}/ssh/sshd-session
|
||||
%attr(0755,root,root) %{_libexecdir}/ssh/sshd-auth
|
||||
%if 0%{?suse_version} < 1600
|
||||
%dir %{_sysconfdir}/slp.reg.d
|
||||
%config %{_sysconfdir}/slp.reg.d/ssh.reg
|
||||
@@ -607,7 +641,7 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
%config %{_fwdefdir}/sshd
|
||||
%endif
|
||||
|
||||
%if 0%{with allow_root_password_login_by_default}
|
||||
%if %{with allow_root_password_login_by_default}
|
||||
%files server-config-disallow-rootlogin
|
||||
%if %{defined _distconfdir}
|
||||
%{_distconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||
@@ -615,6 +649,7 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
%config(noreplace) %{_sysconfdir}/ssh/sshd_config.d/51-permit-root-login.conf
|
||||
%endif
|
||||
%else
|
||||
|
||||
%files server-config-rootlogin
|
||||
%if %{defined _distconfdir}
|
||||
%{_distconfdir}/ssh/sshd_config.d/50-permit-root-login.conf
|
||||
@@ -624,14 +659,17 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
%endif
|
||||
|
||||
%files clients
|
||||
%if %{with crypto_policies}
|
||||
%dir %attr(0755,root,root) %{_sysconfdir}/ssh/ssh_config.d
|
||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config.d/50-suse.conf
|
||||
%endif
|
||||
%if %{defined _distconfdir}
|
||||
%attr(0644,root,root) %{_distconfdir}/ssh/ssh_config
|
||||
%else
|
||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
|
||||
%endif
|
||||
%attr(0755,root,root) %{_bindir}/ssh
|
||||
%attr(0444,root,root) %{_bindir}/ssh%{CHECKSUM_SUFFIX}
|
||||
%attr(0755,root,root) %{_bindir}/scp*
|
||||
%attr(0755,root,root) %{_bindir}/sftp*
|
||||
%attr(0755,root,root) %{_bindir}/ssh-add*
|
||||
@@ -666,11 +704,6 @@ test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ss
|
||||
%doc HOWTO.ldap-keys openssh-lpk-openldap.schema openssh-lpk-sun.schema
|
||||
%endif
|
||||
|
||||
%files fips
|
||||
%attr(0444,root,root) %{_bindir}/ssh%{CHECKSUM_SUFFIX}
|
||||
%attr(0444,root,root) %{_sbindir}/sshd%{CHECKSUM_SUFFIX}
|
||||
%attr(0444,root,root) %{_libexecdir}/ssh/sftp-server%{CHECKSUM_SUFFIX}
|
||||
|
||||
%files cavs
|
||||
%attr(0755,root,root) %{_libexecdir}/ssh/cavs*
|
||||
|
||||
|
@@ -4,6 +4,5 @@ test -f /etc/sysconfig/ssh && . /etc/sysconfig/ssh
|
||||
|
||||
if [ "x$SSHD_AUTO_KEYGEN" != "xno" ]; then
|
||||
echo "Checking for missing server keys in /etc/ssh"
|
||||
test -d /etc/ssh || mkdir -p /etc/ssh
|
||||
ssh-keygen -A
|
||||
fi
|
||||
|
@@ -8,4 +8,3 @@ session required pam_loginuid.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include common-session
|
||||
session optional pam_motd.so
|
||||
|
||||
|
189
wtmpdb.patch
189
wtmpdb.patch
@@ -1,189 +0,0 @@
|
||||
diff -ur openssh-8.9p1.old/configure.ac openssh-8.9p1/configure.ac
|
||||
--- openssh-8.9p1.old/configure.ac 2022-02-23 12:31:11.000000000 +0100
|
||||
+++ openssh-8.9p1/configure.ac 2023-04-17 14:52:21.499002203 +0200
|
||||
@@ -1703,6 +1703,49 @@
|
||||
fi ]
|
||||
)
|
||||
|
||||
+# Check whether user wants wtmpdb support
|
||||
+WTMPDB_MSG="no"
|
||||
+AC_ARG_WITH([wtmpdb],
|
||||
+ [ --with-wtmpdb[[=PATH]] Enable wtmpdb support for sshd],
|
||||
+ [ if test "x$withval" != "xno" ; then
|
||||
+ if test "x$withval" = "xyes" ; then
|
||||
+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
|
||||
+ if test "x$PKGCONFIG" != "xno"; then
|
||||
+ AC_MSG_CHECKING([if $PKGCONFIG knows about wtmpdb])
|
||||
+ if "$PKGCONFIG" libwtmpdb; then
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+ use_pkgconfig_for_libwtmpdb=yes
|
||||
+ else
|
||||
+ AC_MSG_RESULT([no])
|
||||
+ fi
|
||||
+ fi
|
||||
+ else
|
||||
+ CPPFLAGS="$CPPFLAGS -I${withval}/include"
|
||||
+ if test -n "${rpath_opt}"; then
|
||||
+ LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
|
||||
+ else
|
||||
+ LDFLAGS="-L${withval}/lib ${LDFLAGS}"
|
||||
+ fi
|
||||
+ fi
|
||||
+ if test "x$use_pkgconfig_for_libwtmpdb" = "xyes"; then
|
||||
+ LIBWTMPDB=`$PKGCONFIG --libs libwtmpdb`
|
||||
+ CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libwtmpdb`"
|
||||
+ else
|
||||
+ LIBWTMPDB="-lwtmpdb"
|
||||
+ fi
|
||||
+ OTHERLIBS=`echo $LIBWTMPDB | sed 's/-lwtmpdb//'`
|
||||
+ AC_CHECK_LIB([wtmpdb], [wtmpdb_login],
|
||||
+ [ AC_DEFINE([USE_WTMPDB], [1], [Use libwtmpdb for sshd])
|
||||
+ WTMPDB_MSG="yes"
|
||||
+ AC_SUBST([LIBWTMPDB])
|
||||
+ ],
|
||||
+ [ AC_MSG_ERROR([libwtmpdb not found]) ],
|
||||
+ [ $OTHERLIBS ]
|
||||
+ )
|
||||
+ fi ]
|
||||
+)
|
||||
+
|
||||
+
|
||||
AUDIT_MODULE=none
|
||||
AC_ARG_WITH([audit],
|
||||
[ --with-audit=module Enable audit support (modules=debug,bsm,linux)],
|
||||
diff -ur openssh-8.9p1.old/loginrec.c openssh-8.9p1/loginrec.c
|
||||
--- openssh-8.9p1.old/loginrec.c 2022-02-23 12:31:11.000000000 +0100
|
||||
+++ openssh-8.9p1/loginrec.c 2023-04-18 10:05:04.311193333 +0200
|
||||
@@ -187,6 +187,10 @@
|
||||
# include <util.h>
|
||||
#endif
|
||||
|
||||
+#ifdef USE_WTMPDB
|
||||
+# include <wtmpdb.h>
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
** prototypes for helper functions in this file
|
||||
**/
|
||||
@@ -207,6 +211,9 @@
|
||||
int wtmpx_write_entry(struct logininfo *li);
|
||||
int lastlog_write_entry(struct logininfo *li);
|
||||
int syslogin_write_entry(struct logininfo *li);
|
||||
+#ifdef USE_WTMPDB
|
||||
+int wtmpdb_write_entry(struct logininfo *li);
|
||||
+#endif
|
||||
|
||||
int getlast_entry(struct logininfo *li);
|
||||
int lastlog_get_entry(struct logininfo *li);
|
||||
@@ -467,6 +474,9 @@
|
||||
#ifdef USE_WTMPX
|
||||
wtmpx_write_entry(li);
|
||||
#endif
|
||||
+#ifdef USE_WTMPDB
|
||||
+ wtmpdb_write_entry(li);
|
||||
+#endif
|
||||
#ifdef CUSTOM_SYS_AUTH_RECORD_LOGIN
|
||||
if (li->type == LTYPE_LOGIN &&
|
||||
!sys_auth_record_login(li->username,li->hostname,li->line,
|
||||
@@ -1409,6 +1419,64 @@
|
||||
}
|
||||
#endif /* USE_WTMPX */
|
||||
|
||||
+#ifdef USE_WTMPDB
|
||||
+static int
|
||||
+wtmpdb_perform_login(struct logininfo *li)
|
||||
+{
|
||||
+ uint64_t login_time = li->tv_sec * ((uint64_t) 1000000ULL) + li->tv_usec;
|
||||
+ const char *tty;
|
||||
+
|
||||
+ if (strncmp(li->line, "/dev/", 5) == 0)
|
||||
+ tty = &(li->line[5]);
|
||||
+ else
|
||||
+ tty = li->line;
|
||||
+
|
||||
+ li->wtmpdb_id = wtmpdb_login(NULL, USER_PROCESS, li->username,
|
||||
+ login_time, tty, li->hostname, 0, 0);
|
||||
+ if (li->wtmpdb_id < 0)
|
||||
+ return (0);
|
||||
+
|
||||
+ return (1);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+wtmpdb_perform_logout(struct logininfo *li)
|
||||
+{
|
||||
+ uint64_t logout_time = li->tv_sec * ((uint64_t) 1000000ULL) + li->tv_usec;
|
||||
+
|
||||
+ if (li->wtmpdb_id == 0) {
|
||||
+ const char *tty;
|
||||
+
|
||||
+ if (strncmp(li->line, "/dev/", 5) == 0)
|
||||
+ tty = &(li->line[5]);
|
||||
+ else
|
||||
+ tty = li->line;
|
||||
+
|
||||
+ li->wtmpdb_id = wtmpdb_get_id(NULL, tty, NULL);
|
||||
+ }
|
||||
+ wtmpdb_logout(NULL, li->wtmpdb_id, logout_time, NULL);
|
||||
+
|
||||
+ return (1);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int
|
||||
+wtmpdb_write_entry(struct logininfo *li)
|
||||
+{
|
||||
+ switch(li->type) {
|
||||
+ case LTYPE_LOGIN:
|
||||
+ return (wtmpdb_perform_login(li));
|
||||
+ case LTYPE_LOGOUT:
|
||||
+ return (wtmpdb_perform_logout(li));
|
||||
+ default:
|
||||
+ logit("%s: invalid type field", __func__);
|
||||
+ return (0);
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/**
|
||||
** Low-level libutil login() functions
|
||||
**/
|
||||
diff -ur openssh-8.9p1.old/loginrec.h openssh-8.9p1/loginrec.h
|
||||
--- openssh-8.9p1.old/loginrec.h 2022-02-23 12:31:11.000000000 +0100
|
||||
+++ openssh-8.9p1/loginrec.h 2023-04-17 14:58:20.808850750 +0200
|
||||
@@ -79,6 +79,9 @@
|
||||
unsigned int tv_sec;
|
||||
unsigned int tv_usec;
|
||||
union login_netinfo hostaddr; /* caller's host address(es) */
|
||||
+#ifdef USE_WTMPDB
|
||||
+ int64_t wtmpdb_id; /* ID for wtmpdb_logout */
|
||||
+#endif
|
||||
}; /* struct logininfo */
|
||||
|
||||
/*
|
||||
diff -ur openssh-8.9p1.old/Makefile.in openssh-8.9p1/Makefile.in
|
||||
--- openssh-8.9p1.old/Makefile.in 2022-02-23 12:31:11.000000000 +0100
|
||||
+++ openssh-8.9p1/Makefile.in 2023-04-17 14:44:32.156538001 +0200
|
||||
@@ -55,6 +55,7 @@
|
||||
SSHDLIBS=@SSHDLIBS@
|
||||
LIBEDIT=@LIBEDIT@
|
||||
LIBFIDO2=@LIBFIDO2@
|
||||
+LIBWTMPDB=@LIBWTMPDB@
|
||||
AR=@AR@
|
||||
AWK=@AWK@
|
||||
RANLIB=@RANLIB@
|
||||
@@ -212,10 +213,10 @@
|
||||
$(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(GSSLIBS) $(CHANNELLIBS)
|
||||
|
||||
sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
|
||||
- $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS)
|
||||
+ $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(CHANNELLIBS) $(LIBWTMPDB)
|
||||
|
||||
sshd-session$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHD_SESSION_OBJS)
|
||||
- $(LD) -o $@ $(SSHD_SESSION_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) $(CHANNELLIBS)
|
||||
+ $(LD) -o $@ $(SSHD_SESSION_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) $(CHANNELLIBS) $(LIBWTMPDB)
|
||||
|
||||
scp$(EXEEXT): $(LIBCOMPAT) libssh.a $(SCP_OBJS)
|
||||
$(LD) -o $@ $(SCP_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
|
Reference in New Issue
Block a user