Antonio Larrosa
da2c6cc517
* No changes for askpass, see main package changelog for details. - Fix a dbus connection leaked in the logind patch that was missing a sd_bus_unref call (found by Matthias Gerstner): * logind_set_tty.patch - Add a patch that fixes a small memory leak when parsing the subsystem configuration option: * fix-memleak-in-process_server_config_line_depth.patch - Update to openssh 9.8p1: = Security * 1) Race condition in sshd(8) (bsc#1226642, CVE-2024-6387). A critical vulnerability in sshd(8) was present in Portable OpenSSH versions between 8.5p1 and 9.7p1 (inclusive) that may allow arbitrary code execution with root privileges. Successful exploitation has been demonstrated on 32-bit Linux/glibc systems with ASLR. Under lab conditions, the attack requires on average 6-8 hours of continuous connections up to the maximum the server will accept. Exploitation on 64-bit systems is believed to be possible but has not been demonstrated at this time. It's likely that these attacks will be improved upon. Exploitation on non-glibc systems is conceivable but has not been examined. Systems that lack ASLR or users of downstream Linux distributions that have modified OpenSSH to disable per-connection ASLR re-randomisation (yes - this is a thing, no - we don't understand why) may potentially have an easier path to exploitation. OpenBSD is not vulnerable. OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=272
88 lines
2.5 KiB
Diff
88 lines
2.5 KiB
Diff
# HG changeset patch
|
|
# Parent d296e85dc414b8cd1b4b55ad03d8216feb26531a
|
|
Send signals to systemd to prevent various race conditions
|
|
bsc#1048367
|
|
|
|
Index: openssh-8.8p1/configure.ac
|
|
===================================================================
|
|
--- openssh-8.8p1.orig/configure.ac
|
|
+++ openssh-8.8p1/configure.ac
|
|
@@ -4751,6 +4751,30 @@ AC_ARG_WITH([kerberos5],
|
|
# AC_SUBST([GSSLIBS])
|
|
AC_SUBST([K5LIBS])
|
|
AC_SUBST([CHANNELLIBS])
|
|
|
|
+# Check whether user wants systemd support
|
|
+SYSTEMD_MSG="no"
|
|
+AC_ARG_WITH(systemd,
|
|
+ [ --with-systemd Enable systemd support],
|
|
+ [ if test "x$withval" != "xno" ; then
|
|
+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
|
|
+ if test "$PKGCONFIG" != "no"; then
|
|
+ AC_MSG_CHECKING([for libsystemd])
|
|
+ if $PKGCONFIG --exists libsystemd; then
|
|
+ SYSTEMD_CFLAGS=`$PKGCONFIG --cflags libsystemd`
|
|
+ SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
|
|
+ CPPFLAGS="$CPPFLAGS $SYSTEMD_CFLAGS"
|
|
+ SSHDLIBS="$SSHDLIBS $SYSTEMD_LIBS"
|
|
+ AC_MSG_RESULT([yes])
|
|
+ AC_DEFINE(HAVE_SYSTEMD, 1, [Define if you want systemd support.])
|
|
+ SYSTEMD_MSG="yes"
|
|
+ else
|
|
+ AC_MSG_RESULT([no])
|
|
+ fi
|
|
+ fi
|
|
+ fi ]
|
|
+)
|
|
+
|
|
+
|
|
# Looking for programs, paths and files
|
|
|
|
PRIVSEP_PATH=/var/empty
|
|
@@ -5564,6 +5588,7 @@ echo " libldns support
|
|
echo " Solaris process contract support: $SPC_MSG"
|
|
echo " Solaris project support: $SP_MSG"
|
|
echo " Solaris privilege support: $SPP_MSG"
|
|
+echo " systemd support: $SYSTEMD_MSG"
|
|
echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
|
|
echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
|
|
echo " BSD Auth support: $BSD_AUTH_MSG"
|
|
Index: openssh-8.8p1/sshd.c
|
|
===================================================================
|
|
--- openssh-8.8p1.orig/sshd.c
|
|
+++ openssh-8.8p1/sshd.c
|
|
@@ -85,6 +85,10 @@
|
|
#include <prot.h>
|
|
#endif
|
|
|
|
+#ifdef HAVE_SYSTEMD
|
|
+#include <systemd/sd-daemon.h>
|
|
+#endif
|
|
+
|
|
#include "xmalloc.h"
|
|
#include "ssh.h"
|
|
#include "sshpty.h"
|
|
@@ -308,6 +312,10 @@ sighup_handler(int sig)
|
|
static void
|
|
sighup_restart(void)
|
|
{
|
|
+#ifdef HAVE_SYSTEMD
|
|
+ /* Signal systemd that we are reloading */
|
|
+ sd_notify(0, "RELOADING=1");
|
|
+#endif
|
|
logit("Received SIGHUP; restarting.");
|
|
if (options.pid_file != NULL)
|
|
unlink(options.pid_file);
|
|
@@ -2076,6 +2084,11 @@ main(int ac, char **av)
|
|
}
|
|
}
|
|
|
|
+#ifdef HAVE_SYSTEMD
|
|
+ /* Signal systemd that we are ready to accept connections */
|
|
+ sd_notify(0, "READY=1");
|
|
+#endif
|
|
+
|
|
/* Accept a connection and return in a forked child */
|
|
server_accept_loop(&sock_in, &sock_out,
|
|
&newsock, config_s, log_stderr);
|