mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
Highlights from the release notes are reproduced below. Bug fixes and
improvements that were previously merged into FreeBSD have been elided.
See the upstream release notes for full details of the 9.9p1 release
(https://www.openssh.com/releasenotes.html).
---
Future deprecation notice
=========================
OpenSSH plans to remove support for the DSA signature algorithm in
early 2025.
Potentially-incompatible changes
--------------------------------
* ssh(1): remove support for pre-authentication compression.
* 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.
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), 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.
Bugfixes
--------
* 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
* 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
---
Reviewed by: jlduran (build infrastructure)
Reviewed by: cy (build infrastructure)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48947
(cherry picked from commit 3d9fd9fcb4)
Approved by: re (accelerated MFC)
91 lines
2.3 KiB
C
91 lines
2.3 KiB
C
/* $OpenBSD: arc4random_linux.h,v 1.12 2019/07/11 10:37:28 inoguchi Exp $ */
|
|
|
|
/*
|
|
* Copyright (c) 1996, David Mazieres <dm@uun.org>
|
|
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
|
|
* Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
|
|
* Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org>
|
|
*
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
* copyright notice and this permission notice appear in all copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
/*
|
|
* Stub functions for portability. From LibreSSL with some adaptations.
|
|
*/
|
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
|
#include <sys/mman.h>
|
|
#endif
|
|
|
|
#include <signal.h>
|
|
|
|
/* OpenSSH isn't multithreaded */
|
|
#define _ARC4_LOCK()
|
|
#define _ARC4_UNLOCK()
|
|
#define _ARC4_ATFORK(f)
|
|
|
|
static inline void
|
|
_getentropy_fail(void)
|
|
{
|
|
fatal("getentropy failed");
|
|
}
|
|
|
|
static volatile sig_atomic_t _rs_forked;
|
|
|
|
static inline void
|
|
_rs_forkhandler(void)
|
|
{
|
|
_rs_forked = 1;
|
|
}
|
|
|
|
static inline void
|
|
_rs_forkdetect(void)
|
|
{
|
|
static pid_t _rs_pid = 0;
|
|
pid_t pid = getpid();
|
|
|
|
if (_rs_pid == 0 || _rs_pid == 1 || _rs_pid != pid || _rs_forked) {
|
|
_rs_pid = pid;
|
|
_rs_forked = 0;
|
|
if (rs)
|
|
memset(rs, 0, sizeof(*rs));
|
|
}
|
|
}
|
|
|
|
static inline int
|
|
_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
|
|
{
|
|
#if defined(MAP_ANON) && defined(MAP_PRIVATE)
|
|
if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE,
|
|
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
|
|
return (-1);
|
|
|
|
if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
|
|
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
|
|
munmap(*rsp, sizeof(**rsp));
|
|
*rsp = NULL;
|
|
return (-1);
|
|
}
|
|
#else
|
|
if ((*rsp = calloc(1, sizeof(**rsp))) == NULL)
|
|
return (-1);
|
|
if ((*rsxp = calloc(1, sizeof(**rsxp))) == NULL) {
|
|
free(*rsp);
|
|
*rsp = NULL;
|
|
return (-1);
|
|
}
|
|
#endif
|
|
|
|
_ARC4_ATFORK(_rs_forkhandler);
|
|
return (0);
|
|
}
|