Commit Graph

9768 Commits

Author SHA1 Message Date
Manoj Ampalam d74ae2e5dd Ported V7.9 changes 2018-10-25 12:22:09 -07:00
Manoj Ampalam 456c5fc72b Merge branch 'V_7_9' of https://github.com/openssh/openssh-portable 2018-10-25 11:55:02 -07:00
Manoj Ampalam 77a35d0b0d
Remove sshd account dependency (#348)
In Windows, unprivileged worker runs as a runtime generated virtual account. There should be no requirement to have a real account under the name of unprivileged user (sshd).
2018-10-23 22:31:08 +05:30
Darren Tucker 55d7cdda4d Include openssl compatibility.
Patch from rosenp at gmail.com via openssh-unix-dev.
2018-10-22 20:07:09 +11:00
Damien Miller 631165f6c4 fix compile for openssl 1.0.x w/ --with-ssl-engine
bz#2921, patch from cotequeiroz
2018-10-22 11:23:42 +11:00
Damien Miller aede1c3424 Require OpenSSL 1.1.x series 1.1.0g or greater
Previous versions have a bug with EVP_CipherInit() when passed a
NULL EVP_CIPHER, per https://github.com/openssl/openssl/pull/4613

ok dtucker@
2018-10-17 11:01:20 +11:00
Damien Miller 08300c2114 unbreak compilation with --with-ssl-engine
Missing last argument to OPENSSL_init_crypto()
2018-10-17 08:12:02 +11:00
Darren Tucker 1673274aee Remove gcc spectre mitigation flags.
Current impementions of the gcc spectre mitigation flags cause
miscompilations when combined with other flags and do not provide much
protection.  Found by fweimer at redhat.com, ok djm@
2018-10-16 14:45:57 +11:00
Damien Miller 4e23deefd7 Avoid deprecated OPENSSL_config when using 1.1.x
OpenSSL 1.1.x soft-deprecated OPENSSL_config in favour of
OPENSSL_init_crypto; pointed out by Jakub Jelen
2018-10-16 10:54:37 +11:00
Darren Tucker 797cdd9c84 Don't avoid our *sprintf replacements.
Don't let systems with broken printf(3) avoid our replacements
via asprintf(3)/vasprintf(3) calling libc internally.  From djm@
2018-10-12 16:58:47 +11:00
Darren Tucker e526127cbd Check if snprintf understands %zu.
If the platforms snprintf and friends don't understand %zu, use the
compat replacement.  Prevents segfaults on those platforms.
2018-10-12 16:43:35 +11:00
Damien Miller cf39f87519 remove stale link, tweak 2018-10-12 09:48:05 +11:00
Damien Miller a7205e68de update version numbers ahead of release 2018-10-12 09:47:20 +11:00
djm@openbsd.org 1a4a9cf80f upstream: don't send new-style rsa-sha2-*-cert-v01@openssh.com names to
older OpenSSH that can't handle them. spotted by Adam Eijdenberg; ok dtucker

OpenBSD-Commit-ID: 662bbc402e3d7c9b6c322806269698106a6ae631
2018-10-12 09:43:30 +11:00
Damien Miller dc8ddcdf1a update depends 2018-10-11 13:08:59 +11:00
Damien Miller 26841ac265 some more duplicated key algorithm lines
From Adam Eijdenberg
2018-10-11 13:02:11 +11:00
Damien Miller 5d9d17603b fix duplicated algorithm specification lines
Spotted by Adam Eijdenberg
2018-10-11 11:56:36 +11:00
djm@openbsd.org ebfafd9c7a upstream: typo in plain RSA algorithm counterpart names for
certificates; spotted by Adam Eijdenberg; ok dtucker@

OpenBSD-Commit-ID: bfcdeb6f4fc9e7607f5096574c8f118f2e709e00
2018-10-11 11:55:57 +11:00
Damien Miller c29b111e7d check pw_passwd != NULL here too
Again, for systems with broken NIS implementations.

Prompted by coolbugcheckers AT gmail.com
2018-10-11 11:29:35 +11:00
Damien Miller fe8e8f349a check for NULL return from shadow_pw()
probably unreachable on this platform; pointed out by
coolbugcheckers AT gmail.com
2018-10-11 11:03:54 +11:00
deraadt@openbsd.org acc59cbe7a upstream: introducing openssh 7.9
OpenBSD-Commit-ID: 42d526a9fe01a40dd299ac58014d3349adf40e25
2018-10-11 11:03:53 +11:00
Damien Miller 12731158c7 supply callback to PEM_read_bio_PrivateKey
OpenSSL 1.1.0i has changed the behaviour of their PEM APIs,
so that empty passphrases are interpreted differently. This
probabalistically breaks loading some keys, because the PEM format
is terrible and doesn't include a proper MAC.

Avoid this by providing a basic callback to avoid passing empty
passphrases to OpenSSL in cases where one is required.

Based on patch from Jakub Jelen in bz#2913; ok dtucker@
2018-10-11 10:29:29 +11:00
Damien Miller d1d301a1dd in pick_salt() avoid dereference of NULL passwords
Apparently some NIS implementations can leave pw->pw_passwd (or the
shadow equivalent) NULL.

bz#2909; based on patch from Todd Eigenschink
2018-10-10 14:57:00 +11:00
djm@openbsd.org edbb6febcc upstream: Treat all PEM_read_bio_PrivateKey() errors when a passphrase
is specified as "incorrect passphrase" instead of trying to choose between
that and "invalid format".

libcrypto can return ASN1 parsing errors rather than the expected
decrypt error in certain infrequent cases when trying to decrypt/parse
PEM private keys when supplied with an invalid passphrase.

Report and repro recipe from Thomas Deutschmann in bz#2901

ok markus@

OpenBSD-Commit-ID: b1d4cd92395f9743f81c0d23aab2524109580870
2018-10-09 16:45:45 +11:00
naddy@openbsd.org 2581333d56 upstream: Support using service names for port numbers.
* Try to resolve a port specification with getservbyname(3) if a
 numeric conversion fails.
* Make the "Port" option in ssh_config handle its argument as a
 port rather than a plain integer.

ok dtucker@ deraadt@

OpenBSD-Commit-ID: e7f03633133205ab3dfbc67f9df7475fabae660d
2018-10-07 14:58:24 +11:00
Manoj Ampalam f7ea7ca04c Pester tests updated to reflect changes in 7.8 2018-10-05 16:11:58 -07:00
Manoj Ampalam 68719a25df Ported fork to 7.8 2018-10-05 15:11:07 -07:00
Manoj Ampalam 1ce9e2005d Merge branch 'V_7_8' of https://github.com/openssh/openssh-portable into cwb 2018-10-04 14:43:51 -07:00
Manoj Ampalam af4e4113b2
Ported bash based E2E tests and integrated security fix for cve-2018-15473(#346)
- Updated code to dynamic load Lsa functions until RS5 SDK includes them
 - Add conpty support in openssh
- Fixed Wierd characters (?25l) are seen, when logged in from ssh client
- Backspace doesn't work in powershell window
- Changes to support ssh-shellhost as an alternative shell
- Added support to have ssh-shellhost work as a standby shell (ssh-shellhost -c "cmdline") simply executes cmdline via CreateProcess
- Added E2E test cases and fixed unittests broken from prior changes
- Added PTY launch interface that supports both conpty and ssh-shellhost pty.
- Implemented PTY control channel in ssh-shellhost that supports Window resize events.
- Fixed regression with starting a PTY session with an explicit command
- modified ssh-shellhost pty argument to ---pty to remove ambiguity in cases when both -p and -c are present in commandline. Ex. ssh-shellhost.exe -c "myprogram -p -c argument"
2018-10-04 14:16:02 -07:00
djm@openbsd.org e0d6501e86 upstream: when the peer sends a channel-close message, make sure we
close the local extended read fd (stderr) along with the regular read fd
(stdout). Avoids weird stuck processed in multiplexing mode.

Report and analysis by Nelson Elhage and Geoffrey Thomas in bz#2863

ok dtucker@ markus@

OpenBSD-Commit-ID: a48a2467fe938de4de69d2e7193d5fa701f12ae9
2018-10-04 17:50:22 +10:00
djm@openbsd.org 6f1aabb128 upstream: factor out channel status formatting from
channel_open_message() so we can use it in other debug messages

OpenBSD-Commit-ID: 9c3903ca28fcabad57f566c9d0045b41ab7d52ba
2018-10-04 17:50:22 +10:00
djm@openbsd.org f1dd179e12 upstream: include a little more information about the status and
disposition of channel's extended (stderr) fd; makes debugging some things a
bit easier. No behaviour change.

OpenBSD-Commit-ID: 483eb6467dc7d5dbca8eb109c453e7a43075f7ce
2018-10-04 10:44:49 +10:00
djm@openbsd.org 2d1428b11c upstream: explicit_bzero here to be consistent with other kex*.c;
report from coolbugcheckers AT gmail.com

OpenBSD-Commit-ID: a90f146c5b5f5b1408700395e394f70b440856cb
2018-10-04 10:42:34 +10:00
djm@openbsd.org 5eff5b858e upstream: Allow ssh_config IdentityAgent directive to accept
environment variable names as well as explicit paths. ok dtucker@

OpenBSD-Commit-ID: 2f0996e103876c53d8c9dd51dcce9889d700767b
2018-10-03 16:39:58 +10:00
djm@openbsd.org a46ac4d86b upstream: mention INFO@openssh.com for sending SIGINFO
OpenBSD-Commit-ID: 132471eeb0df658210afd27852fe65131b26e900
2018-10-02 22:53:48 +10:00
Damien Miller ff3a411cae only support SIGINFO on systems with SIGINFO 2018-10-02 22:49:40 +10:00
djm@openbsd.org cd98925c64 upstream: Add server support for signalling sessions via the SSH
channel/ session protocol. Signalling is only supported to sesssions that are
not subsystems and were not started with a forced command.

Long requested in bz#1424

Based on a patch from markus@ and reworked by dtucker@;
ok markus@ dtucker@

OpenBSD-Commit-ID: 4bea826f575862eaac569c4bedd1056a268be1c3
2018-10-02 22:41:01 +10:00
Yanbing 0840af06bf
Add support of posix_spawnp (#344)
Added support of posix_spawnp.
1. fix of issue https://github.com/PowerShell/Win32-OpenSSH/issues/1185
2. add End2End tests
2018-09-29 14:28:21 -07:00
djm@openbsd.org dba5025833 upstream: remove big ugly TODO comment from start of file. Some of
the mentioned tasks are obsolete and, of the remainder, most are already
captured in PROTOCOL.mux where they better belong

OpenBSD-Commit-ID: 16d9d76dee42a5bb651c9d6740f7f0ef68aeb407
2018-09-26 17:35:49 +10:00
djm@openbsd.org 92b61a38ee upstream: Document mux proxy mode; added by Markus in openssh-7.4
Also add a little bit of information about the overall packet format

OpenBSD-Commit-ID: bdb6f6ea8580ef96792e270cae7857786ad84a95
2018-09-26 17:35:22 +10:00
djm@openbsd.org 9d883a1ce4 upstream: s/process_mux_master/mux_master_process/ in mux master
function names,

Gives better symmetry with the existing mux_client_*() names and makes
it more obvious when a message comes from the master vs client (they
are interleved in ControlMaster=auto mode).

no functional change beyond prefixing a could of log messages with
__func__ where they were previously lacking.

OpenBSD-Commit-ID: b01f7c3fdf92692e1713a822a89dc499333daf75
2018-09-26 11:50:28 +10:00
Darren Tucker c2fa53cd64 Remove unused variable in _ssh_compat_fflush. 2018-09-22 14:41:24 +10:00
Darren Tucker d1b3540c21 Import updated moduli. 2018-09-22 11:59:55 +10:00
djm@openbsd.org b5e412a899 upstream: Allow ssh_config ForwardX11Timeout=0 to disable the
timeout and allow X11 connections in untrusted mode indefinitely. ok dtucker@

OpenBSD-Commit-ID: ea1ceed3f540b48e5803f933e59a03b20db10c69
2018-09-21 22:49:27 +10:00
djm@openbsd.org cb24d9fcc9 upstream: when compiled with GSSAPI support, cache supported method
OIDs by calling ssh_gssapi_prepare_supported_oids() regardless of whether
GSSAPI authentication is enabled in the main config.

This avoids sandbox violations for configurations that enable GSSAPI
auth later, e.g.

Match user djm
	GSSAPIAuthentication yes

bz#2107; ok dtucker@

OpenBSD-Commit-ID: a5dd42d87c74e27cfb712b15b0f97ab20e0afd1d
2018-09-21 22:49:27 +10:00
djm@openbsd.org bbc8af72ba upstream: In sshkey_in_file(), ignore keys that are considered for
being too short (i.e. SSH_ERR_KEY_LENGTH). These keys will not be considered
to be "in the file". This allows key revocation lists to contain short keys
without the entire revocation list being considered invalid.

bz#2897; ok dtucker

OpenBSD-Commit-ID: d9f3d857d07194a42ad7e62889a74dc3f9d9924b
2018-09-21 22:49:09 +10:00
djm@openbsd.org 383a33d160 upstream: Treat connections with ProxyJump specified the same as ones
with a ProxyCommand set with regards to hostname canonicalisation (i.e. don't
try to canonicalise the hostname unless CanonicalizeHostname is set to
'always').

Patch from Sven Wegener via bz#2896

OpenBSD-Commit-ID: 527ff501cf98bf65fb4b29ed0cb847dda10f4d37
2018-09-21 13:12:48 +10:00
djm@openbsd.org 0cbed248ed upstream: actually make CASignatureAlgorithms available as a config
option

OpenBSD-Commit-ID: 93fa7ff58314ed7b1ab7744090a6a91232e6ae52
2018-09-21 09:41:59 +10:00
dtucker@openbsd.org 62528870c0 upstream: Import updated moduli.
OpenBSD-Commit-ID: 04431e8e7872f49a2129bf080a6b73c19d576d40
2018-09-21 09:41:59 +10:00
jmc@openbsd.org e6933a2ffa upstream: reorder CASignatureAlgorithms, and add them to the
various -o lists; ok djm

OpenBSD-Commit-ID: ecb88baecc3c54988b4d1654446ea033da359288
2018-09-21 09:41:10 +10:00