OpenBSD/src X0y5fNmregress/usr.bin/ssh/unittests Makefile, regress/usr.bin/ssh/unittests/servconf tests.c Makefile

   unit test for new servconf.[ch] code, including a basic fuzz
   test for deserialisation
VersionDeltaFile
1.1+362-0regress/usr.bin/ssh/unittests/servconf/tests.c
1.1+25-0regress/usr.bin/ssh/unittests/servconf/Makefile
1.14+2-2regress/usr.bin/ssh/unittests/Makefile
+389-23 files

OpenBSD/src QeN1DFPregress/usr.bin/ssh addrmatch.sh cfgmatch.sh

   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
VersionDeltaFile
1.7+2-2regress/usr.bin/ssh/addrmatch.sh
1.18+2-2regress/usr.bin/ssh/cfgmatch.sh
+4-42 files

OpenBSD/src X3P20Rbusr.bin/ssh servconf.c servconf.h

   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@
VersionDeltaFile
1.447+1,392-492usr.bin/ssh/servconf.c
1.177+267-182usr.bin/ssh/servconf.h
1.147+16-68usr.bin/ssh/monitor_wrap.c
1.256+16-42usr.bin/ssh/monitor.c
1.15+14-43usr.bin/ssh/sshd-auth.c
1.55+3-3usr.bin/ssh/monitor_wrap.h
+1,708-8306 files

OpenBSD/src cnrawoCusr.sbin/slowcgi slowcgi.c

   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@
VersionDeltaFile
1.65+14-7usr.sbin/slowcgi/slowcgi.c
+14-71 files

OpenBSD/src cYqx8ZJusr.bin/ssh channels.c

   avoid strlen(NULL) crash if an X11 channel was created before the
   x11-req SSH_MSG_CHANNEL_REQUEST was sent. Reported by Ben Perry via
   GHPR679
VersionDeltaFile
1.460+6-1usr.bin/ssh/channels.c
+6-11 files

OpenBSD/src LtsVaucusr.bin/ssh ssh.c

   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
VersionDeltaFile
1.632+2-1usr.bin/ssh/ssh.c
+2-11 files

OpenBSD/src QYwYpvbusr.bin/ssh sftp-server.c

   disallow use of the copy-data extension to read and write to
   the same inode simultaneously; reported by Qifan Zhang of Palo
   Alto Networks; ok markus@
VersionDeltaFile
1.154+23-4usr.bin/ssh/sftp-server.c
+23-41 files

OpenBSD/src S00iz5Musr.bin/ssh sftp.c

   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@
VersionDeltaFile
1.251+5-3usr.bin/ssh/sftp.c
+5-31 files

OpenBSD/src iqoIWsDusr.bin/ssh serverloop.c

   DisableForwarding=yes didn't override PermitTunnel=yes

   Reported independently by Huzaifa Sidhpurwala of Redhat and Marko
   Jevtic; ok markus@
VersionDeltaFile
1.247+2-2usr.bin/ssh/serverloop.c
+2-21 files

OpenBSD/src zHIUyZEusr.bin/ssh packet.c kex.c

   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@
VersionDeltaFile
1.338+8-1usr.bin/ssh/packet.c
1.194+7-2usr.bin/ssh/kex.c
1.130+2-1usr.bin/ssh/kex.h
+17-43 files

OpenBSD/src uV7VG10usr.bin/ssh packet.c cipher.c

   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
VersionDeltaFile
1.337+9-3usr.bin/ssh/packet.c
1.128+7-1usr.bin/ssh/cipher.c
1.57+2-1usr.bin/ssh/cipher.h
+18-53 files

OpenBSD/src LkOOsJPusr.bin/ssh ssh-agent.c

   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
VersionDeltaFile
1.328+9-3usr.bin/ssh/ssh-agent.c
+9-31 files

OpenBSD/src VIQ2UZrusr.bin/ssh packet.c ssh.c

   fix client use-after-free on error path if cipher_init() fails;
   reported by Qualys Security Advisory Team, ok markus@
VersionDeltaFile
1.336+4-3usr.bin/ssh/packet.c
1.631+3-2usr.bin/ssh/ssh.c
+7-52 files

OpenBSD/src VjWINgQregress/usr.bin/ssh/unittests/match tests.c

   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.
VersionDeltaFile
1.10+200-2regress/usr.bin/ssh/unittests/match/tests.c
+200-21 files

OpenBSD/src XMxH9Zcusr.bin/ssh match.c

   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@
VersionDeltaFile
1.46+89-50usr.bin/ssh/match.c
+89-501 files

OpenBSD/src cVMA04Olib/libtls tls_verify.c

   Disallow wildcard matching of a TLD specified as a FQDN.

   Found by Frank Denis.

   ok tb@
VersionDeltaFile
1.34+4-1lib/libtls/tls_verify.c
+4-11 files

OpenBSD/src NgFVjHlregress/lib/libtls/verify verifytest.c

   Add a regress test that matches a wildcard for a TLD specified as a FQDN.

   This currently matches when we should reject it.
VersionDeltaFile
1.10+9-1regress/lib/libtls/verify/verifytest.c
+9-11 files

OpenBSD/src XsNeQyUregress/lib/libtls/verify verifytest.c

   Improve test failure message.

   The test may have matched when it should not have.
VersionDeltaFile
1.9+4-3regress/lib/libtls/verify/verifytest.c
+4-31 files

OpenBSD/src sF8mX84usr.bin/tmux screen-redraw.c

   Return empty ranges if line is below window.
VersionDeltaFile
1.127+17-13usr.bin/tmux/screen-redraw.c
+17-131 files

OpenBSD/src giXalyvusr.bin/rs rs.c

   Fix heap buffer overread in column counting loop

   OK millert@
VersionDeltaFile
1.31+3-1usr.bin/rs/rs.c
+3-11 files

OpenBSD/src zYPZeiPusr.bin/tmux screen-redraw.c

   Missed this file from previous.
VersionDeltaFile
1.126+23-9usr.bin/tmux/screen-redraw.c
+23-91 files

OpenBSD/src d3mFj8fusr.bin/tmux tty.c screen-write.c

   Handle ranges for panes which are outside the window to the left.
VersionDeltaFile
1.468+4-3usr.bin/tmux/tty.c
1.261+2-2usr.bin/tmux/screen-write.c
1.1329+2-2usr.bin/tmux/tmux.h
+8-73 files

OpenBSD/src mlaVyZssys/arch/arm64/dev aplintc.c

   Add support for version 3 of Apple's AIC interript controller that can be
   found on M3 and later SoCs.

   ok jsg@
VersionDeltaFile
1.22+57-34sys/arch/arm64/dev/aplintc.c
+57-341 files

OpenBSD/src b9ahuiMusr.bin/tmux screen-write.c

   Do not crash when a pane offset is negative.
VersionDeltaFile
1.260+6-4usr.bin/tmux/screen-write.c
+6-41 files

OpenBSD/src J1WJ8jNusr.bin/tmux screen-write.c

   Check if the range is invalid using start,end rather than length since
   it will never be negative.
VersionDeltaFile
1.259+3-3usr.bin/tmux/screen-write.c
+3-31 files

OpenBSD/src 56YFuhesys/kern exec_elf.c

   Handle sections that specify alignment as 0 when loading an ELF interpreter
   (i.e. ld.so).  Since the smallest possible alignment actually is a the
   page size just start with that and only increase it if a larger alignment
   is requested.  Also reject interpreters without loadable segments, just
   like we did for ld.so a few weeks ago.

   Distilled from a report by Andrew Griffiths.

   ok jsg@, deraadt@
VersionDeltaFile
1.200+8-3sys/kern/exec_elf.c
+8-31 files

OpenBSD/src ue2746Ausr.bin/tmux screen-write.c

   Correct calculation of start and end.
VersionDeltaFile
1.258+3-3usr.bin/tmux/screen-write.c
+3-31 files

OpenBSD/src klRJWgusys/kern subr_hibernate.c

   Validate size of chunks copied to piglet during hibernate unpack

   Ensure that the compressed size of the chunk read from the hibernate image
   will fit into the reserved space in the piglet for such chunks. Prevents
   chunks with invalid sizes from overrunning the piglet. Such corrupted
   chunks could be present in tampered or corrupt on-disk hibernate images.

   Reported by Frank Denis
VersionDeltaFile
1.158+10-1sys/kern/subr_hibernate.c
+10-11 files

OpenBSD/src nCoAoHfsys/kern subr_hibernate.c

   Validate sizes against integer overflow when reading chunks in unhibernate

   Validate that chunk sizes stored in the chunktable don't result in integer
   overflow. Such invalid chunk sizes could be present in tampered or corrupt
   on-disk hibernate images.

   Reported by Frank Denis
VersionDeltaFile
1.157+15-3sys/kern/subr_hibernate.c
+15-31 files

OpenBSD/src Vtr8A5Tsys/kern subr_hibernate.c

   Prevent overread when reading the chunktable in unhibernate

   Ensure we don't read past the end of the chunktable, which could happen
   with a tampered or corrupted on-disk hibernate image.

   Reported by Frank Denis
VersionDeltaFile
1.156+6-1sys/kern/subr_hibernate.c
+6-11 files