aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh
Commit message (Collapse)AuthorAgeFilesLines
* Replace literal uses of /usr/local in C sources with _PATH_LOCALBASEStefan Eßer2020-10-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Literal references to /usr/local exist in a large number of files in the FreeBSD base system. Many are in contributed software, in configuration files, or in the documentation, but 19 uses have been identified in C source files or headers outside the contrib and sys/contrib directories. This commit makes it possible to set _PATH_LOCALBASE in paths.h to use a different prefix for locally installed software. In order to avoid changes to openssh source files, LOCALBASE is passed to the build via Makefiles under src/secure. While _PATH_LOCALBASE could have been used here, there is precedent in the construction of the path used to a xauth program which depends on the LOCALBASE value passed on the compiler command line to select a non-default directory. This could be changed in a later commit to make the openssh build consistently use _PATH_LOCALBASE. It is considered out-of-scope for this commit. Reviewed by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D26942 Notes: svn path=/head/; revision=367075
* sshd: allow UseBlocklist alias for UseBlacklistEd Maste2020-07-292-1/+7
| | | | | | | | | | | | | | blacklistd has been renamed to blocklistd upstream, and a future import into FreeBSD will follow that change. Support the new name as an alias in config files. Reviewed by: bz, delphij MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25865 Notes: svn path=/head/; revision=363657
* ssh: Remove AES-CBC ciphers from default server and client listsEd Maste2020-07-283-12/+2
| | | | | | | | | | | | | | | | | | | | | A base system OpenSSH update in 2016 or so removed a number of ciphers from the default lists offered by the server/client, due to known weaknesses. This caused POLA issues for some users and prompted PR207679; the ciphers were restored to the default lists in r296634. When upstream removed these ciphers from the default server list, they moved them to the client-only default list. They were subsequently removed from the client default, in OpenSSH 7.9p1. The change has persisted long enough. Remove these extra ciphers from both the server and client default lists, in advance of FreeBSD 13. Reviewed by: markm, rgrimes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25833 Notes: svn path=/head/; revision=363627
* openssh: refer to OpenSSL not SSLeay, part 2Ed Maste2020-07-152-2/+2
| | | | | | | | | | | | | | This change was made upstream between 7.9p1 and 8.0p1. We've made local changes in the same places for handling the version_addendum; apply the SSLeay_version to OpenSSL_version change in advance of importing 8.0p1. This should have been part of r363225. Obtained from: OpenSSH-portable a65784c9f9c5 MFC with: r363225 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=363235
* openssh: refer to OpenSSL not SSLeayEd Maste2020-07-152-2/+2
| | | | | | | | | | | | This change was made upstream between 7.9p1 and 8.0p1. We've made local changes in the same places for handling the version_addendum; apply the SSLeay_version to OpenSSL_version change in advance of importing 8.0p1. Obtained from: OpenSSH-portable a65784c9f9c5 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=363225
* Don't log normal login_getpwclass(3) result.Xin LI2020-06-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | The logging was introduced in r314527 but doesn't appear to be useful for regular operation, and as the result, for users with no class set (very common) the administrator would see a message like this in their auth.log: sshd[44251]: user root login class [preauth] (note that the class was "" because that's what's typically configured for most users; we would get 'default' if lc->lc_class is chosen) Remove this log as it can be annoying as the lookup happen before authentication and repeats, and our code is not acting upon lc_class or pw_class directly anyways. Reviewed by: cem, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24997 Notes: svn path=/head/; revision=362642
* openssh: -fno-common fix from upstream f47d72ddadKyle Evans2020-03-291-1/+1
| | | | | | | | | | | | | This is currently staged in vendor/ as part of the 8.0p1 import, which isn't quite ready to land. Given that this is a simple one-line fix, apply it now as the fallout will be pretty minimal. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days Notes: svn path=/head/; revision=359424
* Add a note about deleted files in OpenSSH upgrade instructionsEd Maste2020-02-251-0/+5
| | | | Notes: svn path=/head/; revision=358323
* Update version in openssh FREEBSD-vendor metadataEd Maste2020-02-141-1/+1
| | | | | | | | | It appears that FREEBSD-vendor is an idea that never really took off and we should probably just remove it, but until then we might as well record the correct version. Notes: svn path=/head/; revision=357939
* Update OpenSSH upgrade instructions to use https, not ftpEd Maste2020-02-141-1/+1
| | | | | | | ftp://ftp.openbsd.org/ does not work. Notes: svn path=/head/; revision=357932
* Upgrade to OpenSSH 7.9p1.Ed Maste2020-02-1481-1756/+2557
|\ | | | | | | | | | | | | | | MFC after: 2 months Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=357926
* | sshd: add upgrade process note about TCP wrappersEd Maste2020-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | We need to add user-facing deprecation notices for TCP wrappers; start with a note in the upgrade process docmentation. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=357925
* | openssh: add a note about libwrap in config.hEd Maste2020-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | LIBWRAP is defined by the Makefile based on MK_TCP_WRAPPERS and should not be defined in config.h. PR: 210141 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=357922
* | sshd: make getpwclass wrapper MON_ISAUTH not MON_AUTHEd Maste2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In r339216 a privsep wrapper was added for login_getpwclass to address PR 231172. Unfortunately the change used the MON_AUTH flag in the wrapper, and MON_AUTH includes MON_AUTHDECIDE which triggers an auth_log() on each invocation. getpwclass() does not participate in the authentication decision, so should be MON_ISAUTH instead. PR: 234793 Submitted by: Henry Hu Reviewed by: Yuichiro NAITO MFC after: 1 week Notes: svn path=/head/; revision=354897
* | Add workaround for a QoS-related bug in VMWare Workstation.Dag-Erling Smørgrav2019-03-271-0/+22
| | | | | | | | | | | | | | | | Submitted by: yuripv Differential Revision: https://reviews.freebsd.org/D18636 Notes: svn path=/head/; revision=345579
* | Merge r345574 from vendor-crypto:Ed Maste2019-03-271-12/+270
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upstream: when checking that filenames sent by the server side match what the client requested, be prepared to handle shell-style brace alternations, e.g. "{foo,bar}". "looks good to me" millert@ + in snaps for the last week courtesy deraadt@ OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e Discussed with: des Obtained from: OpenSSH-portable 3d896c157c722bc47adca51a58dca859225b5874 Notes: svn path=/head/; revision=345576
* | scp: validate filenames provided by server against wildcard in clientEd Maste2019-02-212-11/+42
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSH-portable commits: check in scp client that filenames sent during remote->local directory copies satisfy the wildcard specified by the user. This checking provides some protection against a malicious server sending unexpected filenames, but it comes at a risk of rejecting wanted files due to differences between client and server wildcard expansion rules. For this reason, this also adds a new -T flag to disable the check. reported by Harry Sintonen fix approach suggested by markus@; has been in snaps for ~1wk courtesy deraadt@ OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda Minor patch conflict (getopt) resolved. Obtained from: OpenSSH-portable 391ffc4b9d31fa1f4ad566499fef9176ff8a07dc scp: add -T to usage(); OpenBSD-Commit-ID: a7ae14d9436c64e1bd05022329187ea3a0ce1899 Obtained from: OpenSSH-portable 2c21b75a7be6ebdcbceaebb43157c48dbb36f3d8 PR: 234965 Approved by: des MFC after: 3 days Obtained from: OpenSSH-portable 391ffc4b9d, 2c21b75a7b Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19076 Notes: svn path=/head/; revision=344449
* | scp: disallow empty or current directoryEd Maste2019-01-151-1/+2
| | | | | | | | | | | | | | | | | | Obtained from: OpenBSD scp.c 1.198 Security: CVE-2018-20685 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=343043
* | Try harder to sanitize the environment before running configure.Dag-Erling Smørgrav2018-10-101-12/+11
| | | | | | | | | | | | | | | | | | Remove a workaround for older Unbound versions that used sbrk. Approved by: re (gjb) Notes: svn path=/head/; revision=339294
* | Merge the remainder of the projects/openssl111 branch to head.Glen Barber2018-10-092-63/+34
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update OpenSSL to version 1.1.1. - Update Kerberos/Heimdal API for OpenSSL 1.1.1 compatibility. - Bump __FreeBSD_version. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=339270
| * | Regenerate ssh_namespace.h for OpenSSL 1.1.1 updateEd Maste2018-10-091-29/+0
| | | | | | | | | | | | Notes: svn path=/projects/openssl111/; revision=339259
| * | MFH r338661 through r339253.Glen Barber2018-10-091-5/+35
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/openssl111/; revision=339255
| * | | MFH r339206-r339212, r339215-r339239Glen Barber2018-10-089-34/+222
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/openssl111/; revision=339240
| * | | openssh: connect libressl-api-compat.c and regen config.hEd Maste2018-10-031-3/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D17390 Notes: svn path=/projects/openssl111/; revision=339157
| * | | openssh: add openbsd-compat/libressl-api-compat.cEd Maste2018-10-031-0/+636
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missed in migrating changeset from git to svn for r338811 Reported by: jhb Notes: svn path=/projects/openssl111/; revision=339154
| * | | openssh: cherry-pick OpenSSL 1.1.1 compatibilityEd Maste2018-09-1930-526/+1010
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commits: 482d23bcac upstream: hold our collective noses and use the openssl-1.1.x 48f54b9d12 adapt -portable to OpenSSL 1.1x API 86e0a9f3d2 upstream: use only openssl-1.1.x API here too a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest cce8cbe0ed Fix openssl-1.1 fallout for --without-openssl. Trivial conflicts in sshkey.c and test_sshkey.c were resolved. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/openssl111/; revision=338811
| * | | openssh: rename local macro to avoid OpenSSL 1.1.1 conflictEd Maste2018-09-193-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Local changes introduced an OPENSSH_VERSION macro, but this conflicts with a macro of the same name introduced with OpenSSL 1.1.1. Notes: svn path=/projects/openssl111/; revision=338805
* | | | Fix portability issues with the Capsicum patch committed in r339216:Dag-Erling Smørgrav2018-10-095-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Wrap access to pw_change and pw_expire in the appropriate #ifdefs. - Wrap calls to login_cap(3) API in appropriate #ifdefs. - Add wrapper for transferring time_t, which is still only 32 bits wide on FreeBSD i386. - Use a temporary variable to deserialize size_t. Approved by: re (gjb) Notes: svn path=/head/; revision=339263
* | | | openssh: regenerate ssh-namespace.h after r339213 and r339216Ed Maste2018-10-091-5/+35
| |/ / |/| | | | | | | | | | | | | | | | | | | | Reported by: des Approved by: re (rgrimes) Notes: svn path=/head/; revision=339248
* | | sshd: address capsicum issuesEd Maste2018-10-069-34/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a wrapper to proxy login_getpwclass(3) as it is not allowed in capability mode. * Cache timezone data via caph_cache_tzdata() as we cannot access the timezone file. * Reverse resolve hostname before entering capability mode. PR: 231172 Submitted by: naito.yuichiro@gmail.com Reviewed by: cem, des Approved by: re (rgrimes) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D17128 Notes: svn path=/head/; revision=339216
* | | openssh: cherry-pick OpenSSL 1.1.1 compatibilityEd Maste2018-10-0632-526/+1742
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compatibility with existing OpenSSL versions is maintained. Upstream commits: 482d23bcac upstream: hold our collective noses and use the openssl-1.1.x 48f54b9d12 adapt -portable to OpenSSL 1.1x API 86e0a9f3d2 upstream: use only openssl-1.1.x API here too a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest cce8cbe0ed Fix openssl-1.1 fallout for --without-openssl. Trivial conflicts in sshkey.c and test_sshkey.c were resolved. Connect libressl-api-compat.c to the build, and regenerate config.h Reviewed by: des Approved by: re (rgrimes) MFC after: 2 seeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17444 Notes: svn path=/head/; revision=339213
* | | openssh: rename local macro to avoid OpenSSL 1.1.1 conflictEd Maste2018-09-193-7/+7
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | Local changes introduced an OPENSSH_VERSION macro, but this conflicts with a macro of the same name introduced with OepnsSL 1.1.1 Reviewed by: des Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338810
* | Upgrade to OpenSSH 7.8p1.Dag-Erling Smørgrav2018-09-10189-7129/+8030
|\| | | | | | | | | | | | | Approved by: re (kib@) Notes: svn path=/head/; revision=338561
* | Update userland arc4random() with OpenBSD's Chacha20 based arc4random().Xin LI2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObsoleteFiles.inc: Remove manual pages for arc4random_addrandom(3) and arc4random_stir(3). contrib/ntp/lib/isc/random.c: contrib/ntp/sntp/libevent/evutil_rand.c: Eliminate in-tree usage of arc4random_addrandom(). crypto/heimdal/lib/roken/rand.c: crypto/openssh/config.h: Eliminate in-tree usage of arc4random_stir(). include/stdlib.h: Remove arc4random_stir() and arc4random_addrandom() prototypes, provide temporary shims for transistion period. lib/libc/gen/Makefile.inc: Hook arc4random-compat.c to build, add hint for Chacha20 source for kernel, and remove arc4random_addrandom(3) and arc4random_stir(3) links. lib/libc/gen/arc4random.c: Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes, use the sys/crypto/chacha20 implementation of keystream. lib/libc/gen/Symbol.map: Remove arc4random_stir and arc4random_addrandom interfaces. lib/libc/gen/arc4random.h: Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of our own. lib/libc/gen/arc4random.3: Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r114444 and r118247. lib/libc/gen/arc4random-compat.c: Compatibility shims for arc4random_stir and arc4random_addrandom functions to preserve ABI. Log once when called but do nothing otherwise. lib/libc/gen/getentropy.c: lib/libc/include/libc_private.h: Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl). Remove from libc_private.h as a result. sys/crypto/chacha20/chacha.c: sys/crypto/chacha20/chacha.h: Make it possible to use the kernel implementation in libc. PR: 182610 Reviewed by: cem, markm Obtained from: OpenBSD Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16760 Notes: svn path=/head/; revision=338059
* | Merge upstream patch to unbreak tunnel forwarding.Dag-Erling Smørgrav2018-05-161-2/+2
|\| | | | | | | | | | | | | Reported by: cy@ Notes: svn path=/head/; revision=333677
* | Upgrade to OpenSSH 7.7p1.Dag-Erling Smørgrav2018-05-11226-7611/+14138
|\| | | | | | | Notes: svn path=/head/; revision=333490
* | Upgrade to OpenSSH 7.6p1. This will be followed shortly by 7.7p1.Dag-Erling Smørgrav2018-05-08226-14330/+10110
|\| | | | | | | | | | | | | | | | | This completely removes client-side support for the SSH 1 protocol, which was already disabled in 12 but is still enabled in 11. For that reason, we will not be able to merge 7.6p1 or newer back to 11. Notes: svn path=/head/; revision=333389
* | Update the repository URLs.Dag-Erling Smørgrav2018-05-061-4/+4
| | | | | | | | Notes: svn path=/head/; revision=333300
* | Upgrade to OpenSSH 7.5p1.Dag-Erling Smørgrav2017-08-0473-3053/+2331
|\| | | | | | | Notes: svn path=/head/; revision=322052
* | Refine and update blacklist support in sshdKurt Lidl2017-05-128-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust notification points slightly to catch all auth failures, rather than just the ones caused by bad usernames. Modify notification point for bad usernames to send new type of BLACKLIST_BAD_USER. (Support in libblacklist will be forthcoming soon.) Add guards to allow library headers to expose the enum of action values. Reviewed by: des Approved by: des Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=318242
* | Upgrade to OpenSSH 7.4p1.Dag-Erling Smørgrav2017-03-06195-6730/+5978
|\| | | | | | | Notes: svn path=/head/; revision=314720
* | Re-apply part of r311585 which was inadvertantly reverted in the upgradeDag-Erling Smørgrav2017-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | to 7.3p1. The other part (which adds -DLIBWRAP to sshd's CFLAGS) is still in place. Reported by: ngie Notes: svn path=/head/; revision=314601
* | Forgot to bump the version addendum date.Dag-Erling Smørgrav2017-03-035-5/+5
| | | | | | | | Notes: svn path=/head/; revision=314576
* | Upgrade to OpenSSH 7.3p1.Dag-Erling Smørgrav2017-03-02154-3237/+5943
|\| | | | | | | Notes: svn path=/head/; revision=314527
* | Avoid picking up MIT Kerberos from ports (if installed).Dag-Erling Smørgrav2017-02-261-1/+1
| | | | | | | | Notes: svn path=/head/; revision=314306
* | Fix amusingly harmless mis-merge.Dag-Erling Smørgrav2017-02-261-1/+0
| | | | | | | | Notes: svn path=/head/; revision=314304
* | Only notify blacklistd for successful logins in auth.cKurt Lidl2017-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | Reported by: Rick Adams Reviewed by: des MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=313965
* | MFV r311913:Xin LI2017-01-118-15/+55
|\| | | | | | | | | | | | | | | | | | | Fix multiple OpenSSH vulnerabilities. Submitted by: des Approved by: so Notes: svn path=/head/; revision=311914
* | Conditionalize building libwrap support into sshdEnji Cooper2017-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only build libwrap support into sshd if MK_TCP_WRAPPERS != no This will unbreak the build if libwrap has been removed from the system MFC after: 2 weeks PR: 210141 Submitted by: kpect@protonmail.com Differential Revision: D9049 Notes: svn path=/head/; revision=311585
* | MFV r308196:Xin LI2016-11-021-0/+1
|\| | | | | | | | | | | | | | | | | Fix OpenSSH remote Denial of Service vulnerability. Security: CVE-2016-8858 Notes: svn path=/head/; revision=308197