Commit Graph

9011 Commits

Author SHA1 Message Date
dtucker@openbsd.org 1f385f5533 upstream commit
Rename struct umac_ctx to umac128_ctx too.  In portable
some linkers complain about two symbols with the same name having differing
sizes.  ok djm@

OpenBSD-Commit-ID: cbebf8bdd3310a9795b4939a1e112cfe24061ca3
2018-02-09 20:00:18 +11:00
dtucker@openbsd.org f1f047fb03 upstream commit
ssh_free checks for and handles NULL args, remove NULL
checks from remaining callers.  ok djm@

OpenBSD-Commit-ID: bb926825c53724c069df68a93a2597f9192f7e7b
2018-02-09 20:00:18 +11:00
Darren Tucker aee49b2a89 Set SO_REUSEADDR in regression test netcat.
Sometimes multiplex tests fail on Solaris with "netcat: local_listen:
Address already in use" which is likely due to previous invocations
leaving the port in TIME_WAIT.  Set SO_REUSEADDR (in addition to
SO_REUSEPORT which is alread set on platforms that support it).  ok djm@
2018-02-08 12:42:12 +11:00
jsing@openbsd.org 1749991c55 upstream commit
Convert some explicit_bzero()/free() calls to freezero().

ok deraadt@ dtucker@

OpenBSD-Commit-ID: f566ab99149650ebe58b1d4b946ea726c3829609
2018-02-08 09:26:27 +11:00
jsing@openbsd.org 94ec2b69d4 upstream commit
Remove some #ifdef notyet code from OpenSSL 0.9.8 days.

These functions have never appeared in OpenSSL and are likely never to do
so.

"kill it with fire" djm@

OpenBSD-Commit-ID: fee9560e283fd836efc2631ef381658cc673d23e
2018-02-08 09:26:27 +11:00
jsing@openbsd.org 7cd31632e3 upstream commit
Remove all guards for calls to OpenSSL free functions -
all of these functions handle NULL, from at least OpenSSL 1.0.1g onwards.

Prompted by dtucker@ asking about guards for RSA_free(), when looking at
openssh-portable pr#84 on github.

ok deraadt@ dtucker@

OpenBSD-Commit-ID: 954f1c51b94297d0ae1f749271e184141e0cadae
2018-02-08 09:26:27 +11:00
Darren Tucker 3c000d57d4 Remove obsolete "Smartcard support" message
The configure checks that populated $SCARD_MSG were removed in commits
7ea845e4 and d8f60022 when the smartcard support was replaced with
PKCS#11.
2018-02-07 09:26:45 +11:00
dtucker@openbsd.org 3e615090de upstream commit
Replace "trojan horse" with the correct term (MITM).
From maikel at predikkta.com via bz#2822, ok markus@

OpenBSD-Commit-ID: e86ac64c512057c89edfadb43302ac0aa81a6c53
2018-02-07 07:50:46 +11:00
tb@openbsd.org 3484380110 upstream commit
Add a couple of non-negativity checks to avoid close(-1).

ok djm

OpenBSD-Commit-ID: 4701ce0b37161c891c838d0931305f1d37a50880
2018-02-07 07:50:46 +11:00
tb@openbsd.org 5069320be9 upstream commit
The file descriptors for socket, stdin, stdout and stderr
aren't necessarily distinct, so check if they are the same to avoid closing
the same fd several times.

ok djm

OpenBSD-Commit-ID: 60d71fd22e9a32f5639d4ba6e25a2f417fc36ac1
2018-02-07 07:50:46 +11:00
djm@openbsd.org 2b428f90ea upstream commit
I accidentially a word

OpenBSD-Commit-ID: 4547ee713fa941da861e83ae7a3e6432f915e14a
2018-02-07 07:50:46 +11:00
djm@openbsd.org 130283d5c2 upstream commit
certificate options are case-sensitive; fix case on one
that had it wrong.

move a badly-place sentence to a less bad place

OpenBSD-Commit-ID: 231e516bba860699a1eece6d48532d825f5f747b
2018-02-07 07:50:46 +11:00
Damien Miller 89f09ee687 crypto_api.h needs includes.h 2018-01-24 12:20:44 +11:00
stsp@openbsd.org c9c1bba06a upstream commit
Fix a logic bug in sshd_exchange_identification which
prevented clients using major protocol version 2 from connecting to the
server. ok millert@

OpenBSD-Commit-ID: 8668dec04586e27f1c0eb039ef1feb93d80a5ee9
2018-01-24 11:59:01 +11:00
stsp@openbsd.org a60c5dcfa2 upstream commit
Add missing braces; fixes 'write: Socket is not
connected' error in ssh. ok deraadt@

OpenBSD-Commit-ID: db73a3a9e147722d410866cac34d43ed52e1ad24
2018-01-24 11:59:01 +11:00
Damien Miller 20d53ac283 rebuild depends 2018-01-23 16:49:43 +11:00
Damien Miller 552ea155be one SSH_BUG_BANNER instance that got away 2018-01-23 16:49:22 +11:00
djm@openbsd.org 14b5c635d1 upstream commit
Drop compatibility hacks for some ancient SSH
implementations, including ssh.com <=2.* and OpenSSH <= 3.*.

These versions were all released in or before 2001 and predate the
final SSH RFCs. The hacks in question aren't necessary for RFC-
compliant SSH implementations.

ok markus@

OpenBSD-Commit-ID: 4be81c67db57647f907f4e881fb9341448606138
2018-01-23 16:40:29 +11:00
djm@openbsd.org 7c77991f5d upstream commit
try harder to preserve errno during
ssh_connect_direct() to make the final error message possibly accurate;
bz#2814, ok dtucker@

OpenBSD-Commit-ID: 57de882cb47381c319b04499fef845dd0c2b46ca
2018-01-23 16:40:28 +11:00
djm@openbsd.org 9e9c4a7e57 upstream commit
unbreak support for clients that advertise a protocol
version of "1.99" (indicating both v2 and v1 support). Busted by me during
SSHv1 purge in r1.358; bz2810, ok dtucker

OpenBSD-Commit-ID: e8f9c2bee11afc16c872bb79d6abe9c555bd0e4b
2018-01-23 16:40:28 +11:00
djm@openbsd.org fc21ea9796 upstream commit
don't attempt to force hostnames that are addresses to
lowercase, but instead canonicalise them through getnameinfo/getaddrinfo to
remove ambiguities (e.g. ::0001 => ::1) before they are matched against
known_hosts; bz#2763, ok dtucker@

OpenBSD-Commit-ID: ba0863ff087e61e5c65efdbe53be3cb92c9aefa0
2018-01-23 16:40:28 +11:00
djm@openbsd.org d6364f6fb1 upstream commit
avoid modifying pw->pw_passwd; let endpwent() clean up
for us, but keep a scrubbed copy; bz2777, ok dtucker@

OpenBSD-Commit-ID: 715afc0f59c6b82c4929a73279199ed241ce0752
2018-01-23 16:40:28 +11:00
naddy@openbsd.org a69bbb07cd upstream commit
clarify authorship; prodded by and ok markus@

OpenBSD-Commit-ID: e1938eee58c89b064befdabe232835fa83bb378c
2018-01-23 16:35:07 +11:00
markus@openbsd.org 04214b30be upstream commit
group shared source files (e.g. SRCS_KEX) and allow
compilation w/o OPENSSL ok djm@

OpenBSD-Commit-ID: fa728823ba21c4b45212750e1d3a4b2086fd1a62
2018-01-23 16:34:53 +11:00
markus@openbsd.org 25cf9105b8 upstream commit
move subprocess() so scp/sftp do not need uidswap.o; ok
djm@

OpenBSD-Commit-ID: 6601b8360388542c2e5fef0f4085f8e54750bea8
2018-01-23 16:32:57 +11:00
markus@openbsd.org b0d34132b3 upstream commit
switch ssh-pkcs11-helper to new API; ok djm@

OpenBSD-Commit-ID: e0c0ed2a568e25b1d2024f3e630f3fea837c2a42
2018-01-23 16:31:55 +11:00
markus@openbsd.org ec4a983118 upstream commit
split client/server kex; only ssh-keygen needs
uuencode.o; only scp/sftp use progressmeter.o; ok djm@

OpenBSD-Commit-ID: f2c9feb26963615c4fece921906cf72e248b61ee
2018-01-23 16:30:39 +11:00
markus@openbsd.org ec77efeea0 upstream commit
only ssh-keygen needs uuencode.o; only scp/sftp use
progressmeter.o

OpenBSD-Commit-ID: a337e886a49f96701ccbc4832bed086a68abfa85
2018-01-23 16:29:59 +11:00
markus@openbsd.org 25aae35d3d upstream commit
uuencode.h is not used

OpenBSD-Commit-ID: 238eb4659f3c119904326b9e94a5e507a912796c
2018-01-23 16:28:31 +11:00
Damien Miller 4f29309c4c unbreak fuzz harness 2018-01-03 19:50:43 +11:00
djm@openbsd.org f6b50bf84d upstream commit
another libssh casualty

OpenBSD-Regress-ID: 839b970560246de23e7c50215095fb527a5a83ec
2018-01-03 16:46:49 +11:00
djm@openbsd.org 5fb4fb5a01 upstream commit
missed one (unbreak after ssh/lib removal)

OpenBSD-Regress-ID: cfdd132143131769e2d2455e7892b5d55854c322
2018-01-03 16:46:49 +11:00
djm@openbsd.org e6c4134165 upstream commit
unbreak unit tests after removal of src/usr.bin/ssh/lib

OpenBSD-Regress-ID: 3a79760494147b20761cbd2bd5c20e86c63dc8f9
2018-01-03 16:46:49 +11:00
djm@openbsd.org d45d69f2a9 upstream commit
revert stricter key type / signature type checking in
userauth path; too much software generates inconsistent messages, so we need
a better plan.

OpenBSD-Commit-ID: 4a44ddc991c803c4ecc8f1ad40e0ab4d22e1c519
2017-12-21 15:40:19 +11:00
djm@openbsd.org c5a6cbdb79 upstream commit
explicitly test all key types and their certificate
counterparts

refactor a little

OpenBSD-Regress-ID: e9ecd5580821b9ef8b7106919c6980d8e45ca8c4
2017-12-19 16:19:18 +11:00
dtucker@openbsd.org f689adb7a3 upstream commit
use cmp in a loop instead of diff -N to compare
directories. The former works on more platforms for Portable.

OpenBSD-Regress-ID: c3aa72807f9c488e8829a26ae50fe5bcc5b57099
2017-12-19 16:19:18 +11:00
Damien Miller 748dd8e5de remove blocks.c from Makefile 2017-12-19 16:17:59 +11:00
djm@openbsd.org 2788563205 upstream commit
include signature type and CA key (if applicable) in some
debug messages

OpenBSD-Commit-ID: b71615cc20e78cec7105bb6e940c03ce9ae414a5
2017-12-19 15:21:37 +11:00
djm@openbsd.org 7860731ef1 upstream commit
unbreak hostkey rotation; attempting to sign with a
desired signature algorithm of kex->hostkey_alg is incorrect when the key
type isn't capable of making those signatures. ok markus@

OpenBSD-Commit-ID: 35ae46864e1f5859831ec0d115ee5ea50953a906
2017-12-19 15:21:37 +11:00
djm@openbsd.org 966ef47833 upstream commit
log mismatched RSA signature types; ok markus@

OpenBSD-Commit-ID: 381bddfcc1e297a42292222f3bcb5ac2b7ea2418
2017-12-19 15:21:37 +11:00
djm@openbsd.org 349ecd4da3 upstream commit
pass kex->hostkey_alg and kex->hostkey_nid from pre-auth
to post-auth unpriviledged child processes; ok markus@

OpenBSD-Commit-ID: 4a35bc7af0a5f8a232d1361f79f4ebc376137302
2017-12-19 15:21:37 +11:00
millert@openbsd.org c9e37a8725 upstream commit
Add helper function for uri handing in scp where a
missing path simply means ".".  Also fix exit code and add warnings when an
invalid uri is encountered.  OK otto@

OpenBSD-Commit-ID: 47dcf872380586dabf7fcc6e7baf5f8ad508ae1a
2017-12-19 15:21:37 +11:00
djm@openbsd.org 04c7e28f83 upstream commit
pass negotiated signing algorithm though to
sshkey_verify() and check that the negotiated algorithm matches the type in
the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@

OpenBSD-Commit-ID: 735fb15bf4adc060d3bee9d047a4bcaaa81b1af9
2017-12-19 15:21:37 +11:00
djm@openbsd.org 931c78dfd7 upstream commit
sshkey_sigtype() function to return the type of a
signature; ok markus@

OpenBSD-Commit-ID: d3772b065ad6eed97285589bfb544befed9032e8
2017-12-19 15:20:44 +11:00
naddy@openbsd.org 4cdc5956f2 upstream commit
Replace ED25519's private SHA-512 implementation with a
call to the regular digest code.  This speeds up compilation considerably. ok
markus@

OpenBSD-Commit-ID: fcce8c3bcfe7389462a28228f63c823e80ade41c
2017-12-19 15:20:43 +11:00
naddy@openbsd.org 012e5cb839 upstream commit
Create a persistent umac128.c source file: #define the
output size and the name of the entry points for UMAC-128 before including
umac.c. Idea from FreeBSD. ok dtucker@

OpenBSD-Commit-ID: 463cfacfa07cb8060a4d4961e63dca307bf3f4b1
2017-12-19 15:17:38 +11:00
Darren Tucker b35addfb4c Update .depend with empty config.h 2017-12-12 11:17:22 +11:00
Darren Tucker 2d96f28246 Ensure config.h is always in dependencies.
Put an empty config.h into the dependency list to ensure that it's
always listed and consistent.
2017-12-12 11:17:22 +11:00
deraadt@openbsd.org ac4987a55e upstream commit
ssh/lib hasn't worked towards our code-sharing goals for
a quit while, perhaps it is too verbose?  Change each */Makefile to
specifying exactly what sources that program requires, compiling it seperate.
 Maybe we'll iterate by sorting those into seperatable chunks, splitting up
files which contain common code + server/client specific code, or whatnot.
But this isn't one step, or we'd have done it a long time ago.. ok dtucker
markus djm

OpenBSD-Commit-ID: 5317f294d63a876bfc861e19773b1575f96f027d
2017-12-12 10:32:30 +11:00
dtucker@openbsd.org 48c23a39a8 upstream commit
Put remote client info back into the ClientAlive
connection termination message.  Based in part on diff from  lars.nooden at
gmail, ok djm

OpenBSD-Commit-ID: 80a0f619a29bbf2f32eb5297a69978a0e05d0ee0
2017-12-12 10:32:04 +11:00