Commit graph

1150 commits

Author SHA1 Message Date
Jung-uk Kim
d4ba033164 OpenSSL: Merge OpenSSL 1.1.1q
(cherry picked from commit 64cbf7cebc)
2022-07-05 12:26:55 -04:00
Jung-uk Kim
076b6612b1 OpenSSL: Merge OpenSSL 1.1.1p
Merge commit '54ae8e38f717f22963c2a87f48af6ecefc6b3e9b'

(cherry picked from commit 83eaf7ae0a)
2022-06-21 18:48:56 -04:00
Ed Maste
ce8133a521 sshd_config: clarify password authentication options
Passwords may be accepted by both the PasswordAuthentication and
KbdInteractiveAuthentication authentication schemes.  Add a reference to
the latter in the description/comment for PasswordAuthentication, as it
otherwise may seem that "PasswordAuthentication no" implies passwords
will be disallowed.

This situation should be clarified with more extensive documentation on
the authentication schemes and configuration options, but that should be
done in coordination with upstream OpenSSH.  This is a minimal change
that will hopefully clarify the situation without requiring an extensive
local patch set.

PR:		263045
Reviewed by:	manu (earlier version)
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35272

(cherry picked from commit 9f009e066f)
2022-06-16 08:50:23 -04:00
Ed Maste
20feb7838d ssh: update sshd_config for prohibit-password option
The PermitRootLogin option "prohibit-password" was added as a synonym
for "without-password" in 2015.  Then in 2017 these were swapped:
"prohibit-password" became the canonical option and "without-password"
became a deprecated synonym (in OpenSSH commit 071325f458).

The UsePAM description in sshd_config still mentioned
"without-password."  Update it to match the new canonical option.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week

(cherry picked from commit 0e12eb7b58)
2022-05-19 07:36:10 -04:00
John Baldwin
2e6f247ca4 OpenSSL: KTLS: Enable KTLS for receiving as well in TLS 1.3
This removes a guard condition that prevents KTLS being enabled for
receiving in TLS 1.3.  Use the correct sequence number and BIO for
receive vs transmit offload.

Approved by:	jkim
Obtained from:	OpenSSL commit 7c78932b9a4330fb7c8db72b3fb37cbff1401f8b
MFC after:	1 week
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34976

(cherry picked from commit 913616b885)
2022-05-13 16:51:34 -07:00
John Baldwin
44aacbc981 OpenSSL: KTLS: Handle TLS 1.3 in ssl3_get_record.
- Don't unpad records, check the outer record type, or extract the
  inner record type from TLS 1.3 records handled by the kernel.  KTLS
  performs all of these steps and returns the inner record type in the
  TLS header.

- When checking the length of a received TLS 1.3 record don't allow
  for the extra byte for the nested record type when KTLS is used.

- Pass a pointer to the record type in the TLS header to the
  SSL3_RT_INNER_CONTENT_TYPE message callback.  For KTLS, the old
  pointer pointed to the last byte of payload rather than the record
  type.  For the non-KTLS case, the TLS header has been updated with
  the inner type before this callback is invoked.

Approved by:	jkim
Obtained from:	OpenSSL commit a5fb9605329fb939abb536c1604d44a511741624
MFC after:	1 week
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34975

(cherry picked from commit c0f977bfb6)
2022-05-13 16:51:26 -07:00
John Baldwin
a8333d4c62 OpenSSL: KTLS: Add using_ktls helper variable in ssl3_get_record().
When KTLS receive is enabled, pending data may still be present due to
read ahead.  This data must still be processed the same as records
received without KTLS.  To ease readability (especially in
consideration of additional checks which will be added for TLS 1.3),
add a helper variable 'using_ktls' that is true when the KTLS receive
path is being used to receive a record.

Approved by:	jkim
Obtained from:	OpenSSL commit 031132c297e54cbc20404a0bf8de6ed863196399
MFC after:	1 week
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34974

(cherry picked from commit 4f1f9c5502)
2022-05-13 16:51:20 -07:00
John Baldwin
9550224b16 OpenSSL: KTLS: Check for unprocessed receive records in ktls_configure_crypto.
KTLS implementations currently assume that the start of the in-kernel
socket buffer is aligned with the start of a TLS record for the
receive side.  The socket option to enable KTLS specifies the TLS
sequence number of this initial record.

When read ahead is enabled, data can be pending in the SSL read buffer
after negotiating session keys.  This pending data must be examined to
ensurs that the kernel's socket buffer does not contain a partial TLS
record as well as to determine the correct sequence number of the
first TLS record to be processed by the kernel.

In preparation for enabling receive kernel offload for TLS 1.3, move
the existing logic to handle read ahead from t1_enc.c into ktls.c and
invoke it from ktls_configure_crypto().

Approved by:	jkim
Obtained from:	OpenSSL commit 85773128d0e80cd8dcc772a6931d385b8cf4acd1
MFC after:	1 week
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34973

(cherry picked from commit 019cff03b3)
2022-05-13 16:50:51 -07:00
John Baldwin
2d6f628ab5 OpenSSL: Cleanup record length checks for KTLS
In some corner cases the check for packets
which exceed the allowed record length was missing
when KTLS is initially enabled, when some
unprocessed packets are still pending.

Approved by:	jkim
Obtained from:	OpenSSL commit 8fff986d52606e1a33f9404504535e2e2aee3e8b
MFC after:	1 week
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34972

(cherry picked from commit f6e5fcdc84)
2022-05-13 16:50:43 -07:00
Jung-uk Kim
1b7b799f9e OpenSSL: Merge OpenSSL 1.1.1o
(cherry picked from commit 34252e89a9)
2022-05-03 15:55:01 -04:00
Ed Maste
89d405a5ae ssh: remove 11.x from FREEBSD-upgrade instructions
11.x is no longer supported.

(cherry picked from commit 2e6ec1e4fe)
2022-05-02 09:54:42 -04:00
Ed Maste
ae91d937e2 ssh: use upstream SSH_OPENSSL_VERSION macro
With the upgrade to OpenSSH 6.7p1 in commit a0ee8cc636 we replaced
WITH_OPENSSL ifdefs with an OPENSSL_VERSION macro, later changing it
to OPENSSL_VERSION_STRING.

A few years later OpenSSH made an equivalent change (with a different
macro name), in commit 4d94b031ff88.  Switch to the macro name they
chose.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 6e24fe6128)
2022-05-01 15:36:59 -04:00
Ed Maste
2cf06d01f9 ssh: remove duplicate setting of MAIL env var
We already set it earlier in do_setup_env().

Fixes:		19261079b7 ("openssh: update to OpenSSH v8.7p1")
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 1978059263)
2022-04-26 09:36:09 -04:00
Ed Maste
d47ac32b4a ssh: apply style(9) to version_addendum
Reported by:	allanjude (in review D29953)
Fixes:		462c32cb8d ("Upgrade OpenSSH to 6.1p1.")
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 613b4b7971)
2022-04-24 21:04:28 -04:00
Ed Maste
48a5e3fc65 ssh-agent: move -x description to correct spot in man page
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit eb45bc6829)
2022-04-19 20:30:51 -04:00
Ed Maste
0ced9589c6 ssh: regen sk_config.h after 73104d5838
(cherry picked from commit 822d379b1f)
2022-04-15 12:30:54 -04:00
Ed Maste
faa9ffff57 ssh: generate SK config file using private cbor and fido2 libs
Specify -lprivatecbor and -lprivatefido2 in OpenSSH's configure.ac, and
pass -I paths to libcbor and libfido2's contrib src location.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34440

(cherry picked from commit 73104d5838)
2022-04-15 12:30:37 -04:00
Ed Maste
bf6262c210 ssh: use standalone config file for security key support
An upcoming OpenSSH update has multiple config.h settings that change
depending on whether builtin security key support is enabled.  Prepare
for this by moving ENABLE_SK_INTERNAL to a new sk_config.h header
(similar to the approach used for optional krb5 support) and optionally
including that, instead of defining the macro directly from CFLAGS.

Reviewed by:	kevans
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34407

(cherry picked from commit 92ef98b8fa)
2022-04-15 12:30:21 -04:00
Jung-uk Kim
97fe61d5bf OpenSSL: Merge OpenSSL 1.1.1n
(cherry picked from commit 5ac766ab8e)
2022-03-15 19:48:04 -04:00
Gordon Tetlow
5f3d952f6e Fix a bug in BN_mod_sqrt() that can cause it to loop forever.
Obtained from:	OpenSSL Project
Security:	CVE-2022-0778
Security:	FreeBSD-SA-22:03.openssl

(cherry picked from commit fdc418f15e)
2022-03-15 09:51:46 -07:00
Mark Johnston
59269984cc openssh: Add a note to check for deprecated and removed config options
Suggested by:	emaste
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 9340d69e57)
2022-03-07 19:26:22 -05:00
Ed Maste
d9ca85e8da ssh: correct configure option name
The option is security-key-builtin not security-key-internal.  There is
no change to the generated config.h because the option defaults off
anyway.

MFC after:	3 days
Fixes:		87152f3405 ("ssh: disble internal security key...")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f1421a8972)
2022-03-03 20:23:51 -05:00
John Baldwin
e1465e2e1e OpenSSL: Fix the same BIO_FLAGS macro definition
Also add comment to the public header to avoid
making another conflict in future.

Reviewed by:	jkim
Obtained from:	OpenSSL commit 5d4975ecd88ac17d0749513a8fac9a7c7befd900
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34135

(cherry picked from commit aa72082549)
2022-02-17 14:51:58 -08:00
John Baldwin
96ec9e3c31 SSL_sendfile: Replace ERR_raise_data with SYSerr.
ERR_raise_data is only present in OpenSSL 3.0 and later.

Reviewed by:	jkim
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D33363

(cherry picked from commit 27bb8830d5)
2022-02-17 14:51:58 -08:00
Ed Maste
860508661c ssh: pass 0 to procctl(2) to operate on self
As of f833ab9dd1 procctl(2) allows idtype P_PID with id = 0 as a
shortcut for the calling process ID.  The shortcut also bypasses the
p_cansee / p_candebug test (since the process is able to act on itself.)

At present if the security.bsd.unprivileged_proc_debug sysctl is 0 then
procctl(P_PID, getpid(), ... for a process to act on itself will fail,
but procctl(P_PID, 0, ... will succeed.  This should likely be addressed
with a kernel change.

In any case the id = 0 shortcut is a tiny optimization for a process to
act on itself and allows the self-procctl to succeed, so use it in ssh.

Reported by:	Shawn Webb
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33970

(cherry picked from commit 0746301c49)
(cherry picked from commit e38610abca)
2022-02-10 13:09:57 -05:00
Ed Maste
8464ad72e0 ssh: update to OpenSSH v8.8p1
OpenSSH v8.8p1 was motivated primarily by a security update and
deprecation of RSA/SHA1 signatures.  It also has a few minor bug fixes.

The security update was already applied to FreeBSD as an independent
change, and the RSA/SHA1 deprecation is excluded from this commit but
will immediately follow.

MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit e9e8876a4d)
(cherry picked from commit 2ffb13149c)
2022-02-10 13:09:57 -05:00
Ed Maste
a613d68fff ssh: enable FIDO/U2F keys
Description of FIDO/U2F support (from OpenSSH 8.2 release notes,
https://www.openssh.com/txt/release-8.2):

  This release adds support for FIDO/U2F hardware authenticators to
  OpenSSH. U2F/FIDO are open standards for inexpensive two-factor
  authentication hardware that are widely used for website
  authentication.  In OpenSSH FIDO devices are supported by new public
  key types "ecdsa-sk" and "ed25519-sk", along with corresponding
  certificate types.

  ssh-keygen(1) may be used to generate a FIDO token-backed key, after
  which they may be used much like any other key type supported by
  OpenSSH, so long as the hardware token is attached when the keys are
  used. FIDO tokens also generally require the user explicitly
  authorise operations by touching or tapping them.

  Generating a FIDO key requires the token be attached, and will
  usually require the user tap the token to confirm the operation:

    $ ssh-keygen -t ecdsa-sk -f ~/.ssh/id_ecdsa_sk
    Generating public/private ecdsa-sk key pair.
    You may need to touch your security key to authorize key generation.
    Enter file in which to save the key (/home/djm/.ssh/id_ecdsa_sk):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/djm/.ssh/id_ecdsa_sk
    Your public key has been saved in /home/djm/.ssh/id_ecdsa_sk.pub

  This will yield a public and private key-pair. The private key file
  should be useless to an attacker who does not have access to the
  physical token. After generation, this key may be used like any
  other supported key in OpenSSH and may be listed in authorized_keys,
  added to ssh-agent(1), etc. The only additional stipulation is that
  the FIDO token that the key belongs to must be attached when the key
  is used.

To enable FIDO/U2F support, this change regenerates ssh_namespace.h,
adds ssh-sk-helper, and sets ENABLE_SK_INTERNAL (unless building
WITHOUT_USB).

devd integration is not included in this change, and is under
investigation for the base system.  In the interim the security/u2f-devd
port can be installed to provide appropriate devd rules.

Reviewed by:	delphij, kevans
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32509

(cherry picked from commit e9a994639b)
2022-02-09 19:03:21 -05:00
Ed Maste
317a38ab65 openssh: update to OpenSSH v8.7p1
Some notable changes, from upstream's release notes:

- sshd(8): Remove support for obsolete "host/port" syntax.
- ssh(1): When prompting whether to record a new host key, accept the key
  fingerprint as a synonym for "yes".
- ssh-keygen(1): when acting as a CA and signing certificates with an RSA
  key, default to using the rsa-sha2-512 signature algorithm.
- ssh(1), sshd(8), ssh-keygen(1): this release removes the "ssh-rsa"
  (RSA/SHA1) algorithm from those accepted for certificate signatures.
- ssh-sk-helper(8): this is a new binary. It is used by the FIDO/U2F
  support to provide address-space isolation for token middleware
  libraries (including the internal one).
- ssh(1): this release enables UpdateHostkeys by default subject to some
  conservative preconditions.
- scp(1): this release changes the behaviour of remote to remote copies
  (e.g. "scp host-a:/path host-b:") to transfer through the local host
  by default.
- scp(1): experimental support for transfers using the SFTP protocol as
  a replacement for the venerable SCP/RCP protocol that it has
  traditionally used.

Additional integration work is needed to support FIDO/U2F in the base
system.

Deprecation Notice
------------------

OpenSSH will disable the ssh-rsa signature scheme by default in the
next release.

Reviewed by:	imp
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29985

(cherry picked from commit 19261079b7)
(cherry picked from commit f448c3ed4a)
(cherry picked from commit 1f290c707a)
(cherry picked from commit 0f9bafdfc3)
(cherry picked from commit adb56e58e8)
(cherry picked from commit 576b58108c)
(cherry picked from commit 1c99af1ebe)
(cherry picked from commit 87152f3405)
(cherry picked from commit 172fa4aa75)
2022-02-09 14:53:11 -05:00
Ed Maste
e3c87ef019 openssh: sync update document with main
(cherry picked from commit 519496a598)
(cherry picked from commit 576b477ba4)
(cherry picked from commit 35a0342508)
(cherry picked from commit f3fd885074)
(cherry picked from commit b645ee1815)
(cherry picked from commit 438fd19dc3)
2022-02-07 19:32:14 -05:00
Ed Maste
14da1cc7ad openssh: port upgrade doc and script to git
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28564

(cherry picked from commit 74c59ab790)
2022-02-07 17:34:33 -05:00
Piotr Kubaj
ce35a3bc85 Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le
Summary:
1. 34ab13b7d8
needs to be merged for ELFv2 support on big-endian.
2. crypto/openssl/crypto/ppccap.c needs to be patched.
Same reason as in https://github.com/openssl/openssl/pull/17082.

Approved by:	jkim, jhibbits, alfredo (MFC to stable/13)
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D33076

(cherry picked from commit 3a60869237)
2021-12-29 14:45:29 +01:00
Jung-uk Kim
17037d24d8 OpenSSL: Merge OpenSSL 1.1.1m
(cherry picked from commit b2bf0c7e5f)
2021-12-14 17:42:45 -05:00
Ed Maste
fd60da581d Remove FREEBSD-vendor files
These files were intended to track version and perhaps maintainership
information for contrib software.  However, they were never used beyond
bzip2, netcat, and OpenSSH, and generally haven't been kept up to date
recently (my OpenSSH 8.7p1 update notwithstanding).  Just remove them to
avoid having confusing or outdated information.

Suggested by:	des
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit bdcfd222ce)
2021-12-12 19:29:46 -05:00
Allan Jude
32a2fed6e7 openssl: Fix detection of ARMv7 and ARM64 CPU features
OpenSSL assumes the same value for AT_HWCAP=16 (Linux)
So it ends up calling elf_auxv_info() with AT_CANARY which
returns ENOENT, and all acceleration features are disabled.

With this, my ARM64 test machine runs the benchmark
`openssl speed -evp aes-256-gcm` nearly 20x faster
going from 100 MB/sec to 2000 MB/sec

It also improves sha256 from 300 MB/sec to 1800 MB/sec

This fix has been accepted but not yet merged upstream:
https://github.com/openssl/openssl/pull/17082

PR:		259937
Reviewed by:	manu, imp
MFC after:	immediate
Relnotes:	yes
Fixes:		88e852c0b5 ("OpenSSL: Merge OpenSSL 1.1.1j")
Sponsored by:	Ampere Computing LLC
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D33060

(cherry picked from commit d9bb798725)
2021-11-22 18:12:20 +00:00
Ed Maste
d4754d707a openssh: remove unnecessary $FreeBSD$ tags
Diff reduction against upstream: remove $FreeBSD$ tags from files where
the tag itself is the only difference from upstream.

(cherry picked from commit 0e642632e6)
2021-11-08 16:20:55 -05:00
Ed Maste
32f1062f26 openssh: restore local change to gssapi include logic
/usr/include/gssapi.h claims that it is deprecated, and gssapi/gssapi.h
should be used instead.  So, test HAVE_GSSAPI_GSSAPI_H first falling
back to HAVE_GSSAPI_H.

This will be submitted upstream.

Fixes:		6eac665c81 ("openssh: diff reduction against...")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31810

(cherry picked from commit 258f5f79bb)
2021-11-08 16:15:32 -05:00
Ed Maste
ca6686d6a9 openssh: diff reduction against upstream 7.9p1
Clean up whitespace and nonfunctional differences, and unused functions.

(cherry picked from commit 6eac665c81)
2021-11-08 16:15:32 -05:00
Ed Maste
be74669a2f OpenSSH: cherry-pick "need initgroups() before setresgid()"
From openssh-portable commits f3cbe43e28fe and bf944e3794ef, backported
to OpenSSH 7.9p1 on stable/13.

Reviewed by:	delphij
Security:	CVE-2021-41617
Differential Revision:	https://reviews.freebsd.org/D32460

(cherry picked from commit 172fa4aa75)
2021-10-12 11:37:55 -04:00
Ed Maste
1a0ffb2b06 openssh: remove login class restrictions leftovers
MFC after:	2 weeks
Fixes:		27ceebbc24 ("openssh: simplify login class...")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit ba91e31f47)
2021-09-16 20:34:13 -04:00
Ed Maste
2198a308ad openssh: simplify login class restrictions
Login class-based restrictions were introduced in 5b400a39b8.  The
code was adapted for sshd's Capsicum sandbox and received many changes
over time, including at least fc3c19a9fc, bd393de91c, and
e8c56fba29.

During an attempt to upstream the work a much simpler approach was
suggested.  Adopt it now in the in-tree OpenSSH to reduce conflicts with
future updates.

Submitted by:	Yuchiro Naito (against OpenSSH-portable on GitHub)
Obtained from:	https://github.com/openssh/openssh-portable/pull/262
Reviewed by:	allanjude, kevans
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D31760

(cherry picked from commit 27ceebbc24)
2021-09-14 21:42:06 -04:00
Ed Maste
887bc9fc9f openssh: regenerate freebsd-namespace.h
For some reason poly64 was omitted when this file was last generated
(perhaps it was inlined by the Clang version then in use).

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit c7b4c21ee4)
2021-09-08 20:55:13 -04:00
Ed Maste
1ceb4ca5c5 openssh: disable libwrap (TCP wrappers) at configure time
We define LIBWRAP at build time in secure/usr.sbin/sshd/Makefile if
WITH_TCPWRAPPERS is in effect, so it should not be set in config.h.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 36cd1e5e8c)
2021-09-08 20:50:05 -04:00
Ed Maste
f63bf8a421 openssh: clarify krb5 use in freebsd-configure
freebsd-configure.sh runs configure twice, --with-kerberos5 and
--without-kerberos5, in order to build a config.h that defaults to
kerberos5 disabled, and a small config file that represents the
differences.

Rename config.h.orig to config.h.kerberos5 to clarify the intent of this
script.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 5e4dd21fd6)
2021-09-08 20:49:44 -04:00
Ed Maste
bd6137e1e6 openssh: tag generated file with @generated
Tools like Phabricator use the @generated tag to identify files that
may be excluded from review by default.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b3e858f762)
2021-09-08 20:49:22 -04:00
Ed Maste
641df1db3a openssh: update default version addendum in man pages
Fixes:		2f513db72b ("Upgrade to OpenSSH 7.9p1.")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b0025f9b7f)
2021-09-06 20:26:53 -04:00
Jung-uk Kim
6a817b64ab Import OpenSSL 1.1.1l
(cherry picked from commit 9a3ae0cdef)
2021-09-03 13:09:29 -04:00
Gordon Tetlow
9d31ae3187 Fix multiple OpenSSL vulnerabilities.
Approved by:	so
Security:	SA-21:16.openssl
Security:	CVE-2021-3711
Security:	CVE-2021-3712

(cherry picked from commit be158ffe54dcc4a633652685afc5e37894e10ea0)
2021-08-24 11:05:48 -07:00
John Baldwin
b08bb7f896 OpenSSL: Add support for Chacha20-Poly1305 to kernel TLS on FreeBSD.
FreeBSD's kernel TLS supports Chacha20 for both TLS 1.2 and TLS 1.3.

NB: This commit has not yet been merged upstream as it is deemed a new
feature and did not make the feature freeze cutoff for OpenSSL 3.0.

Reviewed by:	jkim
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D31443

(cherry picked from commit 6372fd253e)
2021-08-23 17:59:35 -07:00
John Baldwin
58dcc1777a OpenSSL: Refactor KTLS tests to better support TLS 1.3.
Most of this upstream commit touched tests not included in the
vendor import.  The one change merged in is to remove a constant
only present in an internal header to appease the older tests.

Reviewed by:	jkim
Obtained from:	OpenSSL (e1fdd5262e4a45ce3aaa631768e877ee7b6da21b)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D31442

(cherry picked from commit d6e78ecb0b)
2021-08-23 17:59:35 -07:00
John Baldwin
a1509acded OpenSSL: Update KTLS documentation
KTLS support has been changed to be off by default, and configuration is
via a single "option" rather two "modes". Documentation is updated
accordingly.

Reviewed by:	jkim
Obtained from:	OpenSSL (6878f4300213cfd7d4f01e26a8b97f70344da100)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D31441

(cherry picked from commit a208223130)
2021-08-23 17:59:35 -07:00