Commit Graph

11921 Commits

Author SHA1 Message Date
djm@openbsd.org
455cee8d6c upstream: make it clear that RekeyLimit applies to both transmitted
and received data. GHPR#328 from Jan Pazdziora

OpenBSD-Commit-ID: d180a905fec9ff418a75c07bb96ea41c9308c3f9
2022-06-24 14:28:29 +10:00
tobhe@openbsd.org
17904f0580 upstream: Make sure not to fclose() the same fd twice in case of an
error.

ok dtucker@

OpenBSD-Commit-ID: e384c4e05d5521e7866b3d53ca59acd2a86eef99
2022-06-24 14:28:29 +10:00
dtucker@openbsd.org
f29d6cf98c upstream: Don't attempt to fprintf a null identity comment. From
Martin Vahlensieck via tech@.

OpenBSD-Commit-ID: 4c54d20a8e8e4e9912c38a7b4ef5bfc5ca2e05c2
2022-06-24 14:28:29 +10:00
dtucker@openbsd.org
ad1762173b upstream: Log an error if pipe() fails while accepting a
connection.  bz#3447, from vincent-openssh at vinc17 net, ok djm@

OpenBSD-Commit-ID: 9d59f19872b94900a5c79da2d57850241ac5df94
2022-06-24 14:28:29 +10:00
Damien Miller
9c59e7486c automatically enable built-in FIDO support
If libfido2 is found and usable, then enable the built-in
security key support unless --without-security-key-builtin
was requested.

ok dtucker@
2022-06-24 14:20:43 +10:00
Damien Miller
7d25b37fb2 fix possible NULL deref when built without FIDO
Analysis/fix from kircher in bz3443; ok dtucker@
2022-06-24 13:46:39 +10:00
djm@openbsd.org
f5ba85dadd upstream: make sure that UseDNS hostname lookup happens in the monitor
and not in the pledge(2)'d unprivileged process; fixes regression caused by
recent refactoring spotted by henning@

OpenBSD-Commit-ID: a089870b95101cd8881a2dff65b2f1627d13e88d
2022-06-16 02:12:11 +10:00
djm@openbsd.org
acb2059feb upstream: move auth_openprincipals() and auth_openkeyfile() over to
auth2-pubkeyfile.c too; they make more sense there.

OpenBSD-Commit-ID: 9970d99f900e1117fdaab13e9e910a621b7c60ee
2022-06-03 14:49:18 +10:00
djm@openbsd.org
3d9b0845f3 upstream: test setenv in both client and server, test first-match-wins
too

OpenBSD-Regress-ID: 4c8804f9db38a02db480b9923317457b377fe34b
2022-06-03 14:34:12 +10:00
djm@openbsd.org
22e1a3a71a upstream: Make SetEnv directives first-match-wins in both
sshd_config and sshd_config; previously if the same name was reused then the
last would win (which is the opposite to how the config is supposed to work).

While there, make the ssh_config parsing more like sshd_config.

bz3438, ok dtucker

OpenBSD-Commit-ID: 797909c1e0262c0d00e09280459d7ab00f18273b
2022-06-03 14:33:18 +10:00
dtucker@openbsd.org
38ed6c57e9 upstream: Add missing *-sk types to ssh-keyscan manpage. From
skazi0 via github PR#294.

OpenBSD-Commit-ID: fda2c869cdb871f3c90a89fb3f985370bb5d25c0
2022-06-03 14:33:18 +10:00
dtucker@openbsd.org
ea97ec98c4 upstream: Add period at end of "not known by any other names"
message.  github PR#320 from jschauma, ok djm@

OpenBSD-Commit-ID: bd60809803c4bfd3ebb7c5c4d918b10e275266f2
2022-06-03 13:38:21 +10:00
dtucker@openbsd.org
88e376fcd6 upstream: ssh-keygen -A: do not generate DSA keys by default.
Based on github PR#303 from jsegitz with man page text from jmc@, ok markus@
djm@

OpenBSD-Commit-ID: 5c4c57bdd7063ff03381cfb6696659dd3f9f5b9f
2022-06-03 13:38:19 +10:00
naddy@openbsd.org
6b3fb62467 upstream: ssh-keygen: implement "verify-required" certificate option.
This was already documented when support for user-verified FIDO
keys was added, but the ssh-keygen(1) code was missing.

ok djm@

OpenBSD-Commit-ID: f660f973391b593fea4b7b25913c9a15c3eb8a06
2022-06-03 13:38:15 +10:00
jmc@openbsd.org
b7f86ffc30 upstream: keywords ref ssh_config.5;
from caspar schutijser

OpenBSD-Commit-ID: f146a19d7d5c9374c3b9c520da43b2732d7d1a4e
2022-06-03 13:38:12 +10:00
Damien Miller
dc7bc52372 fix some bugs in the fuzzer 2022-05-30 09:29:20 +10:00
Darren Tucker
1781f507c1 Test against OpenSSL 1.1.1o and 3.0.3. 2022-05-27 18:19:48 +10:00
Darren Tucker
c53906e0c5 Test against LibreSSL 3.5.3. 2022-05-27 18:18:31 +10:00
Damien Miller
9b3ad432ad fuzzer for authorized_keys parsing
mostly redundant to authopt_fuzz, but it's sensitive code so IMO it
makes sense to test this layer too
2022-05-27 17:00:43 +10:00
djm@openbsd.org
c83d8c4d6f upstream: split the low-level file handling functions out from
auth2-pubkey.c

Put them in a new auth2-pubkeyfile.c to make it easier to refer to them
(e.g. in unit/fuzz tests) without having to refer to everything else
pubkey auth brings in.

ok dtucker@

OpenBSD-Commit-ID: 3fdca2c61ad97dc1b8d4a7346816f83dc4ce2217
2022-05-27 16:38:03 +10:00
djm@openbsd.org
3b0b142d2a upstream: refactor authorized_keys/principals handling
remove "struct ssh *" from arguments - this was only used to pass the
remote host/address. These can be passed in instead and the resulting
code is less tightly coupled to ssh_api.[ch]

ok dtucker@

OpenBSD-Commit-ID: 9d4373d013edc4cc4b5c21a599e1837ac31dda0d
2022-05-27 16:36:06 +10:00
dtucker@openbsd.org
2c334fd36f upstream: f sshpkt functions fail, then password is not cleared
with freezero. Unconditionally call freezero to guarantee that password is
removed from RAM.

From tobias@ and c3h2_ctf via github PR#286, ok djm@

OpenBSD-Commit-ID: 6b093619c9515328e25b0f8093779c52402c89cd
2022-05-27 14:59:17 +10:00
dtucker@openbsd.org
5d3a77f4c5 upstream: Avoid kill with -1 argument. The out_ctx label can be
reached before fork has been called. If this happens, then kill -1 would be
called, sending SIGTERM to all processes reachable by the current process.

From tobias@ and c3h2_ctf via github PR#286, ok djm@

OpenBSD-Commit-ID: 6277af1207d81202f5daffdccfeeaed4c763b1a8
2022-05-27 14:59:17 +10:00
dtucker@openbsd.org
533b31cd08 upstream: Note that ProxyJump also accepts the same tokens as
ProxyCommand. From pallxk via github PR#305.

OpenBSD-Commit-ID: 7115ac351b129205f1f1ffa6bbfd62abd76be7c5
2022-05-27 14:59:17 +10:00
djm@openbsd.org
9d8c80f8a3 upstream: revert previous; it was broken (spotted by Theo)
OpenBSD-Commit-ID: 457c79afaca2f89ec2606405c1059b98b30d8b0d
2022-05-25 16:06:03 +10:00
djm@openbsd.org
9e0d02ef7c upstream: make SSHBUF_DBG/SSHBUF_TELL (off by default and only enabled
via #define) dump to stderr rather than stdout

OpenBSD-Commit-ID: 10298513ee32db8390aecb0397d782d68cb14318
2022-05-25 10:33:16 +10:00
Tim Rice
2487163630 configure.ac: Add missing AC_DEFINE for caph_cache_tzdata test causing
HAVE_CAPH_CACHE_TZDATA to be missing from config.h.in.
Spotted by Bryan Drewery
2022-05-24 10:21:25 -07:00
djm@openbsd.org
bedb93415b upstream: regress test for in-place transfers and clobbering larger
files with smaller ones; would have caught last regression in scp(1)

OpenBSD-Regress-ID: 19de4e88dd3a4f7e5c1618c9be3c32415bd93bc2
2022-05-16 22:59:11 +10:00
anton@openbsd.org
b4f0d719c2 upstream: Only run agent-ptrace.sh if gdb is available as all
architectures do not ship with gdb.

OpenBSD-Regress-ID: ec53e928803e6b87f9ac142d38888ca79a45348d
2022-05-16 22:59:11 +10:00
djm@openbsd.org
9b73345f80 upstream: fix in-place copies; r1.163 incorrectly skipped truncation in
all cases, not just at the start of a transfer. This could cause overwrites
of larger files to leave junk at the end. Spotted by tb@

OpenBSD-Commit-ID: b189f19cd68119548c8e24e39c79f61e115bf92c
2022-05-16 22:56:58 +10:00
djm@openbsd.org
56a0697fe0 upstream: arrange for scp, when in sftp mode, to not ftruncate(3) files
early

previous behavious of unconditionally truncating the destination file
would cause "scp ~/foo localhost:" and "scp localhost:foo ~/" to
delete all the contents of their destination.

spotted by solene@ sthen@, also bz3431; ok dtucker@

OpenBSD-Commit-ID: ca39fdd39e0ec1466b9666f15cbcfddea6aaa179
2022-05-13 17:00:56 +10:00
dtucker@openbsd.org
fbcef70c28 upstream: Remove errant apostrophe. From haruyama at queen-ml org.
OpenBSD-Commit-ID: dc6b294567cb84b384ad6ced9ca469f2bbf0bd10
2022-05-13 13:22:50 +10:00
djm@openbsd.org
0086a286ea upstream: Allow existing -U (use agent) flag to work with "-Y sign"
operations, where it will be interpreted to require that the private keys is
hosted in an agent; bz3429, suggested by Adam Szkoda; ok dtucker@

OpenBSD-Commit-ID: a7bc69873b99c32c42c7628ed9ea91565ba08c2f
2022-05-09 13:11:03 +10:00
djm@openbsd.org
cb010744cc upstream: improve error message when 'ssh-keygen -Y sign' is unable to
load a private key; bz3429, reported by Adam Szkoda ok dtucker@

OpenBSD-Commit-ID: bb57b285e67bea536ef81b1055467be2fc380e74
2022-05-09 13:10:09 +10:00
Tobias Heider
aa61fc82c6 Remove duplicate bcrypt_pbkdf.o from Makefile
bcrypt_pbkdf.o is duplicated in the openbsd-compat Makefile's object
file list.
2022-05-09 10:58:02 +10:00
djm@openbsd.org
deb506d00d upstream: When performing operations that glob(3) a remote path, ensure
that the implicit working directory used to construct that path escapes
glob(3) characters.

This prevents glob characters from being processed in places they
shouldn't, e.g. "cd /tmp/a*/", "get *.txt" should have the get operation
treat the path "/tmp/a*" literally and not attempt to expand it.

Reported by Lusia Kundel; ok markus@

OpenBSD-Commit-ID: 4f647f58482cbad3d58b1eab7f6a1691433deeef
2022-05-09 08:33:59 +10:00
Darren Tucker
f38cf74f20 Also retest OpenBSD upstream on .yml changes. 2022-05-06 14:50:18 +10:00
Darren Tucker
f87a132800 Note that, for now, we need variadic macros. 2022-05-06 14:46:09 +10:00
Darren Tucker
217b518e0f Add ubsan minimal testcase on OpenBSD.
As suggested by djm@.
2022-05-06 14:39:34 +10:00
djm@openbsd.org
457dce2cfe upstream: sshkey_unshield_private() contains a exact duplicate of
the code in private2_check_padding(). Pull private2_check_padding() up so the
code can be reused. From Martin Vahlensieck, ok deraadt@

OpenBSD-Commit-ID: 876884c3f0e62e8fd8d1594bab06900f971c9c85
2022-05-05 11:34:52 +10:00
djm@openbsd.org
0e44db4d9c upstream: channel_new no longer frees remote_name. So update the
comment accordingly.  As remote_name is not modified, it can be const as
well. From Martin Vahlensieck

OpenBSD-Commit-ID: e4e10dc8dc9f40c166ea5a8e991942bedc75a76a
2022-05-05 11:34:52 +10:00
djm@openbsd.org
37b62fd5ca upstream: mux.c: mark argument as const; from Martin Vahlensieck
OpenBSD-Commit-ID: 69a1a93a55986c7c2ad9f733c093b46a47184341
2022-05-05 11:34:52 +10:00
markus@openbsd.org
f4e67c0ad2 upstream: make sure stdout is non-blocking; ok djm@
OpenBSD-Commit-ID: 64940fffbd1b882eda2d7c8c7a43c79368309c0d
2022-05-05 11:34:52 +10:00
florian@openbsd.org
e5c036d209 upstream: Add FIDO AUTHENTICATOR section and explain a bit how FIDO
works. The wording came mostly from the 8.2 OpenSSH release notes, addapted
to fit the man page. Then move the -O bits into the new section as is already
done for CERTIFICATES and MODULI GENERATION. Finally we can explain the
trade-offs of resident keys. While here, consistently refer to the FIDO
thingies as "FIDO authenticators", not "FIDO tokens".

input & OK jmc, naddy

OpenBSD-Commit-ID: dd98748d7644df048f78dcf793b3b63db9ab1d25
2022-05-05 11:34:52 +10:00
jmc@openbsd.org
575771bf79 upstream: remove an obsolete rsa1 format example from an example;
from megan batty
ok djm

OpenBSD-Commit-ID: db2c89879c29bf083df996bd830abfb1e70d62bf
2022-05-05 11:34:52 +10:00
djm@openbsd.org
0bc6b4c8f0 upstream: fix some integer overflows in sieve_large() that show up when
trying to generate modp groups > 16k bits. Reported via GHPR#306 by Bertram
Felgenhauer, but fixed in a different way. feedback/ok tb@

OpenBSD-Commit-ID: 81cbc6dd3a21c57bd6fadea10e44afe37bca558e
2022-05-02 09:22:44 +10:00
djm@openbsd.org
a45615cb17 upstream: be stricter in which characters will be accepted in
specifying a mask length; allow only 0-9. From khaleesicodes via GHPR#278; ok
dtucker@

OpenBSD-Commit-ID: e267746c047ea86665cdeccef795a8a56082eeb2
2022-05-02 09:20:50 +10:00
Darren Tucker
4835544d2d Add Mac OS X 12 test target. 2022-04-30 11:00:02 +10:00
Darren Tucker
97a6a8b8c1 Only run tests when source files change.
Also run tests on changes to V_9_0 branch.
2022-04-29 18:34:38 +10:00
Darren Tucker
6d0392b9ff Remove now-empty int32_minmax.inc. 2022-04-29 18:22:34 +10:00