Commit Graph

67 Commits

Author SHA1 Message Date
Peter Müller
89e47eaca8 OpenSSH: Update to 9.1p1
Please refer to https://www.openssh.com/releasenotes.html#9.1 for the
release announcement of this version.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-10-24 08:59:27 +00:00
Peter Müller
7554e857ee OpenSSH: Update to 9.0p1
Relevant changelog part, as retrieved from https://www.openssh.com/txt/release-9.0:

Changes since OpenSSH 8.9
=========================

This release is focused on bug fixing.

Potentially-incompatible changes
--------------------------------

This release switches scp(1) from using the legacy scp/rcp protocol
to using the SFTP protocol by default.

Legacy scp/rcp performs wildcard expansion of remote filenames (e.g.
"scp host:* .") through the remote shell. This has the side effect of
requiring double quoting of shell meta-characters in file names
included on scp(1) command-lines, otherwise they could be interpreted
as shell commands on the remote side.

This creates one area of potential incompatibility: scp(1) when using
the SFTP protocol no longer requires this finicky and brittle quoting,
and attempts to use it may cause transfers to fail. We consider the
removal of the need for double-quoting shell characters in file names
to be a benefit and do not intend to introduce bug-compatibility for
legacy scp/rcp in scp(1) when using the SFTP protocol.

Another area of potential incompatibility relates to the use of remote
paths relative to other user's home directories, for example -
"scp host:~user/file /tmp". The SFTP protocol has no native way to
expand a ~user path. However, sftp-server(8) in OpenSSH 8.7 and later
support a protocol extension "expand-path@openssh.com" to support
this.

In case of incompatibility, the scp(1) client may be instructed to use
the legacy scp/rcp using the -O flag.

New features
------------

 * ssh(1), sshd(8): use the hybrid Streamlined NTRU Prime + x25519 key
   exchange method by default ("sntrup761x25519-sha512@openssh.com").
   The NTRU algorithm is believed to resist attacks enabled by future
   quantum computers and is paired with the X25519 ECDH key exchange
   (the previous default) as a backstop against any weaknesses in
   NTRU Prime that may be discovered in the future. The combination
   ensures that the hybrid exchange offers at least as good security
   as the status quo.

   We are making this change now (i.e. ahead of cryptographically-
   relevant quantum computers) to prevent "capture now, decrypt
   later" attacks where an adversary who can record and store SSH
   session ciphertext would be able to decrypt it once a sufficiently
   advanced quantum computer is available.

 * sftp-server(8): support the "copy-data" extension to allow server-
   side copying of files/data, following the design in
   draft-ietf-secsh-filexfer-extensions-00. bz2948

 * sftp(1): add a "cp" command to allow the sftp client to perform
   server-side file copies.

Bugfixes
--------

 * ssh(1), sshd(8): upstream: fix poll(2) spin when a channel's output
   fd closes without data in the channel buffer. bz3405 and bz3411

 * sshd(8): pack pollfd array in server listen/accept loop. Could
   cause the server to hang/spin when MaxStartups > RLIMIT_NOFILE

 * ssh-keygen(1): avoid NULL deref via the find-principals and
   check-novalidate operations. bz3409 and GHPR#307 respectively.

 * scp(1): fix a memory leak in argument processing. bz3404

 * sshd(8): don't try to resolve ListenAddress directives in the sshd
   re-exec path. They are unused after re-exec and parsing errors
   (possible for example if the host's network configuration changed)
   could prevent connections from being accepted.

 * sshd(8): when refusing a public key authentication request from a
   client for using an unapproved or unsupported signature algorithm
   include the algorithm name in the log message to make debugging
   easier.

Portability
-----------

 * sshd(8): refactor platform-specific locked account check, fixing
   an incorrect free() on platforms with both libiaf and shadow
   passwords (probably only Unixware) GHPR#284,

 * ssh(1), sshd(8): Fix possible integer underflow in scan_scaled(3)
   parsing of K/M/G/etc quantities. bz#3401.

 * sshd(8): provide killpg implementation (mostly for Tandem NonStop)
   GHPR#301.

 * Check for missing ftruncate prototype. GHPR#301

 * sshd(8): default to not using sandbox when cross compiling. On most
   systems poll(2) does not work when the number of FDs is reduced
   with setrlimit, so assume it doesn't when cross compiling and we
   can't run the test.  bz#3398.

 * sshd(8): allow ppoll_time64 in seccomp sandbox. Should fix sandbox
   violations on some (at least i386 and armhf) 32bit Linux platforms.
   bz#3396.

 * Improve detection of -fzero-call-used-regs=all support in
   configure script.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-23 14:27:56 +00:00
Peter Müller
9a7e4d8506 Switch checksums from MD5 to BLAKE2
Historically, the MD5 checksums in our LFS files serve as a protection
against broken downloads, or accidentally corrupted source files.

While the sources are nowadays downloaded via HTTPS, it make sense to
beef up integrity protection for them, since transparently intercepting
TLS is believed to be feasible for more powerful actors, and the state
of the public PKI ecosystem is clearly not helping.

Therefore, this patch switches from MD5 to BLAKE2, updating all LFS
files as well as make.sh to deal with this checksum algorithm. BLAKE2 is
notably faster (and more secure) than SHA2, so the performance penalty
introduced by this patch is negligible, if noticeable at all.

In preparation of this patch, the toolchain files currently used have
been supplied with BLAKE2 checksums as well on
https://source.ipfire.org/.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremeripfire.org>
2022-04-02 14:19:25 +00:00
Adolf Belka
6c6b663085 openssh: Update to version 8.9p1
- Update from 8.8p1 to 8.9p1
- Update of rootfile not required
- Changelog
 OpenSSH 8.9 was released on 2022-02-23. It is available from the
  mirrors listed at https://www.openssh.com/.
 OpenSSH is a 100% complete SSH protocol 2.0 implementation and
  includes sftp client and server support.
Future deprecation notice
 A near-future release of OpenSSH will switch scp(1) from using the
  legacy scp/rcp protocol to using SFTP by default.
 Legacy scp/rcp performs wildcard expansion of remote filenames (e.g.
  "scp host:* .") through the remote shell. This has the side effect of
  requiring double quoting of shell meta-characters in file names
  included on scp(1) command-lines, otherwise they could be interpreted
  as shell commands on the remote side.
 This creates one area of potential incompatibility: scp(1) when using
  the SFTP protocol no longer requires this finicky and brittle quoting,
  and attempts to use it may cause transfers to fail. We consider the
  removal of the need for double-quoting shell characters in file names
  to be a benefit and do not intend to introduce bug-compatibility for
  legacy scp/rcp in scp(1) when using the SFTP protocol.
 Another area of potential incompatibility relates to the use of remote
  paths relative to other user's home directories, for example -
  "scp host:~user/file /tmp". The SFTP protocol has no native way to
  expand a ~user path. However, sftp-server(8) in OpenSSH 8.7 and later
  support a protocol extension "expand-path@openssh.com" to support
  this.
Security Near Miss
 * sshd(8): fix an integer overflow in the user authentication path
   that, in conjunction with other logic errors, could have yielded
   unauthenticated access under difficult to exploit conditions.
   This situation is not exploitable because of independent checks in
   the privilege separation monitor. Privilege separation has been
   enabled by default in since openssh-3.2.2 (released in 2002) and
   has been mandatory since openssh-7.5 (released in 2017). Moreover,
   portable OpenSSH has used toolchain features available in most
   modern compilers to abort on signed integer overflow since
   openssh-6.5 (released in 2014).
   Thanks to Malcolm Stagg for finding and reporting this bug.
Potentially-incompatible changes
 * sshd(8), portable OpenSSH only: this release removes in-built
   support for MD5-hashed passwords. If you require these on your
   system then we recommend linking against libxcrypt or similar.
 * This release modifies the FIDO security key middleware interface
   and increments SSH_SK_VERSION_MAJOR.
Changes since OpenSSH 8.8
This release includes a number of new features.
New features
 * ssh(1), sshd(8), ssh-add(1), ssh-agent(1): add a system for
   restricting forwarding and use of keys added to ssh-agent(1)
   A detailed description of the feature is available at
   https://www.openssh.com/agent-restrict.html and the protocol
   extensions are documented in the PROTOCOL and PROTOCOL.agent
   files in the source release.
 * ssh(1), sshd(8): add the sntrup761x25519-sha512@openssh.com hybrid
   ECDH/x25519 + Streamlined NTRU Prime post-quantum KEX to the
   default KEXAlgorithms list (after the ECDH methods but before the
   prime-group DH ones). The next release of OpenSSH is likely to
   make this key exchange the default method.
 * ssh-keygen(1): when downloading resident keys from a FIDO token,
   pass back the user ID that was used when the key was created and
   append it to the filename the key is written to (if it is not the
   default). Avoids keys being clobbered if the user created multiple
   resident keys with the same application string but different user
   IDs.
 * ssh-keygen(1), ssh(1), ssh-agent(1): better handling for FIDO keys
   on tokens that provide user verification (UV) on the device itself,
   including biometric keys, avoiding unnecessary PIN prompts.
 * ssh-keygen(1): add "ssh-keygen -Y match-principals" operation to
   perform matching of principals names against an allowed signers
   file. To be used towards a TOFU model for SSH signatures in git.
 * ssh-add(1), ssh-agent(1): allow pin-required FIDO keys to be added
   to ssh-agent(1). $SSH_ASKPASS will be used to request the PIN at
   authentication time.
 * ssh-keygen(1): allow selection of hash at sshsig signing time
   (either sha512 (default) or sha256).
 * ssh(1), sshd(8): read network data directly to the packet input
   buffer instead of indirectly via a small stack buffer. Provides a
   modest performance improvement.
 * ssh(1), sshd(8): read data directly to the channel input buffer,
   providing a similar modest performance improvement.
 * ssh(1): extend the PubkeyAuthentication configuration directive to
   accept yes|no|unbound|host-bound to allow control over one of the
   protocol extensions used to implement agent-restricted keys.
Bugfixes
 * sshd(8): document that CASignatureAlgorithms, ExposeAuthInfo and
   PubkeyAuthOptions can be used in a Match block. PR277.
 * sshd(8): fix possible string truncation when constructing paths to
   .rhosts/.shosts files with very long user home directory names.
 * ssh-keysign(1): unbreak for KEX algorithms that use SHA384/512
   exchange hashes
 * ssh(1): don't put the TTY into raw mode when SessionType=none,
   avoids ^C being unable to kill such a session. bz3360
 * scp(1): fix some corner-case bugs in SFTP-mode handling of
   ~-prefixed paths.
 * ssh(1): unbreak hostbased auth using RSA keys. Allow ssh(1) to
   select RSA keys when only RSA/SHA2 signature algorithms are
   configured (this is the default case). Previously RSA keys were
   not being considered in the default case.
 * ssh-keysign(1): make ssh-keysign use the requested signature
   algorithm and not the default for the key type. Part of unbreaking
   hostbased auth for RSA/SHA2 keys.
 * ssh(1): stricter UpdateHostkey signature verification logic on
   the client- side. Require RSA/SHA2 signatures for RSA hostkeys
   except when RSA/SHA1 was explicitly negotiated during initial
   KEX; bz3375
 * ssh(1), sshd(8): fix signature algorithm selection logic for
   UpdateHostkeys on the server side. The previous code tried to
   prefer RSA/SHA2 for hostkey proofs of RSA keys, but missed some
   cases. This will use RSA/SHA2 signatures for RSA keys if the
   client proposed these algorithms in initial KEX. bz3375
 * All: convert all uses of select(2)/pselect(2) to poll(2)/ppoll(2).
   This includes the mainloops in ssh(1), ssh-agent(1), ssh-agent(1)
   and sftp-server(8), as well as the sshd(8) listen loop and all
   other FD read/writability checks. On platforms with missing or
   broken poll(2)/ppoll(2) syscalls a select(2)-based compat shim is
   available.
 * ssh-keygen(1): the "-Y find-principals" command was verifying key
   validity when using ca certs but not with simple key lifetimes
   within the allowed signers file.
 * ssh-keygen(1): make sshsig verify-time argument parsing optional
 * sshd(8): fix truncation in rhosts/shosts path construction.
 * ssh(1), ssh-agent(1): avoid xmalloc(0) for PKCS#11 keyid for ECDSA
   keys (we already did this for RSA keys). Avoids fatal errors for
   PKCS#11 libraries that return empty keyid, e.g. Microchip ATECC608B
   "cryptoauthlib"; bz#3364
 * ssh(1), ssh-agent(1): improve the testing of credentials against
   inserted FIDO: ask the token whether a particular key belongs to
   it in cases where the token supports on-token user-verification
   (e.g. biometrics) rather than just assuming that it will accept it.
   Will reduce spurious "Confirm user presence" notifications for key
   handles that relate to FIDO keys that are not currently inserted in at
   least some cases. bz3366
 * ssh(1), sshd(8): correct value for IPTOS_DSCP_LE. It needs to
   allow for the preceding two ECN bits. bz#3373
 * ssh-keygen(1): add missing -O option to usage() for the "-Y sign"
   option.
 * ssh-keygen(1): fix a NULL deref when using the find-principals
   function, when matching an allowed_signers line that contains a
   namespace restriction, but no restriction specified on the
   command-line
 * ssh-agent(1): fix memleak in process_extension(); oss-fuzz
   issue #42719
 * ssh(1): suppress "Connection to xxx closed" messages when LogLevel
   is set to "error" or above. bz3378
 * ssh(1), sshd(8): use correct zlib flags when inflate(3)-ing
   compressed packet data. bz3372
 * scp(1): when recursively transferring files in SFTP mode, create the
   destination directory if it doesn't already exist to match scp(1) in
   legacy RCP mode behaviour.
 * scp(1): many improvements in error message consistency between scp(1)
   in SFTP mode vs legacy RCP mode.
 * sshd(8): fix potential race in SIGTERM handling PR289
 * ssh(1), ssh(8): since DSA keys are deprecated, move them to the
   end of the default list of public keys so that they will be tried
   last. PR295
 * ssh-keygen(1): allow 'ssh-keygen -Y find-principals' to match
   wildcard principals in allowed_signers files
Portability
 * ssh(1), sshd(8): don't trust closefrom(2) on Linux. glibc's
   implementation does not work in a chroot when the kernel does not
   have close_range(2). It tries to read from /proc/self/fd and when
   that fails dies with an assertion of sorts. Instead, call
   close_range(2) directly from our compat code and fall back if
   that fails.  bz#3349,
 * OS X poll(2) is broken; use compat replacement. For character-
   special devices like /dev/null, Darwin's poll(2) returns POLLNVAL
   when polled with POLLIN. Apparently this is Apple bug 3710161 -
   not public but a websearch will find other OSS projects
   rediscovering it periodically since it was first identified in
   2005.
 * Correct handling of exceptfds/POLLPRI in our select(2)-based
   poll(2)/ppoll(2) compat implementation.
 * Cygwin: correct checking of mbstowcs() return value.
 * Add a basic SECURITY.md that refers people to the openssh.com
   website.
 * Enable additional compiler warnings and toolchain hardening flags,
   including -Wbitwise-instead-of-logical, -Wmisleading-indentation,
   -fzero-call-used-regs and -ftrivial-auto-var-init.
 * HP/UX. Use compat getline(3) on HP-UX 10.x, where the libc version
   is not reliable.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-10 10:36:50 +00:00
Adolf Belka
f877c07e4d openssh: Update to version 8.8p1
- Update from 8.7p1 to 8.8p1
- Update of rootfile not required
- Changelog
   OpenSSH 8.8p1
    Future deprecation notice
     A near-future release of OpenSSH will switch scp(1) from using the
      legacy scp/rcp protocol to using SFTP by default.
     Legacy scp/rcp performs wildcard expansion of remote filenames (e.g.
      "scp host:* .") through the remote shell. This has the side effect of
      requiring double quoting of shell meta-characters in file names
      included on scp(1) command-lines, otherwise they could be interpreted
      as shell commands on the remote side.
     This creates one area of potential incompatibility: scp(1) when using
      the SFTP protocol no longer requires this finicky and brittle quoting,
      and attempts to use it may cause transfers to fail. We consider the
      removal of the need for double-quoting shell characters in file names
      to be a benefit and do not intend to introduce bug- compatibility for
      legacy scp/rcp in scp(1) when using the SFTP protocol.
     Another area of potential incompatibility relates to the use of remote
      paths relative to other user's home directories, for example -
      "scp host:~user/file /tmp". The SFTP protocol has no native way to
      expand a ~user path. However, sftp-server(8) in OpenSSH 8.7 and later
      support a protocol extension "expand-path@openssh.com" to support
      this.
    Security
     sshd(8) from OpenSSH 6.2 through 8.7 failed to correctly initialise
      supplemental groups when executing an AuthorizedKeysCommand or
      AuthorizedPrincipalsCommand, where a AuthorizedKeysCommandUser or
      AuthorizedPrincipalsCommandUser directive has been set to run the
      command as a different user. Instead these commands would inherit
      the groups that sshd(8) was started with.
     Depending on system configuration, inherited groups may allow
      AuthorizedKeysCommand/AuthorizedPrincipalsCommand helper programs to
      gain unintended privilege.
     Neither AuthorizedKeysCommand nor AuthorizedPrincipalsCommand are
      enabled by default in sshd_config(5).
    Potentially-incompatible changes
     This release disables RSA signatures using the SHA-1 hash algorithm
     by default. This change has been made as the SHA-1 hash algorithm is
      cryptographically broken, and it is possible to create chosen-prefix
      hash collisions for <USD$50K [1]
     For most users, this change should be invisible and there is
      no need to replace ssh-rsa keys. OpenSSH has supported RFC8332
      RSA/SHA-256/512 signatures since release 7.2 and existing ssh-rsa keys
      will automatically use the stronger algorithm where possible.
    Changes since OpenSSH 8.7p1
      This release is motivated primarily by the above deprecation and
       security fix.
      New features
        * ssh(1): allow the ssh_config(5) CanonicalizePermittedCNAMEs
          directive to accept a "none" argument to specify the default
          behaviour.
      Bugfixes
        * scp(1): when using the SFTP protocol, continue transferring files
          after a transfer error occurs, better matching original scp/rcp
          behaviour.
        * ssh(1): fixed a number of memory leaks in multiplexing,
        * ssh-keygen(1): avoid crash when using the -Y find-principals
          command.
        * A number of documentation and manual improvements, including
          bz#3340, PR139, PR215, PR241, PR257
      Portability
        * ssh-agent(1): on FreeBSD, use procctl to disable ptrace(2)
        * ssh(1)/sshd(8): some fixes to the pselect(2) replacement
          compatibility code. bz#3345

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2021-11-19 07:12:14 +01:00
Adolf Belka
c1418e6fc8 openssh: Update version to 8.7p1
- Update from 8.6p1 to 8.7p1
- Update of rootfile not required
- Changelog is too long to include here. Full details can be found in the ChangeLog file
   in the source tarball or at
   https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ChangeLog

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-09-10 16:57:06 +00:00
Michael Tremer
10f012edff Revert "OpenSSH: restrict file permissions for sshd_config to 0600"
This reverts commit a9fb87809e.

This prevents the SSH configuration being parsed by the web user
interface.

Reported-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-24 17:45:17 +00:00
Peter Müller
a9fb87809e OpenSSH: restrict file permissions for sshd_config to 0600
This file does not have to be readable by anybody else than the user
running an OpenSSH server. While it does not really contain confidential
information, exposing it to the rest of the world makes no sense either.

This will silence a Lynis warning. :-)

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-31 12:41:13 +00:00
Adolf Belka
7fc236b40e openssh: Update to 8.6p1
- Update from 8.5p1 to 8.6p1
- Update of rootfile not needed
- Changelog
Future deprecation notice
It is now possible[1] to perform chosen-prefix attacks against the
SHA-1 algorithm for less than USD$50K.
In the SSH protocol, the "ssh-rsa" signature scheme uses the SHA-1
hash algorithm in conjunction with the RSA public key algorithm.
OpenSSH will disable this signature scheme by default in the near
future.
Note that the deactivation of "ssh-rsa" signatures does not necessarily
require cessation of use for RSA keys. In the SSH protocol, keys may be
capable of signing using multiple algorithms. In particular, "ssh-rsa"
keys are capable of signing using "rsa-sha2-256" (RSA/SHA256),
"rsa-sha2-512" (RSA/SHA512) and "ssh-rsa" (RSA/SHA1). Only the last of
these is being turned off by default.
This algorithm is unfortunately still used widely despite the
existence of better alternatives, being the only remaining public key
signature algorithm specified by the original SSH RFCs that is still
enabled by default.
The better alternatives include:
 * The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These
   algorithms have the advantage of using the same key type as
   "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been
   supported since OpenSSH 7.2 and are already used by default if the
   client and server support them.
 * The RFC8709 ssh-ed25519 signature algorithm. It has been supported
   in OpenSSH since release 6.5.
 * The RFC5656 ECDSA algorithms: ecdsa-sha2-nistp256/384/521. These
   have been supported by OpenSSH since release 5.7.
To check whether a server is using the weak ssh-rsa public key
algorithm, for host authentication, try to connect to it after
removing the ssh-rsa algorithm from ssh(1)'s allowed list:
    ssh -oHostKeyAlgorithms=-ssh-rsa user@host
If the host key verification fails and no other supported host key
types are available, the server software on that host should be
upgraded.
OpenSSH recently enabled the UpdateHostKeys option by default to assist
the client by automatically migrating to better algorithms.
[1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and
    Application to the PGP Web of Trust" Leurent, G and Peyrin, T
    (2020) https://eprint.iacr.org/2020/014.pdf
Security
 * sshd(8): OpenSSH 8.5 introduced the LogVerbose keyword. When this
   option was enabled with a set of patterns that activated logging
   in code that runs in the low-privilege sandboxed sshd process, the
   log messages were constructed in such a way that printf(3) format
   strings could effectively be specified the low-privilege code.
   An attacker who had sucessfully exploited the low-privilege
   process could use this to escape OpenSSH's sandboxing and attack
   the high-privilege process. Exploitation of this weakness is
   highly unlikely in practice as the LogVerbose option is not
   enabled by default and is typically only used for debugging. No
   vulnerabilities in the low-privilege process are currently known
   to exist.
   Thanks to Ilja Van Sprundel for reporting this bug.
Changes since OpenSSH 8.5
This release contains mostly bug fixes.
New features
 * sftp-server(8): add a new limits@openssh.com protocol extension
   that allows a client to discover various server limits, including
   maximum packet size and maximum read/write length.
 * sftp(1): use the new limits@openssh.com extension (when available)
   to select better transfer lengths in the client.
 * sshd(8): Add ModuliFile keyword to sshd_config to specify the
   location of the "moduli" file containing the groups for DH-GEX.
 * unit tests: Add a TEST_SSH_ELAPSED_TIMES environment variable to
   enable printing of the elapsed time in seconds of each test.
Bugfixes
 * ssh_config(5), sshd_config(5): sync CASignatureAlgorithms lists in
   manual pages with the current default. GHPR174
 * ssh(1): ensure that pkcs11_del_provider() is called before exit.
   GHPR234
 * ssh(1), sshd(8): fix problems in string->argv conversion. Multiple
   backslashes were not being dequoted correctly and quoted space in
   the middle of a string was being incorrectly split. GHPR223
 * ssh(1): return non-zero exit status when killed by signal; bz#3281
 * sftp-server(8): increase maximum SSH2_FXP_READ to match the maximum
   packet size. Also handle zero-length reads that are not explicitly
   banned by the spec.
Portability
 * sshd(8): don't mistakenly exit on transient read errors on the
   network socket (e.g. EINTR, EAGAIN); bz3297
 * Create a dedicated contrib/gnome-ssk-askpass3.c source instead of
   building it from the same file as used for GNOME2. Use the GNOME3
   gdk_seat_grab() to manage keyboard/mouse/server grabs for better
   compatibility with Wayland.
 * Fix portability build errors bz3293 bz3292 bz3291 bz3278
 * sshd(8): soft-disallow the fstatat64 syscall in the Linux
   seccomp-bpf sandbox. bz3276
 * unit tests: enable autoopt and misc unit tests that were
   previously skipped

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-20 09:09:12 +00:00
Adolf Belka
2aebd3a8c5 openssh: Update to 8.5p1
- Update Openssh from 8.4p1 to 8.5p1
- rootfiles not changed
- ssh access by keys tested with 8.5p1 and successfully worked
- Full Release notes can be read at https://www.openssh.com/releasenotes.html
- Future deprecation notice
   It is now possible[1] to perform chosen-prefix attacks against the
   SHA-1 algorithm for less than USD$50K.
   In the SSH protocol, the "ssh-rsa" signature scheme uses the SHA-1
   hash algorithm in conjunction with the RSA public key algorithm.
   OpenSSH will disable this signature scheme by default in the near
   future.
   Note that the deactivation of "ssh-rsa" signatures does not necessarily
   require cessation of use for RSA keys. In the SSH protocol, keys may be
   capable of signing using multiple algorithms. In particular, "ssh-rsa"
   keys are capable of signing using "rsa-sha2-256" (RSA/SHA256),
   "rsa-sha2-512" (RSA/SHA512) and "ssh-rsa" (RSA/SHA1). Only the last of
   these is being turned off by default.
- Checked if the weak ssh-rsa public key algorithm was being used with
   openssh8.4p1 by running
    ssh -oHostKeyAlgorithms=-ssh-rsa user@host
   host verification was successful with no issue so IPFire will not be
   affected by this deprecation when it happens
- Potentially-incompatible changes
    * ssh(1), sshd(8): this release changes the first-preference signature
      algorithm from ECDSA to ED25519.
   This did not affect my use of ssh login but I use ED25519 as the only
    key algorithm that I use. It might be good to get it tested by
    someone who has ECDSA and ED25519 keys and prefers ECDSA
   Remaining changes don't look likely to affect IPFire users
- Bugfixes
 * ssh(1): Prefix keyboard interactive prompts with "(user@host)" to
   make it easier to determine which connection they are associated
   with in cases like scp -3, ProxyJump, etc. bz#3224
 * sshd(8): fix sshd_config SetEnv directives located inside Match
   blocks. GHPR201
 * ssh(1): when requesting a FIDO token touch on stderr, inform the
   user once the touch has been recorded.
 * ssh(1): prevent integer overflow when ridiculously large
   ConnectTimeout values are specified, capping the effective value
   (for most platforms) at 24 days. bz#3229
 * ssh(1): consider the ECDSA key subtype when ordering host key
   algorithms in the client.
 * ssh(1), sshd(8): rename the PubkeyAcceptedKeyTypes keyword to
   PubkeyAcceptedAlgorithms. The previous name incorrectly suggested
   that it control allowed key algorithms, when this option actually
   specifies the signature algorithms that are accepted. The previous
   name remains available as an alias. bz#3253
 * ssh(1), sshd(8): similarly, rename HostbasedKeyTypes (ssh) and
   HostbasedAcceptedKeyTypes (sshd) to HostbasedAcceptedAlgorithms.
 * sftp-server(8): add missing lsetstat@openssh.com documentation
   and advertisement in the server's SSH2_FXP_VERSION hello packet.
 * ssh(1), sshd(8): more strictly enforce KEX state-machine by
   banning packet types once they are received. Fixes memleak caused
   by duplicate SSH2_MSG_KEX_DH_GEX_REQUEST (oss-fuzz #30078).
 * sftp(1): allow the full range of UIDs/GIDs for chown/chgrp on 32bit
   platforms instead of being limited by LONG_MAX. bz#3206
 * Minor man page fixes (capitalization, commas, etc.) bz#3223
 * sftp(1): when doing an sftp recursive upload or download of a
   read-only directory, ensure that the directory is created with
   write and execute permissions in the interim so that the transfer
   can actually complete, then set the directory permission as the
   final step. bz#3222
 * ssh-keygen(1): document the -Z, check the validity of its argument
   earlier and provide a better error message if it's not correct.
   bz#2879
 * ssh(1): ignore comments at the end of config lines in ssh_config,
   similar to what we already do for sshd_config. bz#2320
 * sshd_config(5): mention that DisableForwarding is valid in a
   sshd_config Match block. bz3239
 * sftp(1): fix incorrect sorting of "ls -ltr" under some
   circumstances. bz3248.
 * ssh(1), sshd(8): fix potential integer truncation of (unlikely)
   timeout values. bz#3250
 * ssh(1): make hostbased authentication send the signature algorithm
   in its SSH2_MSG_USERAUTH_REQUEST packets instead of the key type.
   This make HostbasedAcceptedAlgorithms do what it is supposed to -
   filter on signature algorithm and not key type.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-06 11:16:07 +00:00
Adolf Belka
13e20ecfc5 openssh: Update to 8.4p1
- Update openssh from version 8.3p1 to 8.4p1
	See https://www.openssh.com/releasenotes.html
	See https://www.openssh.com/portable.html#http for mirrors for source file
- No change to rootfiles
- Installed on virtual ipfire testbed and ssh connection successfully operated
Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-09-30 10:00:17 +00:00
Peter Müller
421d057fd4 OpenSSH: update to 8.3p1
Fixes: #12418

Cc: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-06-27 14:29:34 +00:00
Arne Fitzenreiter
b14b37ba67 OpenSSH: fix login on i?86
glibc calls clock_nanosleep_time64 syscall even if it not defined in
the headers for this arch and the seccomp filter kills the process
with because an unknown syscall.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-10 21:41:14 +02:00
Arne Fitzenreiter
975bd8bc17 Revert "Revert "OpenSSH: update to 8.2p1""
This reverts commit e7fcf874e7.
2020-04-10 16:23:09 +02:00
Arne Fitzenreiter
e7fcf874e7 Revert "OpenSSH: update to 8.2p1"
ssh skips login before asking for credentials at i586.

This reverts commit 3fd3f4de44.
2020-04-09 20:26:33 +00:00
Peter Müller
3fd3f4de44 OpenSSH: update to 8.2p1
Please refer to https://www.openssh.com/txt/release-8.2 for release
announcements. Since glibc < 2.31 is used, no additional patching was
required in order to restore correct login functionality.

Cc: Marcel Lorenz <marcel.lorenz@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-26 17:40:06 +00:00
Peter Müller
81502fe6f3 OpenSSH: update to 8.1p1
Please refer to https://www.openssh.com/txt/release-8.1 for release notes.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-12-05 18:00:11 +00:00
Peter Müller
fc1b0311d6 openssh: update to 8.0p1
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-09-11 16:44:27 +00:00
Peter Müller
fee8b1c504 OpenSSH: update to 7.9p1
Update OpenSSH to 7.9p1 (release note is available at
https://www.openssh.com/txt/release-7.9). Patching support
for OpenSSL 1.1.0 is no longer required, thus the orphaned
patchfile has been deleted.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-23 05:13:47 +00:00
Matthias Fischer
74189c1d55 openssh: Update to 7.8p1
For details see:
http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ChangeLog

I didn't find an official lfs-patch for openssl-1.1-compatibility,
so I used the patch from here:
https://git.archlinux.org/svntogit/packages.git/plain/trunk/openssl-1.1.0.patch?h=packages/openssh

Building ran without any errors.

I tested with both machines (test on Core 120 - and productive - on Core 122) and found no errors so far:

...
[root@ipfiretest ~]# ssh -V
OpenSSH_7.8p1, OpenSSL 1.1.0h  27 Mar 2018
...

...
root@ipfire: / # ssh -V
OpenSSH_7.8p1, OpenSSL 1.1.0h  27 Mar 2018
...

All ssh-connections ran fine but I'm not REALLY sure if this is sufficient for anyone else.

Could someone please check and confirm!?

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Tested-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:51:44 +01:00
Peter Müller
07da1af688 use custom SSH server configuration in LFS file
Include OpenSSH server configuration file during build.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:28:15 +01:00
Peter Müller
cc3e41cb8b use custom SSH client configuration in LFS file
Include OpenSSH client configuration file during build.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:36:41 +01:00
Michael Tremer
ebbca90d70 openssh: Disable password authentication by default
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-09 16:28:14 +01:00
Michael Tremer
16c31d1004 openssh: Write port 22 into the default configuration file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-06-30 19:25:15 +01:00
Matthias Fischer
1698eb73c7 openssh: Update to 7.7p1
For details see:
http://www.openssh.com/txt/release-7.7

This release fixes:
https://bugzilla.ipfire.org/show_bug.cgi?id=11693
https://bugzilla.ipfire.org/show_bug.cgi?id=11694

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-05-07 11:33:41 +01:00
Michael Tremer
07b8dcd0b2 openssh: Update to 7.6p1 and patch against OpenSSL 1.1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-02-11 22:19:45 +00:00
Peter Müller
ba7cd7b624 openssh: update to 7.6p1
Signed-off-by: Marcel Lorenz <marcel.lorenz@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-14 16:43:04 +00:00
Matthias Fischer
8f6e4eaff7 Update for numerous lfs-files: removed deprecated configure options
Also includes some reformatting, but no changes to configuration.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-05 17:02:24 +00:00
Michael Tremer
be3d3959d2 openssh: Remove deprecated configuration options
This was used for SSH version 1 which is not supported
any more

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-04-04 19:08:34 +01:00
Michael Tremer
e8607830b0 openssh: Update to 7.4p1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-02-27 12:09:15 +00:00
Michael Tremer
4b8f1ffb31 openssh: Update to 7.3p1
Includes various security fixes:

 * sshd(8): Mitigate a potential denial-of-service attack against
   the system's crypt(3) function via sshd(8). An attacker could
   send very long passwords that would cause excessive CPU use in
   crypt(3). sshd(8) now refuses to accept password authentication
   requests of length greater than 1024 characters. Independently
   reported by Tomas Kuthan (Oracle), Andres Rojas and Javier Nieto.

 * sshd(8): Mitigate timing differences in password authentication
   that could be used to discern valid from invalid account names
   when long passwords were sent and particular password hashing
   algorithms are in use on the server. CVE-2016-6210, reported by
   EddieEzra.Harari at verint.com

 * ssh(1), sshd(8): Fix observable timing weakness in the CBC padding
   oracle countermeasures. Reported by Jean Paul Degabriele, Kenny
   Paterson, Torben Hansen and Martin Albrecht. Note that CBC ciphers
   are disabled by default and only included for legacy compatibility.

 * ssh(1), sshd(8): Improve operation ordering of MAC verification for
   Encrypt-then-MAC (EtM) mode transport MAC algorithms to verify the
   MAC before decrypting any ciphertext. This removes the possibility
   of timing differences leaking facts about the plaintext, though no
   such leakage has been observed.  Reported by Jean Paul Degabriele,
   Kenny Paterson, Torben Hansen and Martin Albrecht.

 * sshd(8): (portable only) Ignore PAM environment vars when
   UseLogin=yes. If PAM is configured to read user-specified
   environment variables and UseLogin=yes in sshd_config, then a
   hostile local user may attack /bin/login via LD_PRELOAD or
   similar environment variables set via PAM. CVE-2015-8325,
   found by Shayan Sadigh.

Fixes: #11160

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-08-02 16:06:35 +01:00
Sascha Kilian
68aa7aa602 openssh: Update to 7.2p2
Signed-off-by: Sascha Kilian <sascha@sakisoft.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-05-03 11:56:19 +01:00
Arne Fitzenreiter
aced5a9578 openssh: update to 7.2p1
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2016-03-01 15:59:34 +01:00
Matthias Fischer
1b8c3e2362 openssh: Update to 7.1p2
Fixes CVE-2016-0777

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-01-28 13:38:18 +01:00
Arne Fitzenreiter
3a6784c065 ssh: preferre ecdsa cipher again.
Previous we had not configured it so the ssh default order was used.
Now we define it to disable dsa so we had to give the correct order but
in the example cfg rsa is prefered.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2015-10-24 12:07:29 +02:00
Arne Fitzenreiter
d7b82e7cce openssh: disable dsa key usage.
fixes #10934

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2015-10-22 13:08:27 +02:00
Michael Tremer
0ce8df2890 openssh: Update to 7.1p1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-08-21 21:21:27 +01:00
Michael Tremer
45b6ea63af openssh: Update to 7.0p1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-08-12 14:01:55 +01:00
Matthias Fischer
016e63e818 openssh: lfs-update 2015-05-26 14:29:38 +02:00
Michael Tremer
102825b673 openssh: Update to version 6.8p1 2015-03-18 15:52:28 +01:00
Michael Tremer
bb0618287b openssh: Update to 6.6p1. 2014-03-18 18:03:14 +01:00
Michael Tremer
167e6ec7a8 openssh: Update to 6.5p1.
Adds support for ed25519.
2014-02-01 16:15:10 +01:00
Michael Tremer
33590570fb openssh: Update to 6.4p1.
Security fix because of
 http://www.openssh.com/txt/gcmrekey.adv
2013-11-09 14:16:52 +01:00
Arne Fitzenreiter
e2903617ca openssh: update to 6.2p2. 2013-06-07 12:54:34 +02:00
Michael Tremer
f1a58c3322 openssh: Update to 6.1p1. 2013-02-05 19:26:58 +01:00
Arne Fitzenreiter
d7d2dca964 openssh: update to 6.0p1. 2012-05-12 15:32:47 +02:00
Arne Fitzenreiter
8384f58553 openssh: update to 5.9p1. 2012-01-05 14:38:01 +01:00
Arne Fitzenreiter
bac3bb44e6 Updated openssh (5.8p1). 2011-02-08 22:15:53 +01:00
Arne Fitzenreiter
99fcb81b45 Updated openssh (5.6p1). 2010-11-16 22:42:59 +01:00
Arne Fitzenreiter
c5ae9f26a9 Updated openssh (5.4p1). 2010-03-12 17:24:15 +01:00