]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
9 years agoupstream commit
djm@openbsd.org [Fri, 19 Aug 2016 03:18:06 +0000 (03:18 +0000)] 
upstream commit

remove UseLogin option and support for having /bin/login
manage login sessions; ok deraadt markus dtucker

Upstream-ID: bea7213fbf158efab7e602d9d844fba4837d2712

9 years agoupstream commit
naddy@openbsd.org [Mon, 15 Aug 2016 12:32:04 +0000 (12:32 +0000)] 
upstream commit

Catch up with the SSH1 code removal and delete all
mention of protocol 1 particularities, key files and formats, command line
options, and configuration keywords from the server documentation and
examples.  ok jmc@

Upstream-ID: 850328854675b4b6a0d4a90f0b4a9dd9ca4e905f

9 years agoupstream commit
naddy@openbsd.org [Mon, 15 Aug 2016 12:27:56 +0000 (12:27 +0000)] 
upstream commit

Remove more SSH1 server code: * Drop sshd's -k option. *
Retire configuration keywords that only apply to protocol 1, as well as   the
"protocol" keyword. * Remove some related vestiges of protocol 1 support.

ok markus@

Upstream-ID: 9402f82886de917779db12f8ee3f03d4decc244d

9 years agoOnly check for prctl once.
Darren Tucker [Wed, 17 Aug 2016 06:26:04 +0000 (16:26 +1000)] 
Only check for prctl once.

9 years agoFix typo.
Darren Tucker [Wed, 17 Aug 2016 05:33:10 +0000 (15:33 +1000)] 
Fix typo.

9 years agoCorrect LDFLAGS for clang example.
Darren Tucker [Wed, 17 Aug 2016 04:25:43 +0000 (14:25 +1000)] 
Correct LDFLAGS for clang example.

--with-ldflags isn't used until after the -ftrapv test, so mention
LDFLAGS instead for now.

9 years agoRemove obsolete CVS $Id from source files.
Darren Tucker [Wed, 17 Aug 2016 04:08:42 +0000 (14:08 +1000)] 
Remove obsolete CVS $Id from source files.

Since -portable switched to git the CVS $Id tags are no longer being
updated and are becoming increasingly misleading.  Remove them.

9 years agoRemove now-obsolete CVS $Id tags from text files.
Darren Tucker [Wed, 17 Aug 2016 03:40:58 +0000 (13:40 +1000)] 
Remove now-obsolete CVS $Id tags from text files.

Since -portable switched to git, the CVS $Id tags are no longer being
updated and are becoming increasingly misleading.  Remove them.

9 years agoAdd a section for compiler specifics.
Darren Tucker [Wed, 17 Aug 2016 03:38:30 +0000 (13:38 +1000)] 
Add a section for compiler specifics.

Add a section for compiler specifics and document the runtime requirements
for clang's integer sanitization.

9 years agoTest multiplying two long long ints.
Darren Tucker [Wed, 17 Aug 2016 03:35:43 +0000 (13:35 +1000)] 
Test multiplying two long long ints.

When using clang with -ftrapv or -sanitize=integer the tests would pass
but linking would fail with "undefined reference to __mulodi4".
Explicitly test for this before enabling -trapv.

9 years agoadd a --with-login-program configure argument
Damien Miller [Tue, 16 Aug 2016 04:47:34 +0000 (14:47 +1000)] 
add a --with-login-program configure argument

Saves messing around with LOGIN_PROGRAM env var, which come
packaging environments make hard to do during configure phase.

9 years agoadd --with-pam-service to specify PAM service name
Damien Miller [Tue, 16 Aug 2016 03:30:56 +0000 (13:30 +1000)] 
add --with-pam-service to specify PAM service name

Saves messing around with CFLAGS to do it.

9 years agofix false positives when compiled with msan
Damien Miller [Tue, 16 Aug 2016 03:28:23 +0000 (13:28 +1000)] 
fix false positives when compiled with msan

Our explicit_bzero successfully confused clang -fsanitize-memory
in to thinking that memset is never called to initialise memory.
Ensure that it is called in a way that the compiler recognises.

9 years agoupstream commit
markus@openbsd.org [Sat, 13 Aug 2016 17:47:40 +0000 (17:47 +0000)] 
upstream commit

remove ssh1 server code; ok djm@

Upstream-ID: c24c0c32c49b91740d5a94ae914fb1898ea5f534

9 years agoupstream commit
jca@openbsd.org [Fri, 12 Aug 2016 19:19:04 +0000 (19:19 +0000)] 
upstream commit

Use 2001:db8::/32, the official IPv6 subnet for
configuration examples.

This makes the IPv6 example consistent with IPv4, and removes a dubious
mention of a 6bone subnet.

ok sthen@ millert@

Upstream-ID: b027f3d0e0073419a132fd1bf002e8089b233634

9 years agoupstream commit
dtucker@openbsd.org [Thu, 11 Aug 2016 01:42:11 +0000 (01:42 +0000)] 
upstream commit

Update moduli file.

Upstream-ID: 6da9a37f74aef9f9cc639004345ad893cad582d8

9 years agoImport updated moduli.
Darren Tucker [Thu, 11 Aug 2016 01:42:48 +0000 (11:42 +1000)] 
Import updated moduli.

9 years agoupstream commit
dtucker@openbsd.org [Mon, 8 Aug 2016 22:40:57 +0000 (22:40 +0000)] 
upstream commit

Improve error message for overlong ControlPath.  ok markus@
djm@

Upstream-ID: aed374e2e88dd3eb41390003e5303d0089861eb5

9 years agoupstream commit
djm@openbsd.org [Wed, 3 Aug 2016 05:41:57 +0000 (05:41 +0000)] 
upstream commit

small refactor of cipher.c: make ciphercontext opaque to
callers feedback and ok markus@

Upstream-ID: 094849f8be68c3bdad2c0f3dee551ecf7be87f6f

9 years agoupstream commit
dtucker@openbsd.org [Wed, 3 Aug 2016 04:23:55 +0000 (04:23 +0000)] 
upstream commit

Fix bug introduced in rev 1.467 which causes
"buffer_get_bignum_ret: incomplete message" errors when built with WITH_SSH1
and run such that no Protocol 1 ephemeral host key is generated (eg "Protocol
2", no SSH1 host key supplied).  Reported by rainer.laatsch at t-online.de,
ok deraadt@

Upstream-ID: aa6b132da5c325523aed7989cc5a320497c919dc

9 years agoupstream commit
djm@openbsd.org [Wed, 27 Jul 2016 23:18:12 +0000 (23:18 +0000)] 
upstream commit

better bounds check on iovcnt (we only ever use fixed,
positive values)

Upstream-ID: 9baa6eb5cd6e30c9dc7398e5fe853721a3a5bdee

9 years agoUse tabs consistently inside "case $host".
Darren Tucker [Tue, 2 Aug 2016 05:22:40 +0000 (15:22 +1000)] 
Use tabs consistently inside "case $host".

9 years agoExplicitly test for broken strnvis.
Darren Tucker [Tue, 2 Aug 2016 02:16:34 +0000 (12:16 +1000)] 
Explicitly test for broken strnvis.

NetBSD added an strnvis and unfortunately made it incompatible with the
existing one in OpenBSD and Linux's libbsd (the former having existed
for over ten years). Despite this incompatibility being reported during
development (see http://gnats.netbsd.org/44977) they still shipped it.
Even more unfortunately FreeBSD and later MacOS picked up this incompatible
implementation.  Try to detect this mess, and assume the only safe option
if we're cross compiling.

OpenBSD 2.9 (2001): strnvis(char *dst, const char *src, size_t dlen, int flag);
NetBSD 6.0 (2012):  strnvis(char *dst, size_t dlen, const char *src, int flag);

ok djm@

9 years agoupdate recommended autoconf version
Damien Miller [Tue, 2 Aug 2016 01:06:23 +0000 (11:06 +1000)] 
update recommended autoconf version

9 years agoupdate config.guess and config.sub to current
Damien Miller [Tue, 2 Aug 2016 00:48:04 +0000 (10:48 +1000)] 
update config.guess and config.sub to current

upstream commit 562f3512b3911ba0c77a7f68214881d1f241f46e

9 years agoReplace spaces with tabs.
Darren Tucker [Tue, 2 Aug 2016 00:01:52 +0000 (10:01 +1000)] 
Replace spaces with tabs.

Mechanically replace spaces with tabs in compat files not synced with
OpenBSD.

9 years agoStrip trailing whitespace.
Darren Tucker [Mon, 1 Aug 2016 23:44:25 +0000 (09:44 +1000)] 
Strip trailing whitespace.

Mechanically strip trailing whitespace on files not synced with OpenBSD
(or in the case of bsd-snprint.c, rsync).

9 years agoRepair $OpenBSD markers.
Darren Tucker [Mon, 1 Aug 2016 23:06:27 +0000 (09:06 +1000)] 
Repair $OpenBSD markers.

9 years agoRepair $OpenBSD marker.
Darren Tucker [Mon, 1 Aug 2016 23:02:42 +0000 (09:02 +1000)] 
Repair $OpenBSD marker.

9 years agomodified: configure.ac opensshd.init.in
Tim Rice [Mon, 1 Aug 2016 21:31:52 +0000 (14:31 -0700)] 
modified:   configure.ac opensshd.init.in
Skip generating missing RSA1 key on startup unless ssh1 support is enabled.
Spotted by Jean-Pierre Radley

9 years agodefine _OPENBSD_SOURCE for reallocarray on NetBSD V_7_3_P1
Damien Miller [Wed, 27 Jul 2016 22:54:27 +0000 (08:54 +1000)] 
define _OPENBSD_SOURCE for reallocarray on NetBSD

Report by and debugged with Hisashi T Fujinaka, dtucker nailed
the problem (lack of prototype causing return type confusion).

9 years agoKNF
Damien Miller [Tue, 26 Jul 2016 22:25:42 +0000 (08:25 +1000)] 
KNF

9 years agoLinux auditing also needs packet.h
Damien Miller [Tue, 26 Jul 2016 22:25:23 +0000 (08:25 +1000)] 
Linux auditing also needs packet.h

9 years agofix auditing on Linux
Damien Miller [Tue, 26 Jul 2016 22:18:05 +0000 (08:18 +1000)] 
fix auditing on Linux

get_remote_ipaddr() was replaced with ssh_remote_ipaddr()

9 years agocrank version numbers
Damien Miller [Sun, 24 Jul 2016 11:50:13 +0000 (21:50 +1000)] 
crank version numbers

9 years agoupstream commit
djm@openbsd.org [Sun, 24 Jul 2016 11:45:36 +0000 (11:45 +0000)] 
upstream commit

openssh-7.3

Upstream-ID: af106a7eb665f642648cf1993e162c899f358718

9 years agoMove Cygwin IPPORT_RESERVED overrride to defines.h
Darren Tucker [Sat, 23 Jul 2016 06:14:42 +0000 (16:14 +1000)] 
Move Cygwin IPPORT_RESERVED overrride to defines.h

Patch from vinschen at redhat.com.

9 years agoupstream commit
djm@openbsd.org [Sat, 23 Jul 2016 02:54:08 +0000 (02:54 +0000)] 
upstream commit

fix pledge violation with ssh -f; reported by Valentin
Kozamernik ok dtucker@

Upstream-ID: a61db7988db88d9dac3c4dd70e18876a8edf84aa

9 years agoupstream commit
djm@openbsd.org [Fri, 22 Jul 2016 07:00:46 +0000 (07:00 +0000)] 
upstream commit

improve wording; suggested by jmc@

Upstream-ID: 55cb0a24c8e0618b3ceec80998dc82c85db2d2f8

9 years agoupstream commit
dtucker@openbsd.org [Fri, 22 Jul 2016 05:46:11 +0000 (05:46 +0000)] 
upstream commit

Lower loglevel for "Authenticated with partial success"
message similar to other similar level.  bz#2599, patch from cgallek at
gmail.com, ok markus@

Upstream-ID: 3faab814e947dc7b2e292edede23e94c608cb4dd

9 years agoretry waitpid on EINTR failure
Damien Miller [Fri, 22 Jul 2016 04:06:36 +0000 (14:06 +1000)] 
retry waitpid on EINTR failure

patch from Jakub Jelen on bz#2581; ok dtucker@

9 years agoupstream commit
djm@openbsd.org [Fri, 22 Jul 2016 03:47:36 +0000 (03:47 +0000)] 
upstream commit

constify a few functions' arguments; patch from Jakub
Jelen bz#2581

Upstream-ID: f2043f51454ea37830ff6ad60c8b32b4220f448d

9 years agoupstream commit
djm@openbsd.org [Fri, 22 Jul 2016 03:39:13 +0000 (03:39 +0000)] 
upstream commit

move debug("%p", key) to before key is free'd; probable
undefined behaviour on strict compilers; reported by Jakub Jelen bz#2581

Upstream-ID: 767f323e1f5819508a0e35e388ec241bac2f953a

9 years agoupstream commit
djm@openbsd.org [Fri, 22 Jul 2016 03:35:11 +0000 (03:35 +0000)] 
upstream commit

reverse the order in which -J/JumpHost proxies are visited to
be more intuitive and document

reported by and manpage bits naddy@

Upstream-ID: 3a68fd6a841fd6cf8cedf6552a9607ba99df179a

9 years agoupstream commit
dtucker@openbsd.org [Thu, 21 Jul 2016 01:39:35 +0000 (01:39 +0000)] 
upstream commit

Skip passwords longer than 1k in length so clients can't
easily DoS sshd by sending very long passwords, causing it to spend CPU
hashing them. feedback djm@, ok markus@.

Brought to our attention by tomas.kuthan at oracle.com, shilei-c at
360.cn and coredump at autistici.org

Upstream-ID: d0af7d4a2190b63ba1d38eec502bc4be0be9e333

9 years agoupstream commit
naddy@openbsd.org [Wed, 20 Jul 2016 10:45:27 +0000 (10:45 +0000)] 
upstream commit

Do not clobber the global jump_host variables when
parsing an inactive configuration.  ok djm@

Upstream-ID: 5362210944d91417d5976346d41ac0b244350d31

9 years agoupstream commit
jmc@openbsd.org [Tue, 19 Jul 2016 12:59:16 +0000 (12:59 +0000)] 
upstream commit

tweak previous;

Upstream-ID: f3c1a5b3f05dff366f60c028728a2b43f15ff534

9 years agoupstream commit
dtucker@openbsd.org [Tue, 19 Jul 2016 11:38:53 +0000 (11:38 +0000)] 
upstream commit

Allow wildcard for PermitOpen hosts as well as ports.
bz#2582, patch from openssh at mzpqnxow.com and jjelen at redhat.com.  ok
markus@

Upstream-ID: af0294e9b9394c4e16e991424ca0a47a7cc605f2

9 years agoupstream commit
markus@openbsd.org [Mon, 18 Jul 2016 11:35:33 +0000 (11:35 +0000)] 
upstream commit

Reduce timing attack against obsolete CBC modes by always
computing the MAC over a fixed size of data. Reported by Jean Paul
Degabriele, Kenny Paterson, Torben Hansen and Martin Albrecht. ok djm@

Upstream-ID: f20a13279b00ba0afbacbcc1f04e62e9d41c2912

9 years agoSearch users for one with a valid salt.
Darren Tucker [Thu, 21 Jul 2016 04:17:31 +0000 (14:17 +1000)] 
Search users for one with a valid salt.

If the root account is locked (eg password "!!" or "*LK*") keep looking
until we find a user with a valid salt to use for crypting passwords of
invalid users.  ok djm@

9 years agoExplicitly specify source files for regress tools.
Darren Tucker [Mon, 18 Jul 2016 07:22:49 +0000 (17:22 +1000)] 
Explicitly specify source files for regress tools.

Since adding $(REGRESSLIBS), $? is wrong because it includes only the
changed source files.  $< seems like it'd be right however it doesn't
seem to work on some non-GNU makes, so do what works everywhere.

9 years agoConditionally include err.h.
Darren Tucker [Mon, 18 Jul 2016 07:12:22 +0000 (17:12 +1000)] 
Conditionally include err.h.

9 years agoRemove local implementation of err, errx.
Darren Tucker [Mon, 18 Jul 2016 06:26:26 +0000 (16:26 +1000)] 
Remove local implementation of err, errx.

We now have a shared implementation in libopenbsd-compat.

9 years agoupstream commit
djm@openbsd.org [Mon, 18 Jul 2016 06:08:01 +0000 (06:08 +0000)] 
upstream commit

Add some unsigned overflow checks for extra_pad. None of
these are reachable with the amount of padding that we use internally.
bz#2566, pointed out by Torben Hansen. ok markus@

Upstream-ID: 4d4be8450ab2fc1b852d5884339f8e8c31c3fd76

9 years agoAdd dependency on libs for unit tests.
Darren Tucker [Mon, 18 Jul 2016 05:43:25 +0000 (15:43 +1000)] 
Add dependency on libs for unit tests.

Makes "./configure && make tests" work again.  ok djm@

9 years agoCorrect location for kexfuzz in clean target.
Darren Tucker [Mon, 18 Jul 2016 03:47:39 +0000 (13:47 +1000)] 
Correct location for kexfuzz in clean target.

9 years agoHandle PAM_MAXTRIES from modules.
Darren Tucker [Sun, 17 Jul 2016 23:33:25 +0000 (09:33 +1000)] 
Handle PAM_MAXTRIES from modules.

bz#2249: handle the case where PAM returns PAM_MAXTRIES by ceasing to offer
password and keyboard-interative authentication methods.  Should prevent
"sshd ignoring max retries" warnings in the log.  ok djm@

It probably won't trigger with keyboard-interactive in the default
configuration because the retry counter is stored in module-private
storage which goes away with the sshd PAM process (see bz#688).  On the
other hand, those cases probably won't log a warning either.

9 years agoupstream commit
djm@openbsd.org [Sun, 17 Jul 2016 04:20:16 +0000 (04:20 +0000)] 
upstream commit

support UTF-8 characters in ssh(1) banners using
schwarze@'s safe fmprintf printer; bz#2058

feedback schwarze@ ok dtucker@

Upstream-ID: a72ce4e3644c957643c9524eea2959e41b91eea7

9 years agoupstream commit
jmc@openbsd.org [Sat, 16 Jul 2016 06:57:55 +0000 (06:57 +0000)] 
upstream commit

- add proxyjump to the options list - formatting fixes -
update usage()

ok djm

Upstream-ID: 43d318e14ce677a2eec8f21ef5ba2f9f68a59457

9 years agoupstream commit
dtucker@openbsd.org [Fri, 15 Jul 2016 05:01:58 +0000 (05:01 +0000)] 
upstream commit

Reduce the syslog level of some relatively common protocol
events from LOG_CRIT by replacing fatal() calls with logdie().  Part of
bz#2585, ok djm@

Upstream-ID: 9005805227c94edf6ac02a160f0e199638d288e5

9 years agomissing openssl/dh.h
Damien Miller [Fri, 15 Jul 2016 09:14:48 +0000 (19:14 +1000)] 
missing openssl/dh.h

9 years agocast to avoid type warning in error message
Damien Miller [Fri, 15 Jul 2016 08:47:07 +0000 (18:47 +1000)] 
cast to avoid type warning in error message

9 years agoMove VA_COPY macro into compat header.
Darren Tucker [Fri, 15 Jul 2016 04:48:30 +0000 (14:48 +1000)] 
Move VA_COPY macro into compat header.

Some AIX compilers unconditionally undefine va_copy but don't set it back
to an internal function, causing link errors.  In some compat code we
already use VA_COPY instead so move the two existing instances into the
shared header and use for sshbuf-getput-basic.c too.  Should fix building
with at lease some versions of AIX's compiler.  bz#2589, ok djm@

9 years agodisable ciphers not supported by OpenSSL
Damien Miller [Fri, 15 Jul 2016 04:45:34 +0000 (14:45 +1000)] 
disable ciphers not supported by OpenSSL

bz#2466 ok dtucker@

9 years agoadd a --disable-pkcs11 knob
Damien Miller [Fri, 15 Jul 2016 03:54:31 +0000 (13:54 +1000)] 
add a --disable-pkcs11 knob

9 years agofix newline escaping for unsupported_algorithms
Damien Miller [Fri, 15 Jul 2016 03:44:38 +0000 (13:44 +1000)] 
fix newline escaping for unsupported_algorithms

The hmac-ripemd160 was incorrect and could lead to broken
Makefiles on systems that lacked support for it, but I made
all the others consistent too.

9 years agoupstream commit
djm@openbsd.org [Fri, 15 Jul 2016 00:24:30 +0000 (00:24 +0000)] 
upstream commit

Add a ProxyJump ssh_config(5) option and corresponding -J
ssh(1) command-line flag to allow simplified indirection through a SSH
bastion or "jump host".

These options construct a proxy command that connects to the
specified jump host(s) (more than one may be specified) and uses
port-forwarding to establish a connection to the next destination.

This codifies the safest way of indirecting connections through SSH
servers and makes it easy to use.

ok markus@

Upstream-ID: fa899cb8b26d889da8f142eb9774c1ea36b04397

9 years agoMap umac_ctx struct name too.
Darren Tucker [Fri, 15 Jul 2016 02:56:39 +0000 (12:56 +1000)] 
Map umac_ctx struct name too.

Prevents size mismatch linker warnings on Solaris 11.

9 years agoMitigate timing of disallowed users PAM logins.
Darren Tucker [Fri, 15 Jul 2016 03:49:44 +0000 (13:49 +1000)] 
Mitigate timing of disallowed users PAM logins.

When sshd decides to not allow a login (eg PermitRootLogin=no) and
it's using PAM, it sends a fake password to PAM so that the timing for
the failure is not noticeably different whether or not the password
is correct.  This behaviour can be detected by sending a very long
password string which is slower to hash than the fake password.

Mitigate by constructing an invalid password that is the same length
as the one from the client and thus takes the same time to hash.
Diff from djm@

9 years agoDetermine appropriate salt for invalid users.
Darren Tucker [Fri, 15 Jul 2016 03:32:45 +0000 (13:32 +1000)] 
Determine appropriate salt for invalid users.

When sshd is processing a non-PAM login for a non-existent user it uses
the string from the fakepw structure as the salt for crypt(3)ing the
password supplied by the client.  That string has a Blowfish prefix, so on
systems that don't understand that crypt will fail fast due to an invalid
salt, and even on those that do it may have significantly different timing
from the hash methods used for real accounts (eg sha512).  This allows
user enumeration by, eg, sending large password strings.  This was noted
by EddieEzra.Harari at verint.com (CVE-2016-6210).

To mitigate, use the same hash algorithm that root uses for hashing
passwords for users that do not exist on the system.  ok djm@

9 years agoOpenSSL 1.1.x not currently supported.
Darren Tucker [Thu, 14 Jul 2016 11:19:59 +0000 (21:19 +1000)] 
OpenSSL 1.1.x not currently supported.

9 years agoCheck for VIS_ALL.
Darren Tucker [Thu, 14 Jul 2016 02:25:24 +0000 (12:25 +1000)] 
Check for VIS_ALL.

If we don't have it, set BROKEN_STRNVIS to activate the compat replacement.

9 years agoupstream commit
dtucker@openbsd.org [Thu, 14 Jul 2016 01:24:21 +0000 (01:24 +0000)] 
upstream commit

Correct equal in test.

Upstream-Regress-ID: 4e32f7a5c57a619c4e8766cb193be2a1327ec37a

9 years agoupstream commit
tb@openbsd.org [Mon, 11 Jul 2016 21:38:13 +0000 (21:38 +0000)] 
upstream commit

Add missing "recvfd" pledge promise: Raf Czlonka reported
ssh coredumps when Control* keywords were set in ssh_config. This patch also
fixes similar problems with scp and sftp.

ok deraadt, looks good to millert

Upstream-ID: ca2099eade1ef3e87a79614fefa26a0297ad8a3b

9 years agoupstream commit
tedu@openbsd.org [Mon, 11 Jul 2016 03:19:44 +0000 (03:19 +0000)] 
upstream commit

obsolete note about fascistloggin is obsolete. ok djm
dtucker

Upstream-ID: dae60df23b2bb0e89f42661ddd96a7b0d1b7215a

9 years agoAdd compat code for missing wcwidth.
Darren Tucker [Thu, 14 Jul 2016 00:59:09 +0000 (10:59 +1000)] 
Add compat code for missing wcwidth.

If we don't have wcwidth force fallback implementations of nl_langinfo
and mbtowc.  Based on advice from Ingo Schwarze.

9 years agofix missing include for systems with err.h
Damien Miller [Wed, 13 Jul 2016 23:48:48 +0000 (09:48 +1000)] 
fix missing include for systems with err.h

9 years agoMove err.h replacements into compat lib.
Darren Tucker [Wed, 13 Jul 2016 04:42:35 +0000 (14:42 +1000)] 
Move err.h replacements into compat lib.

Move implementations of err.h replacement functions into their own file
in the libopenbsd-compat so we can use them in kexfuzz.c too.  ok djm@

9 years agoCheck for wchar.h and langinfo.h
Darren Tucker [Mon, 11 Jul 2016 07:23:38 +0000 (17:23 +1000)] 
Check for wchar.h and langinfo.h

Wrap includes in the appropriate #ifdefs.

9 years agowhitelist more architectures for seccomp-bpf
Damien Miller [Fri, 8 Jul 2016 03:59:13 +0000 (13:59 +1000)] 
whitelist more architectures for seccomp-bpf

bz#2590 - testing and patch from Jakub Jelen

9 years agoupstream commit
guenther@openbsd.org [Mon, 4 Jul 2016 18:01:44 +0000 (18:01 +0000)] 
upstream commit

DEBUGLIBS has been broken since the gcc4 switch, so delete
it.  CFLAGS contains -g by default anyway

problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com)
ok millert@ kettenis@ deraadt@

Upstream-Regress-ID: 4a0bb72f95c63f2ae9daa8a040ac23914bddb542

9 years agoupstream commit
djm@openbsd.org [Fri, 8 Jul 2016 03:44:42 +0000 (03:44 +0000)] 
upstream commit

Improve crypto ordering for Encrypt-then-MAC (EtM) mode
MAC algorithms.

Previously we were computing the MAC, decrypting the packet and then
checking the MAC. This gave rise to the possibility of creating a
side-channel oracle in the decryption step, though no such oracle has
been identified.

This adds a mac_check() function that computes and checks the MAC in
one pass, and uses it to advance MAC checking for EtM algorithms to
before payload decryption.

Reported by Jean Paul Degabriele, Kenny Paterson, Torben Hansen and
Martin Albrecht. feedback and ok markus@

Upstream-ID: 1999bb67cab47dda5b10b80d8155fe83d4a1867b

9 years agoupstream commit
guenther@openbsd.org [Mon, 4 Jul 2016 18:01:44 +0000 (18:01 +0000)] 
upstream commit

DEBUGLIBS has been broken since the gcc4 switch, so
delete it.  CFLAGS contains -g by default anyway

problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com)
ok millert@ kettenis@ deraadt@

Upstream-ID: 96c5054e3e1f170c6276902d5bc65bb3b87a2603

9 years agoupstream commit
dtucker@openbsd.org [Thu, 30 Jun 2016 05:17:05 +0000 (05:17 +0000)] 
upstream commit

Explicitly check for 100% completion to avoid potential
floating point rounding error, which could cause progressmeter to report 99%
on completion. While there invert the test so the 100% case is clearer.  with
& ok djm@

Upstream-ID: a166870c5878e422f3c71ff802e2ccd7032f715d

9 years agoupstream commit
jmc@openbsd.org [Wed, 29 Jun 2016 17:14:28 +0000 (17:14 +0000)] 
upstream commit

sort the -o list;

Upstream-ID: 1a97465ede8790b4d47cb618269978e07f41f8ac

9 years agoupstream commit
djm@openbsd.org [Thu, 23 Jun 2016 05:17:51 +0000 (05:17 +0000)] 
upstream commit

fix AuthenticationMethods during configuration re-parse;
reported by Juan Francisco Cantero Hurtado

Upstream-ID: 8ffa1dac25c7577eca8238e825317ab20848f9b4

9 years agoupstream commit
djm@openbsd.org [Sun, 19 Jun 2016 07:48:02 +0000 (07:48 +0000)] 
upstream commit

revert 1.34; causes problems loading public keys

reported by semarie@

Upstream-ID: b393794f8935c8b15d98a407fe7721c62d2ed179

9 years agoupstream commit
jmc@openbsd.org [Fri, 17 Jun 2016 06:33:30 +0000 (06:33 +0000)] 
upstream commit

grammar fix;

Upstream-ID: 5d5b21c80f1e81db367333ce0bb3e5874fb3e463

9 years agoupstream commit
djm@openbsd.org [Fri, 17 Jun 2016 05:06:23 +0000 (05:06 +0000)] 
upstream commit

translate OpenSSL error codes to something more
meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@

Upstream-ID: 4cb0795a366381724314e6515d57790c5930ffe5

9 years agoupstream commit
djm@openbsd.org [Fri, 17 Jun 2016 05:03:40 +0000 (05:03 +0000)] 
upstream commit

ban AuthenticationMethods="" and accept
AuthenticationMethods=any for the default behaviour of not requiring multiple
authentication

bz#2398 from Jakub Jelen; ok dtucker@

Upstream-ID: fabd7f44d59e4518d241d0d01e226435cc23cf27

9 years agoupstream commit
dtucker@openbsd.org [Thu, 16 Jun 2016 11:00:17 +0000 (11:00 +0000)] 
upstream commit

Include stdarg.h for va_copy as per man page.

Upstream-ID: 105d6b2f1af2fbd9d91c893c436ab121434470bd

9 years agoupstream commit
jmc@openbsd.org [Thu, 16 Jun 2016 06:10:45 +0000 (06:10 +0000)] 
upstream commit

keys stored in openssh format can have comments too; diff
from yonas yanfa, tweaked a bit;

ok djm

Upstream-ID: 03d48536da6e51510d73ade6fcd44ace731ceb27

9 years agoget_remote_name_or_ip inside LOGIN_NEEDS_UTMPX
Darren Tucker [Mon, 20 Jun 2016 05:55:34 +0000 (15:55 +1000)] 
get_remote_name_or_ip inside LOGIN_NEEDS_UTMPX

Apply the same get_remote_name_or_ip -> session_get_remote_name_or_ip
change as commit 95767262 to the code inside #ifdef LOGIN_NEEDS_UTMPX.
Fixes build on AIX.

9 years agoRemove duplicate code from PAM. ok djm@
Darren Tucker [Fri, 17 Jun 2016 04:34:09 +0000 (14:34 +1000)] 
Remove duplicate code from PAM.  ok djm@

9 years agoupstream commit
dtucker@openbsd.org [Wed, 15 Jun 2016 00:40:40 +0000 (00:40 +0000)] 
upstream commit

Remove "POSSIBLE BREAK-IN ATTEMPT!" from log message
about forward and reverse DNS not matching.  We haven't supported IP-based
auth methods for a very long time so it's now misleading.  part of bz#2585,
ok markus@

Upstream-ID: 5565ef0ee0599b27f0bd1d3bb1f8a323d8274e29

9 years agoMove platform_disable_tracing into its own file.
Darren Tucker [Wed, 15 Jun 2016 01:22:38 +0000 (11:22 +1000)] 
Move platform_disable_tracing into its own file.

Prevents link errors resolving the extern "options" when platform.o
gets linked into ssh-agent when building --with-pam.

9 years agoTrack skipped upstream commit IDs.
Darren Tucker [Tue, 14 Jun 2016 03:55:12 +0000 (13:55 +1000)] 
Track skipped upstream commit IDs.

There are a small number of "upstream" commits that do not correspond to
a file in -portable.  This file tracks those so that we can reconcile
OpenBSD and Portable to ensure that no commits are accidentally missed.

If you add something to .skipped-commit-ids please also add an upstream
ID line in the following format when you commit it.

    Upstream-ID: 321065a95a7ccebdd5fd08482a1e19afbf524e35
    Upstream-ID: d4f699a421504df35254cf1c6f1a7c304fb907ca
    Upstream-ID: aafe246655b53b52bc32c8a24002bc262f4230f7
    Upstream-ID: 8fa9cd1dee3c3339ae329cf20fb591db6d605120
    Upstream-ID: f31327a48dd4103333cc53315ec53fe65ed8a17a
    Upstream-ID: edbfde98c40007b7752a4ac106095e060c25c1ef
    Upstream-ID: 052fd565e3ff2d8cec3bc957d1788f50c827f8e2
    Upstream-ID: 7cf73737f357492776223da1c09179fa6ba74660
    Upstream-ID: 180d84674be1344e45a63990d60349988187c1ae
    Upstream-ID: f6ae971186ba68d066cd102e57d5b0b2c211a5ee

9 years agoRemove now-defunct .cvsignore files. ok djm
Darren Tucker [Tue, 14 Jun 2016 03:51:01 +0000 (13:51 +1000)] 
Remove now-defunct .cvsignore files. ok djm

9 years agoupstream commit
dtucker@openbsd.org [Wed, 8 Jun 2016 02:13:01 +0000 (02:13 +0000)] 
upstream commit

Back out rev 1.28 "Check min and max sizes sent by the
client" change. It caused "key_verify failed for server_host_key" in clients
that send a DH-GEX min value less that DH_GRP_MIN, eg old OpenSSH and PuTTY.
ok djm@

Upstream-ID: 452979d3ca5c1e9dff063287ea0a5314dd091f65

9 years agoUse Solaris setpflags(__PROC_PROTECT, ...).
Darren Tucker [Tue, 14 Jun 2016 00:48:27 +0000 (10:48 +1000)] 
Use Solaris setpflags(__PROC_PROTECT, ...).

Where possible, use Solaris setpflags to disable process tracing on
ssh-agent and sftp-server.  bz#2584, based on a patch from huieying.lee
at oracle.com, ok djm.