Commit Graph

9882 Commits

Author SHA1 Message Date
djm@openbsd.org 105e1c9218 upstream: avoid compiling certain files that deeply depend on
libcrypto when WITH_OPENSSL isn't set

OpenBSD-Commit-ID: 569f08445c27124ec7c7f6c0268d844ec56ac061
2019-09-06 17:54:21 +10:00
djm@openbsd.org 670104b923 upstream: fixes for !WITH_OPENSSL compilation; ok dtucker@
OpenBSD-Commit-ID: 7fd68eaa9e0f7482b5d4c7e8d740aed4770a839f
2019-09-06 17:54:21 +10:00
djm@openbsd.org be02d7cbde upstream: lots of things were relying on libcrypto headers to
transitively include various system headers (mostly stdlib.h); include them
explicitly

OpenBSD-Commit-ID: 5b522f4f2d844f78bf1cc4f3f4cc392e177b2080
2019-09-06 17:54:21 +10:00
djm@openbsd.org d05aaaaadc upstream: remove leakmalloc reference; we used this early when
refactoring but not since

OpenBSD-Commit-ID: bb28ebda8f7c490b87b37954044a6cdd43a7eb2c
2019-09-06 16:06:22 +10:00
dtucker@openbsd.org 1268f0bcd8 upstream: Check for RSA support before using it for the user key,
otherwise use ed25519 which is supported when built without OpenSSL.

OpenBSD-Regress-ID: 3d23ddfe83c5062f00ac845d463f19a2ec78c0f7
2019-09-06 14:37:23 +10:00
Darren Tucker fd7a2dec65 Provide explicit path to configure-check.
On some platforms (at least OpenBSD) make won't search VPATH for target
files, so building out-of-tree will fail at configure-check.  Provide
explicit path.  ok djm@
2019-09-06 14:09:41 +10:00
djm@openbsd.org 00865c2969 upstream: better error code for bad arguments; inspired by
OpenBSD-Commit-ID: dfc263b6041de7f0ed921a1de0b81ddebfab1e0a
2019-09-06 12:01:45 +10:00
Damien Miller afdf27f5ac revert config.h/config.h.in freshness checks
turns out autoreconf and configure don't touch some files if their content
doesn't change, so the mtime can't be relied upon in a makefile rule
2019-09-05 21:38:40 +10:00
Damien Miller a97609e850 extend autoconf freshness test
make it cover config.h.in and config.h separately
2019-09-05 20:54:39 +10:00
Damien Miller 182297c10e check that configure/config.h is up to date
Ensure they are newer than the configure.ac / aclocal.m4 source
2019-09-05 20:35:33 +10:00
djm@openbsd.org 7d6034bd02 upstream: if a PKCS#11 token returns no keys then try to login and
refetch them. Based on patch from Jakub Jelen; bz#2430 ok markus@

OpenBSD-Commit-ID: ab53bd6ddd54dd09e54a8bfbed1a984496f08b43
2019-09-05 20:07:12 +10:00
djm@openbsd.org 76f09bd959 upstream: sprinkle in some explicit errors here, otherwise the
percolate all the way up to dispatch_run_fatal() and lose all meaninful
context

to help with bz#3063; ok dtucker@

OpenBSD-Commit-ID: 5b2da83bb1c4a3471444b7910b2120ae36438a0a
2019-09-05 20:07:12 +10:00
djm@openbsd.org 0ea332497b upstream: only send ext_info for KEX_INITIAL; bz#2929 ok dtucker
OpenBSD-Commit-ID: 00f5c6062f6863769f5447c6346f78c05d2e4a63
2019-09-05 20:07:12 +10:00
jmc@openbsd.org f23d91f9fa upstream: macro fix; ok djm
OpenBSD-Commit-ID: e891dd6c7996114cb32f0924cb7898ab55efde6e
2019-09-05 20:07:12 +10:00
Damien Miller 8b57337c1c update fuzzing makefile to more recent clang 2019-09-05 15:46:39 +10:00
Damien Miller ae631ad77d fuzzer for sshsig allowed_signers option parsing 2019-09-05 15:46:11 +10:00
djm@openbsd.org 69159afe24 upstream: memleak on error path; found by libfuzzer
OpenBSD-Commit-ID: 34d44cb0fb5bdb5fcbc6b02b804e71b20a7a5fc7
2019-09-05 15:44:19 +10:00
djm@openbsd.org bab6feb01f upstream: expose allowed_signers options parsing code in header for
fuzzing

rename to make more consistent with philosophically-similar auth
options parsing API.

OpenBSD-Commit-ID: 0c67600ef04187f98e2912ca57b60c22a8025b7c
2019-09-05 14:56:51 +10:00
naddy@openbsd.org 4f9d75fbaf upstream: Call comma-separated lists as such to clarify semantics.
Options such as Ciphers take values that may be a list of ciphers; the
complete list, not indiviual elements, may be prefixed with a dash or plus
character to remove from or append to the default list, respectively.

Users might read the current text as if each elment took an optional prefix,
so tweak the wording from "values" to "list" to prevent such ambiguity for
all options supporting these semantics.

Fix instances missed in first commit.  ok jmc@ kn@

OpenBSD-Commit-ID: 7112522430a54fb9f15a7a26d26190ed84d5e417
2019-09-05 14:56:51 +10:00
jmc@openbsd.org db1e6f60f0 upstream: tweak previous;
OpenBSD-Commit-ID: 0abd728aef6b5b35f6db43176aa83b7e3bf3ce27
2019-09-05 14:56:51 +10:00
naddy@openbsd.org 0f44e5956c upstream: repair typo and editing mishap
OpenBSD-Commit-ID: d125ab720ca71ccf9baf83e08ddc8c12a328597e
2019-09-05 14:56:51 +10:00
Damien Miller f4846dfc6a Fuzzer harness for sshsig 2019-09-05 14:26:39 +10:00
Damien Miller b08a6bc1cc oops; missed including the actual file 2019-09-03 18:45:42 +10:00
Damien Miller 1a72c0dd89 portability fixes for sshsig 2019-09-03 18:44:10 +10:00
djm@openbsd.org 6d6427d013 upstream: regress test for sshsig; feedback and ok markus@
OpenBSD-Regress-ID: 74c0974f2cdae8d9599b9d76a09680bae55d8a8b
2019-09-03 18:42:22 +10:00
djm@openbsd.org 59650f0eaf upstream: only add plain keys to prevent any certs laying around
from confusing the test.

OpenBSD-Regress-ID: b8f1508f822bc560b98dea910e61ecd76f34100f
2019-09-03 18:42:14 +10:00
djm@openbsd.org d637c4aee6 upstream: sshsig tweaks and improvements from and suggested by
Markus

ok markus/me

OpenBSD-Commit-ID: ea4f46ad5a16b27af96e08c4877423918c4253e9
2019-09-03 18:40:24 +10:00
djm@openbsd.org 2a9c9f7272 upstream: sshsig: lightweight signature and verification ability
for OpenSSH

This adds a simple manual signature scheme to OpenSSH.
Signatures can be made and verified using ssh-keygen -Y sign|verify

Signatures embed the key used to make them. At verification time, this
is matched via principal name against an authorized_keys-like list
of allowed signers.

Mostly by Sebastian Kinne w/ some tweaks by me

ok markus@

OpenBSD-Commit-ID: 2ab568e7114c933346616392579d72be65a4b8fb
2019-09-03 18:40:23 +10:00
djm@openbsd.org 5485f8d50a upstream: move authorized_keys option parsing helpsers to misc.c
and make them public; ok markus@

OpenBSD-Commit-ID: c18bcb2a687227b3478377c981c2d56af2638ea2
2019-09-03 18:39:31 +10:00
djm@openbsd.org f8df0413f0 upstream: make get_sigtype public as sshkey_get_sigtype(); ok
markus@

OpenBSD-Commit-ID: 01f8cdbec63350490d2249f41112c5780d1cfbb8
2019-09-03 18:39:31 +10:00
djm@openbsd.org dd8002fbe6 upstream: move advance_past_options to authfile.c and make it
public; ok markus@

OpenBSD-Commit-ID: edda2fbba2c5b1f48e60f857a2010479e80c5f3c
2019-09-03 18:39:31 +10:00
djm@openbsd.org c72d78ccbe upstream: move skip_space() to misc.c and make it public; ok
markus@

OpenBSD-Commit-ID: caa77e8a3b210948e29ad3e28c5db00852961eae
2019-09-03 18:39:31 +10:00
djm@openbsd.org 06af3583f4 upstream: authfd: add function to check if key is in agent
This commit adds a helper function which allows the caller to
check if a given public key is present in ssh-agent.

work by Sebastian Kinne; ok markus@

OpenBSD-Commit-ID: d43c5826353e1fdc1af71eb42961b30782c7bd13
2019-09-03 18:39:31 +10:00
djm@openbsd.org 2ab5a84648 upstream: fix memleak in ssh_free_identitylist(); ok markus@
OpenBSD-Commit-ID: aa51f77ae2c5330a1f61b2d22933f24a443f9abf
2019-09-03 18:39:31 +10:00
djm@openbsd.org 85443f165b upstream: factor out confirm_overwrite(); ok markus@
OpenBSD-Commit-ID: 304e95381b39c774c8fced7e5328b106a3ff0400
2019-09-03 18:39:31 +10:00
djm@openbsd.org 9a396e3368 upstream: constify an argument
OpenBSD-Commit-ID: 724bafc9f993746ad4303e95bede2c030de6233b
2019-09-03 18:39:31 +10:00
djm@openbsd.org b52c0c2e64 upstream: downgrade PKCS#11 "provider returned no slots" warning
from log level error to debug. This is common when attempting to enumerate
keys on smartcard readers with no cards plugged in. bz#3058 ok dtucker@

OpenBSD-Commit-ID: bb8839ddeb77c271390488af1b771041d43e49c6
2019-09-02 10:32:43 +10:00
djm@openbsd.org 0713322e18 upstream: print comment when printing pubkey from private
bz#3052; ok dtucker

OpenBSD-Commit-ID: a91b2a8d5f1053d34d7fce44523c53fb534ba914
2019-09-02 10:32:42 +10:00
Damien Miller 368f1cc2fb fixed test in OSX closefrom() replacement
from likan_999.student AT sina.com
2019-09-02 10:28:42 +10:00
Damien Miller 6b7c53498d retain Solaris PRIV_FILE_LINK_ANY in sftp-server
Dropping this privilege removes the ability to create hard links to
files owned by other users. This is required for the legacy sftp rename
operation.

bz#3036; approach ok Alex Wilson (the original author of the Solaris
sandbox/pledge replacement code)
2019-09-02 10:22:02 +10:00
dtucker@openbsd.org e50f808712 upstream: Use ed25519 for most hostkey rotation tests since it's
supported even when built without OpenSSL.  Use RSA for the secondary type
test if supported, otherwise skip it.  Fixes this test for !OpenSSL builds.

OpenBSD-Regress-ID: 101cb34a84fd974c623bdb2e496f25a6e91be109
2019-08-30 15:56:42 +10:00
bluhm@openbsd.org 5e4796c47d upstream: Test did not compile due to missing symbols. Add source
sshbuf-misc.c to regress as it was done in ssh make file. from Moritz Buhl

OpenBSD-Regress-ID: 9e1c23476bb845f3cf3d15d9032da3ed0cb2fcf5
2019-08-30 15:56:42 +10:00
Damien Miller e0e7e3d0e2 tweak warning flags
Enable -Wextra if compiler supports it

Set -Wno-error=format-truncation if available to prevent expected
string truncations in openbsd-compat from breaking -Werror builds
2019-08-30 14:26:19 +10:00
Damien Miller 28744182cf proc_pidinfo()-based closefrom() for OS X
Refactor closefrom() to use a single brute-force close() loop fallback.

Based on patch from likan_999.student@sina.com in bz#3049. ok dtucker@
2019-08-30 13:23:04 +10:00
kn@openbsd.org dc2ca58814 upstream: Call comma-separated lists as such to clarify semantics
Options such as Ciphers take values that may be a list of ciphers;  the
complete list, not indiviual elements, may be prefixed with a dash or plus
character to remove from or append to the default list respectively.

Users might read the current text as if each elment took an optional prefix,
so tweak the wording from "values" to "list" to prevent such ambiguity for
all options supporting this semantics (those that provide a list of
available elements via "ssh -Q ...").

Input and OK jmc

OpenBSD-Commit-ID: 4fdd175b0e5f5cb10ab3f26ccc38a93bb6515d57
2019-08-29 19:21:42 +10:00
djm@openbsd.org c4736f39e6 upstream: include sshbuf-misc.c in SRCS_BASE
OpenBSD-Commit-ID: 99dd10e72c04e93849981d43d64c946619efa474
2019-08-29 19:21:42 +10:00
Darren Tucker d0e51810f3 Fix pasto in fallback code.
There is no parameter called "pathname", it should simply be "path".
bz#3059, patch from samuel at cendio.se.
2019-08-24 15:12:11 +10:00
Damien Miller e83c989bfd use SC_ALLOW_ARG_MASK to limit mmap protections
Restrict to PROT_(READ|WRITE|NONE), i.e. exclude PROT_EXEC
2019-08-23 10:19:30 +10:00
Damien Miller f6906f9bf1 allow mprotect(2) with PROT_(READ|WRITE|NONE) only
Used by some hardened heap allocators. Requested by Yegor
Timoshenko in https://github.com/openssh/openssh-portable/pull/142
2019-08-23 10:10:03 +10:00
djm@openbsd.org e3b6c966b7 upstream: switch percent_expand() to use sshbuf instead of a limited
fixed buffer; ok markus@

OpenBSD-Commit-ID: 3f9ef20bca5ef5058b48c1cac67c53b9a1d15711
2019-08-16 16:14:30 +10:00