Commit Graph

12745 Commits

Author SHA1 Message Date
jsg@openbsd.org
220b6c1290
upstream: remove some unused defines; ok djm@
OpenBSD-Commit-ID: 3a63e4e11d455704f684c28715d61b17f91e0996
2024-09-27 10:01:11 +10:00
jmc@openbsd.org
3ef4f6e8a4
upstream: remove some unneeded Xo/Xc calls; from evan silberman the
original diff had a couple of errors, which i've fixed

OpenBSD-Commit-ID: f37ad5888adbc0d4e1cd6b6de237841f4b1e650d
2024-09-27 10:01:10 +10:00
djm@openbsd.org
3f02368e8e
upstream: fix regression introduced when I switched the "Match"
criteria tokeniser to a more shell-like one. Apparently the old tokeniser
(accidentally?) allowed "Match criteria=argument" as well as the "Match
criteria argument" syntax that we tested for.

People were using this syntax so this adds back support for
"Match criteria=argument"

bz3739 ok dtucker

OpenBSD-Commit-ID: d1eebedb8c902002b75b75debfe1eeea1801f58a
2024-09-25 11:27:24 +10:00
djm@openbsd.org
9517cc5857
upstream: some extra paranoia, reminded by jsg@
OpenBSD-Commit-ID: 22072bfa1df1391858ae7768a6c627e08593a91e
2024-09-25 11:27:23 +10:00
Damien Miller
815a94e86a
gss-serv.c needs sys/param.h
From Void Linux
2024-09-25 11:15:45 +10:00
Damien Miller
76a618d284
build construct_utmp() when USE_BTMP is set
Fixes compile error on Void Linux/Musl
2024-09-25 11:13:05 +10:00
Darren Tucker
d3aee17f6d
Test the flags from OpenWRT's package. 2024-09-24 18:41:44 +10:00
Christoph Ostarek
0f5d19e6fe
fix utmpx ifdef
02e16ad95f did a copy-paste for
utmpx, but forgot to change the ifdef appropriately
2024-09-24 12:09:48 +10:00
jsg@openbsd.org
e03239f999
upstream: remove some unused defines; ok djm@
OpenBSD-Commit-ID: 81869ee6356fdbff19dae6ff757095e6b24de712
2024-09-24 12:09:35 +10:00
jsg@openbsd.org
a35f543d3a
upstream: remove unneeded semicolons; checked by millert@
OpenBSD-Commit-ID: 3fb621a58e04b759a875ad6a33f35bb57ca80231
2024-09-24 12:09:35 +10:00
Darren Tucker
1641f2d4d6
Add 9.9 branch to CI status console. 2024-09-23 20:52:31 +10:00
Damien Miller
46d1fb16b2
update version numbers 2024-09-20 08:20:13 +10:00
djm@openbsd.org
0bdca1f218
upstream: openssh-9.9
OpenBSD-Commit-ID: 303417285f1a73b9cb7a2ae78d3f493bbbe31f98
2024-09-20 08:18:23 +10:00
Damien Miller
ef2d7f2d3e
include openbsd-compat/base64.c license in LICENSE 2024-09-18 16:03:23 +10:00
Damien Miller
7ef362b989
conditionally include mman.h in arc4random code 2024-09-18 09:01:23 +10:00
Damien Miller
5fb2b5ad0e
fix bug in recently-added sntrup761 fuzzer
key values need to be static to persist across invocations;
spotted by the Qualys Security Advisory team.
2024-09-17 11:53:24 +10:00
djm@openbsd.org
0ca128c9ee
upstream: use 64 bit math to avoid signed underflow. upstream code
relies on using -fwrapv to provide defined over/underflow behaviour, but we
use -ftrapv to catch integer errors and abort the program. ok dtucker@

OpenBSD-Commit-ID: 8933369b33c17b5f02479503d0a92d87bc3a574b
2024-09-16 15:37:51 +10:00
jmc@openbsd.org
f82e5e22ca
upstream: minor grammar/sort fixes for refuseconnection; ok djm
OpenBSD-Commit-ID: 1c81f37b138b8b66abba811fec836388a0f3e6da
2024-09-16 15:37:44 +10:00
Damien Miller
0c1165fc78
avoid gcc warning in fuzz test 2024-09-15 13:30:13 +10:00
djm@openbsd.org
ce171d0718
upstream: bad whitespace in config dump output
OpenBSD-Commit-ID: d899c13b0e8061d209298eaf58fe53e3643e967c
2024-09-15 13:10:29 +10:00
Damien Miller
671c440786
use construct_utmp to construct btmp records
Simpler and removes some code with the old-style BSD license.
2024-09-15 12:53:59 +10:00
djm@openbsd.org
930cb02b61
upstream: update the Streamlined NTRU Prime code from the "ref"
implementation in SUPERCOP 20201130 to the "compact" implementation in
SUPERCOP 20240808. The new version is substantially faster. Thanks to Daniel
J Bernstein for pointing out the new implementation (and of course for
writing it).

tested in snaps/ok deraadt@

OpenBSD-Commit-ID: bf1a77924c125ecdbf03e2f3df8ad13bd3dafdcb
2024-09-15 12:24:48 +10:00
djm@openbsd.org
9306d6017e
upstream: document Match invalid-user
OpenBSD-Commit-ID: 2c84a9b517283e9711e2812c1f268081dcb02081
2024-09-15 11:23:11 +10:00
djm@openbsd.org
0118a4da21
upstream: add a "Match invalid-user" predicate to sshd_config Match
options.

This allows writing Match conditions that trigger for invalid username.
E.g.

PerSourcePenalties refuseconnection:90s
Match invalid-user
 RefuseConnection yes

Will effectively penalise bots try to guess passwords for bogus accounts,
at the cost of implicitly revealing which accounts are invalid.

feedback markus@

OpenBSD-Commit-ID: 93d3a46ca04bbd9d84a94d1e1d9d3a21073fbb07
2024-09-15 11:23:11 +10:00
djm@openbsd.org
7875975136
upstream: Add a "refuseconnection" penalty class to sshd_config
PerSourcePenalties

This allows penalising connection sources that have had connections
dropped by the RefuseConnection option. ok markus@

OpenBSD-Commit-ID: 3c8443c427470bb3eac1880aa075cb4864463cb6
2024-09-15 11:23:10 +10:00
djm@openbsd.org
8d21713b66
upstream: Add a sshd_config "RefuseConnection" option
If set, this will terminate the connection at the first authentication
request (this is the earliest we can evaluate sshd_config Match blocks)

ok markus@

OpenBSD-Commit-ID: 43cc2533984074c44d0d2f92eb93f661e7a0b09c
2024-09-15 11:23:10 +10:00
djm@openbsd.org
acad117e66
upstream: switch sshd_config Match processing to the argv tokeniser
too; ok markus@

OpenBSD-Commit-ID: b74b5b0385f2e0379670e2b869318a65b0bc3923
2024-09-15 11:23:09 +10:00
djm@openbsd.org
baec3f7f4c
upstream: switch "Match" directive processing over to the argv
string tokeniser, making it possible to use shell-like quoting in Match
directives, particularly "Match exec". ok markus@

OpenBSD-Commit-ID: 0877309650b76f624b2194c35dbacaf065e769a5
2024-09-15 11:23:09 +10:00
djm@openbsd.org
dd424d7c38
upstream: include pathname in some of the ssh-keygen passphrase
prompts. Helps the user know what's going on when ssh-keygen is invoked via
other tools. Requested in GHPR503

OpenBSD-Commit-ID: 613b0bb6cf845b7e787d69a5b314057ceda6a8b6
2024-09-15 11:23:08 +10:00
djm@openbsd.org
62bbf8f825
upstream: Do not apply authorized_keys options when signature
verification fails. Prevents restrictive key options being incorrectly
applied to subsequent keys in authorized_keys. bz3733, ok markus@

OpenBSD-Commit-ID: ba3776d9da4642443c19dbc015a1333622eb5a4e
2024-09-15 11:23:07 +10:00
Wu Weixin
49f325fd47
Fix without_openssl always being set to 1
In Fedora systems, %{?rhel} is empty. In RHEL systems, %{?fedora} is
empty. Therefore, the original code always sets without_openssl to 1.
2024-09-13 14:09:19 +10:00
djm@openbsd.org
c21c3a2419
upstream: Relax absolute path requirement back to what it was prior to
OpenSSH 9.8, which incorrectly required that sshd was started with an
absolute path in inetd mode. bz3717, patch from Colin Wilson

OpenBSD-Commit-ID: 25c57f22764897242d942853f8cccc5e991ea058
2024-09-12 10:37:34 +10:00
naddy@openbsd.org
1bc426f51b
upstream: document the mlkem768x25519-sha256 key exchange algorithm
OpenBSD-Commit-ID: fa18dccdd9753dd287e62ecab189b3de45672521
2024-09-11 09:38:22 +10:00
Darren Tucker
0a2db61a5f
Spell omnios test host correctly. 2024-09-10 21:11:14 +10:00
Darren Tucker
059ed698a4
Add omnios test target. 2024-09-10 18:52:02 +10:00
Darren Tucker
f4ff91575a
Wrap stdint.h in ifdef. 2024-09-10 18:45:55 +10:00
Darren Tucker
ff714f001d
Also test PAM on dfly64. 2024-09-10 17:58:09 +10:00
Damien Miller
509b757c05
stubs for ML-KEM KEX functions
used for C89 compilers
2024-09-09 21:50:14 +10:00
Damien Miller
273581210c
declare defeat trying to detect C89 compilers
I can't find a reliable way to detect the features the ML-KEM code
requires in configure. Give up for now and use VLA support (that we
can detect) as a proxy for "old compiler" and turn off ML-KEM if
it isn't supported.
2024-09-09 17:30:38 +10:00
Damien Miller
e8a0f19b56
fix previous; check for C99 compound literals
The previous commit was incorrect (or at least insufficient), the
ML-KEM code is actually using compound literals, so test for them.
2024-09-09 16:46:40 +10:00
Damien Miller
7c07bec144
test for compiler feature needed for ML-KEM
The ML-KEM implementation we uses need the compiler to support
C99-style named struct initialisers (e.g foo = {.bar = 1}). We
still support (barely) building OpenSSH with older compilers, so
add a configure test for this.
2024-09-09 16:06:21 +10:00
djm@openbsd.org
d469d5f348
upstream: test mlkem768x25519-sha256
OpenBSD-Regress-ID: 7baf6bc39ae55648db1a2bfdc55a624954847611
2024-09-09 15:29:09 +10:00
djm@openbsd.org
62fb2b51bb
upstream: pull post-quantum ML-KEM/x25519 key exchange out from
compile-time flag now than an IANA codepoint has been assigned for the
algorithm.

Add mlkem768x25519-sha256 in 2nd KexAlgorithms preference slot.

ok markus@

OpenBSD-Commit-ID: 9f50a0fae7d7ae8b27fcca11f8dc6f979207451a
2024-09-09 12:45:53 +10:00
djm@openbsd.org
a8ad7a2952
upstream: make parsing user@host consistently look for the last '@' in
the string rather than the first. This makes it possible to use usernames
that contain '@' characters.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Prompted by Max Zettlmeißl; feedback/ok millert@

OpenBSD-Commit-ID: 0b16eec246cda15469ebdcf3b1e2479810e394c5
2024-09-06 12:31:19 +10:00
djm@openbsd.org
13cc78d016
upstream: be more strict in parsing key type names. Only allow
shortnames (e.g "rsa") in user-interface code and require full SSH protocol
names (e.g. "ssh-rsa") everywhere else.

Prompted by bz3725; ok markus@

OpenBSD-Commit-ID: b3d8de9dac37992eab78adbf84fab2fe0d84b187
2024-09-04 15:38:50 +10:00
djm@openbsd.org
ef8472309a
upstream: fix RCSID in output
OpenBSD-Commit-ID: 889ae07f2d2193ddc4351711919134664951dd76
2024-09-04 15:38:50 +10:00
jmc@openbsd.org
ba2ef20c75
upstream: envrionment -> environment;
OpenBSD-Commit-ID: b719f39c20e8c671ec6135c832d6cc67a595af9c
2024-09-04 15:38:49 +10:00
Damien Miller
e66c0c5673
add basic fuzzers for our import of sntrup761 2024-09-04 15:36:22 +10:00
djm@openbsd.org
d19dea6330
upstream: regression test for Include variable expansion
OpenBSD-Regress-ID: 35477da3ba1abd9ca64bc49080c50a9c1350c6ca
2024-09-03 16:03:11 +10:00
djm@openbsd.org
8c4d6a6280
upstream: allow the "Include" directive to expand the same set of
%-tokens that "Match Exec" and environment variables.

ok dtucker@

OpenBSD-Commit-ID: 12ef521eaa966a9241e684258564f52f1f3c5d37
2024-09-03 15:38:51 +10:00