Commit Graph

10778 Commits

Author SHA1 Message Date
dtucker@openbsd.org 2bcbf679de upstream: Ignore comments at the end of config lines in ssh_config,
similar to what we already do for sshd_config.  bz#2320, with & ok djm@

OpenBSD-Commit-ID: bdbf9fc5bc72b1a14266f5f61723ed57307a6db4
2020-12-04 13:42:38 +11:00
dtucker@openbsd.org b755264e7d upstream: Include cipher.h for declaration of cipher_by_name.
OpenBSD-Commit-ID: ddfebbca03ca0e14e00bbad9d35f94b99655d032
2020-11-29 00:20:52 +11:00
djm@openbsd.org 022def7bd1 upstream: check result of strchr() against NULL rather than
searched-for characters; from zhongjubin@huawei.com

OpenBSD-Commit-ID: e6f57de1d4a4d25f8db2d44e8d58d847e247a4fe
2020-11-28 23:59:42 +11:00
dtucker@openbsd.org 57bf03f021 upstream: Document ssh-keygen -Z, sanity check its argument earlier and
provide a better error message if it's not correct.  Prompted by bz#2879, ok
djm@ jmc@

OpenBSD-Commit-ID: 484178a173e92230fb1803fb4f206d61f7b58005
2020-11-27 21:37:17 +11:00
djm@openbsd.org 33313ebc1c upstream: Set the specified TOS/DSCP for interactive use prior to
TCP connect. The connection phase of the SSH session is time-sensitive (due
to server side login grace periods) and is frequently interactive (e.g.
entering passwords). The ultimate interactive/bulk TOS/DSCP will be set after
authentication completes.

ok dtucker@

OpenBSD-Commit-ID: f31ab10d9233363a6d2c9996007083ba43a093f1
2020-11-27 13:21:16 +11:00
djm@openbsd.org b2bcec13f1 upstream: clean up passing of struct passwd from monitor to preauth
privsep process. No longer copy entire struct w/ pointer addresses, but pass
remaining scalar fields explicitly,

Prompted by Yuichiro NAITO, feedback Thorsten Glaser; ok dtucker@

OpenBSD-Commit-ID: 9925df75a56732c43f3663e70dd15ff413ab3e53
2020-11-27 13:16:32 +11:00
djm@openbsd.org 19af04e223 upstream: when loading PKCS#11 keys, include the key fingerprints
and provider/slot information in debug output.

OpenBSD-Commit-ID: 969a089575d0166a9a364a9901bb6a8d9b8a1431
2020-11-27 11:50:30 +11:00
djm@openbsd.org 9b9465ea85 upstream: when mentioning that the host key has changed, don't
report the type because it is ambiguous as to whether it referred to the
known or new host key. bz3216; ok dtucker@

OpenBSD-Commit-ID: 2d5ce4a83dbcf44e340a572e361decad8aab7bad
2020-11-27 11:50:30 +11:00
Darren Tucker 637017a7dd Use "=" not "==" in string test.
POSIX says "=" is string comparison and some shells (eg HP-UX) will
complain about "==".
2020-11-25 17:38:46 +11:00
Darren Tucker 9880f3480f Restore correct flags during localtime_r check.
We were restoring the wrong thing CPPFLAGS (we used CFLAGS) for any
platform that doesn't have localtime_r.
2020-11-20 17:27:46 +11:00
dtucker@openbsd.org 41935882f4 upstream: When doing an sftp recursive upload or download of a
read-only directory, ensure that the directory is created with write and
execute permissions in the interim so that we can actually complete the
transfer, then set the directory permission as the final step.  (The execute
bit is only likely to be an issue with a non-POSIX server).  bz#3222, ok djm@

OpenBSD-Commit-ID: a82606212f2796e31f0e1af94a63355a7ad5d903
2020-11-20 16:58:18 +11:00
Darren Tucker 0f90440ca7 Add new pselect6_time64 syscall on ARM.
This is apparently needed on armhfp/armv7hl.  bz#3232, patch from
jjelen at redhat.com.
2020-11-20 13:37:54 +11:00
dtucker@openbsd.org 3a7c46c72b upstream: Explicitly initialize all members of the
find_by_key_ctx struct.  Initializing a single member should be enough
(the spec says the remainder should be initialized as per the static
rules) but some GCCs warn on this which prevents us testing with -Werror
on those.  ok deraadt@ djm@

OpenBSD-Commit-ID: 687126e60a27d30f02614760ef3c3ae4e8d6af28
2020-11-20 13:34:52 +11:00
dtucker@openbsd.org 076cb616b8 upstream: draft-ietf-secsh-architecture is now RFC4251.
OpenBSD-Commit-ID: cb0bb58c2711fb5ed519507659be1dcf179ed403
2020-11-20 13:34:46 +11:00
dtucker@openbsd.org 85cceda21f upstream: Specify that the KDF function is bcrypt. Based on github
PR#214 from rafork, ok markus@, mdoc correction jmc@

OpenBSD-Commit-ID: d8f2853e7edbcd483f31b50da77ab80ffa18b4ef
2020-11-17 22:34:57 +11:00
djm@openbsd.org 5b9720f9ad upstream: revert r1.341; it breaks ProxyJump; reported by sthen@
OpenBSD-Commit-ID: 6ac2f945b26cb86d936eed338f77861d6da8356a
2020-11-16 09:36:05 +11:00
djm@openbsd.org 04088725ec upstream: scrub keyboard-interactive authentication prompts coming
from the server through asmprintf() prior to display; suggested by and ok
dtucker@

OpenBSD-Commit-ID: 31fe93367645c37fbfe4691596bf6cf1e3972a58
2020-11-13 18:32:24 +11:00
djm@openbsd.org 5442b491d0 upstream: prefix keyboard interactive prompts with (user@host) to
make it easier to determine which connection they are associated with in
cases like scp -3, ProxyJump, etc. bz#3224 ok dtucker

OpenBSD-Commit-ID: 67e6189b04b46c867662f8a6759cf3ecb5f59170
2020-11-13 18:32:24 +11:00
Darren Tucker 2992e4e701 Remove use of TIME_WITH_SYS_TIME.
It was only set by the recently removed AC_HEADER_TIME macro, replace
with simple inclusions of both sys/time.h and time.h.  Should prevent
mis-detection of struct timespec.
2020-11-13 17:56:11 +11:00
Damien Miller e3f27006f1 Revert "detect Linux/X32 systems"
This reverts commit 5b56bd0aff.

The approach used was incorrect; discussion in bz#3085
2020-11-13 14:20:43 +11:00
Damien Miller e51dc7fab6 SELinux has deprecated security_context_t
(it was only ever a char* anyway)
2020-11-13 13:46:28 +11:00
Darren Tucker b79add37d1 Remove obsolete AC_HEADER_TIME macro.
AC_HEADER_TIME is marked as obsolete in autoconf-2.70 and as far as I
can tell everything we have that might be old enough to need it doesn't.
2020-11-13 13:43:30 +11:00
djm@openbsd.org d5d05cdb3d upstream: when prompting the user to accept a new hostkey, display
any other host names/addresses already associated with the key. E.g.

> The authenticity of host 'test (10.0.0.1)' can't be established.
> ECDSA key fingerprint is SHA256:milU4MODXm8iJQI18wlsbPG7Yup+34fuNNmV08qDnax.
> This host key is known by the following other names/addresses:
>     ~/.ssh/known_hosts:1: host.example.org,10.0.0.1
>     ~/.ssh/known_hosts:2: [hashed name]
>     ~/.ssh/known_hosts:3: [hashed name]
>     ~/.ssh/known_hosts:4: host
>     ~/.ssh/known_hosts:5: [host]:2222
> Are you sure you want to continue connecting (yes/no/[fingerprint])?

feedback and ok markus@

OpenBSD-Commit-ID: f6f58a77b49f1368b5883b3a1f776447cfcc7ef4
2020-11-13 09:58:55 +11:00
dtucker@openbsd.org 819b44e8b9 upstream: Prevent integer overflow when ridiculously large
ConnectTimeout is specified, capping the effective value (for most platforms)
at 24 days. bz#3229, ok djm@

OpenBSD-Commit-ID: 62d4c4b7b87d111045f8e9f28b5b532d17ac5bc0
2020-11-13 09:58:55 +11:00
djm@openbsd.org add926dd1b upstream: fix logic error that broke URI parsing in ProxyJump
directives; ok dtucker@

OpenBSD-Commit-ID: 96d48839b1704882a0e9a77898f5e14b2d222705
2020-11-12 10:53:03 +11:00
claudio@openbsd.org 4340dd4392 upstream: Free the previously allocated msg buffer after writing it
out. OK djm@

OpenBSD-Commit-ID: 18c055870fc75e4cb9f926c86c7543e2e21d7fa4
2020-11-12 10:53:03 +11:00
Darren Tucker fcf429a4c6 Prevent excessively long username going to PAM.
This is a mitigation for a buffer overflow in Solaris' PAM username
handling (CVE-2020-14871), and is only enabled for Sun-derived PAM
implementations.  This is not a problem in sshd itself, it only
prevents sshd from being used as a vector to attack Solaris' PAM.
It does not prevent the bug in PAM from being exploited via some other
PAM application.

Based on github PR#212 from Mike Scott but implemented slightly
differently.  ok tim@ djm@
2020-11-11 14:05:30 +11:00
djm@openbsd.org 10dce8ff68 upstream: unbreak; missing NULL check
OpenBSD-Commit-ID: 6613dfab488123f454d348ef496824476b8c11c0
2020-11-09 10:20:13 +11:00
djm@openbsd.org d5a0cd4fc4 upstream: when requesting a security key touch on stderr, inform the
user once the touch has been recorded; requested by claudio@ ok markus@

OpenBSD-Commit-ID: 3b76ee444490e546b9ea7f879e4092ee0d256233
2020-11-09 09:39:22 +11:00
Darren Tucker 292bcb2479 Remove preprocessor directive from log macro calls.
Preprocessor directives inside macro calls, such as the new log macros,
are undefined behaviour and do not work with, eg old GCCs.  Put the
entire log call inside the ifdef for OPENSSL_HAS_NISTP521.
2020-11-09 00:33:35 +11:00
dtucker@openbsd.org 71693251b7 upstream: Add a comment documenting the source of the moduli group
sizes.

OpenBSD-Commit-ID: aec0725ce607630caaa62682624c6763b350391c
2020-11-09 00:02:27 +11:00
dtucker@openbsd.org 4d94b031ff upstream: Replace WITH_OPENSSL ifdefs in log calls with a macro.
The log calls are themselves now macros, and preprocessor directives inside
macro arguments are undefined behaviour which some compilers (eg old GCCs)
choke on.  It also makes the code tidier.  ok deraadt@

OpenBSD-Commit-ID: cc12a9029833d222043aecd252d654965c351a69
2020-11-09 00:02:27 +11:00
Darren Tucker 6d2564b94e Fix function body for variadic macro test.
AC_LANG_PROGRAM puts its second argument inside main() so we don't need
to do it ourselves.
2020-11-06 17:11:16 +11:00
Darren Tucker 586f9bd2f5 Remove AC_PROC_CC_C99 obsoleted in autoconf 2.70.
Since we only use it to make sure we can handle variadic macros,
explicitly check only for that.  with & ok djm@
2020-11-06 16:53:24 +11:00
Darren Tucker a019e353df Replace AC_TRY_COMPILE obsoleted in autoconf 2.70.
Replace with the equivalent AC_COMPILE_IFELSE.
2020-11-06 13:56:41 +11:00
Darren Tucker 771b7795c0 Move AC_PROG_CC_C99 to immediately afer AC_PROG_CC.
This puts the related C version selection output in the same place.
2020-11-06 13:55:33 +11:00
Darren Tucker e5591161f2 AC_CHECK_HEADER() is obsoleted in autoconf 2.70.
Replace with the non-obsoleted AC_CHECK_HEADERS().
2020-11-06 13:54:17 +11:00
djm@openbsd.org 05bcd0cadf upstream: fold consecutive '*' wildcards to mitigate combinatorial
explosion of recursive searches; ok dtucker

OpenBSD-Commit-ID: d18bcb39c40fb8a1ab61153db987e7d11dd3792b
2020-11-04 10:09:25 +11:00
djm@openbsd.org 7d680448db upstream: print reason in fatal error message when
kex_assemble_namelist() fails

OpenBSD-Commit-ID: a9975ee8db6c98d6f32233d88051b2077ca63dab
2020-11-04 10:09:25 +11:00
djm@openbsd.org 95d1109fec upstream: fix sshd_config SetEnv directive inside Match blocks; part of
github PR#201 from github user manuelm

OpenBSD-Commit-ID: 9772e3748abff3ad65ae8fc43d026ed569b1d2bc
2020-10-29 14:15:35 +11:00
djm@openbsd.org b12b835dc0 upstream: fix type of nid in type_bits_valid(); github PR#202 from
github user thingsconnected

OpenBSD-Commit-ID: 769d2b040dec7ab32d323daf54b854dd5dcb5485
2020-10-29 14:03:03 +11:00
djm@openbsd.org 1a14c13147 upstream: whitespace; no code change
OpenBSD-Commit-ID: efefc1c47e880887bdee8cd2127ca93177eaad79
2020-10-29 13:54:13 +11:00
djm@openbsd.org 815209abfd upstream: UpdateHostkeys: fixed/better detection of host keys that
exist under other names and addresses; spotted by and debugged with lots of
help from jca@

OpenBSD-Commit-ID: 5113d7f550bbd48243db1705afbf16b63792d4b7
2020-10-29 13:53:59 +11:00
Duncan Eastoe a575cf44e5 session.c: use "denylist" terminology
Follow upstream (6d755706a0) language
improvements in this portable-specific code.
2020-10-29 13:45:10 +11:00
Damien Miller 33267feaff Remove checks for strict POSIX mkdtemp()
We needed a mkdtemp() that accepted template paths that did not
end in XXXXXX a long time ago for KRB4, but that code is long
deprecated. We no longer need to replace mkdtemp() for strictly
following POSIX. ok dtucker@
2020-10-27 16:50:38 +11:00
dtucker@openbsd.org 492d70e18b upstream: Minor man page fixes (capitalization, commas) identified by
the manpage-l10n project via bz#3223.  feedback deraadt@, ok jmc@

OpenBSD-Commit-ID: ab83af0daf18369244a72daaec6c4a58a9eb7e2c
2020-10-26 12:15:52 +11:00
dtucker@openbsd.org eab2888cfc upstream: Adapt XMSS to new logging infrastructure. With markus@, ok
djm@.

OpenBSD-Commit-ID: 9c35ec3aa0f710e4e3325187ceff4fa3791686de
2020-10-20 10:15:02 +11:00
djm@openbsd.org f7bd11e494 upstream: fix SEGV on fatal() errors spotted by dtucker@
OpenBSD-Commit-ID: 75f155a1ac61e364ed00dc379e2c42df81067ce2
2020-10-19 19:09:08 +11:00
Darren Tucker 7715a3b171 Use fatal_fr not fatal_r when passing r.
Caught by the PAM -Werror tinderbox build.
2020-10-19 10:54:41 +11:00
djm@openbsd.org 816036f142 upstream: use the new variant log macros instead of prepending
__func__ and appending ssh_err(r) manually; ok markus@

OpenBSD-Commit-ID: 1f14b80bcfa85414b2a1a6ff714fb5362687ace8
2020-10-18 23:46:29 +11:00