ctime.3: remove warning about tm_zone and tm_gmtoff
These are standardized in posix 2024 via Austin Group Defect 1533. So they
won't go away or change anytime soon.
ok job millert
Clean up signature algorithm handling.
Now that we no longer support TLSv1.0 and TLSv1.1, SSL_USE_SIGALGS()
is always true - remove all of the code that handles the non-sigalgs
path, along with SSL_USE_SIGALGS() and the related flags.
Also remove SIGALG_RSA_PKCS1_MD5_SHA1 and references to it, since this
is also now unused.
ok kenjiro@ tb@
in the qwx newstate task, only attempt to reset the device if RUNNING
If we are not RUNNING then we are being called from qwx_stop(), and any
error recovery the init task would try to perform would at best be
pointless and might even cause problems.
Fix use of wrong tailq pointers in qwx.
Fortunately, this was a non-issue on devices with single radios and
there are no multi-radio devices known to us so far.
With help from kevlo@ who spotted a case I had missed.
handle compiled-time unsupported options in servconf.h better; leave
a zero placeholder variable so we don't have #ifdef around their
absence elsehwere in the tree
the new configuration dump code emits configuration directives with
capitalisation (previously they were all lowercase), so make the tests
that consume them insensitive to case
big refactor of sshd config management code.
This generates much of the initialisation, defaults and keyword table
code from a set of macros rather than hand coding them. These same
macros are also used to generate serialisation and deserialisation
code.
The macros are admittedly ugly but have the advantage of forcing a
good degree of consistency across places that need to stay in sync
with each other.
The new de/serialisation code is used to pass configurations across
the various sshd-* process boundaries. This removes the need to pass
around raw text configurations that need to be re-parsed as well as
eliminating some raw pointer leakage across the processes where
structures were previously clumsily serialised.
feedback/ok markus@
Don't fail hard on version mismatch and ignore extra end-of-params messages.
Replace the lerrx on version mismatch with a lwarnx and error return.
Switch to ssize_t return for that so that slowcgi_request() can properly
fail when this happens.
Also do not execute multiple commands when extra end-of-params messages
are received. Once a command is executed fail to start a 2nd one.
Same diff as bgplgd rev. 1.9
Reported by Frank Denis
OK florian@ tb@
DNS0x20[1] can randomise the case of domain names returned by lookup
to force some more uniqueness in queries to reduce the likelihood
of spoofing attacks succeeding.
Normally this should be hidden from the user by the resolver, but
in some cases it can leak through. When it does, it can mess up
ssh's CanonicalizePermittedCNAMEs.
Fix this by forcing the name we received from the system resolver to
lowercase.
bz3966, report and fix by Martin D Kealey
[1] https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00
Fix two separate one-byte out-of-cound reads
1) if a server sent an empty reply to a SSH2_FXP_REALPATH request
2) if a batch command used the full 2048 byte buffer but ended in a
literal backslash character
Both reported by Zhenpeng (Leo) Lin from depthfirst
ok markus@
make the transport protocol stricter by disconnecting if the peer
sends non-KEX messages during a key re-exchange.
Previously an evil peer could continue sending non-KEX messages
without penalty, causing memory to be wasted up until the
connection terminated or the server/client hit a OOM limit.
reported by Marko Jevtic; ok markus@
stricter validation of the transport state passed from the
unprivileged preauth sshd-auth process to the user-privileged
postauth sshd-session process.
These are harmless unless an attacker had an exploit for sshd-auth
in which case they could be used for post-auth memory DoS or to
crash you own session in a new and exciting way.
Reported by bylee3 and Kayky Vinicius
ok markus
Enforce a maximum size for usernames in agent key use constraints
Along with the match_pattern() performance change that was just
committed this avoids a denial-of-service where an agent client could
waste CPU on an agent by sending user constraints with lots of
wildcards.
Reported by Huzaifa Sidhpurwala of Redhat
ok markus
flesh out match_pattern() tests, including a new comparison test of
the new NFA-based implementation against the original one for all
possible combinations of short inputs and patterns constructed from
a small dictionary of possibilities.
Replace the old recursive match_pattern() with an implementation
that uses a NFA for matching. This avoids the exponential worst-
case behaviour for the old implementation.
ok markus@