the fix for ANT-2026-KVP4Z2O3 added some paranoia for paths returned
from the server but it missed that, under some circumstances, the
returned path goes via glob(3). Escape it beforehand.
the fix for ANT-2026-P86OLVI7 reserved 32 fds that would not be used
by forwardings, but it neglected the fact that agent forwardings are
created outside the channels code and also consume fds. Reuse the
same machinery to ensure they are accounted for too
there are some cases where we can't track the lifecycle of the
fork()ed ProxyCommand, e.g. when we've done a ControlPersist detach
or if we do a ~^Z background operations. In both these cases ssh(1)
is no longer the parent of the ProxyCommand and so can't see its
SIGCHLD to get a reliable notification of it exiting.
So let's not try to kill(2) the ProxyCommand on these paths, in case
it has already exited and its PID has been recycled.
Followup to the ANT-2026-ODQD8QBH fix
In the old, dark ages of the infancy of the OpenBSD/hppa port, wsdisplay
would attach at the end of the device configuration process, because at that
time it was quite common to hit a panic or the kernel debugger before reaching
that point, and we needed the kernel debugger to be usable.
The reliability of the code has improved a lot since then, and, using a
simple trick to use the prom console as input to wsdisplay, we do not need to
postpone attachment of wsdisplay any longer.
fix a bug where if an exit-status message arrives and then the TCP
connection is terminated before the session channel finishes draining
its buffered data, then ssh(1)'s exit status could reflect success
rather than an abnormally-terminated connection.
Anthropic ANT-2026-2LSSYBUV; feedback/ok markus@
Some performance improvements for sshbuf
1. When allocating, geometrically scale the buffer by 1.25x rather
than doing linear increments. This avoids quadratic behaviour in
some cases and expensive ramp up if the target state is a large
buffer.
2. Keep a 50% allocation headroom above the requested maximum size.
Because we need to sometime repack buffers by memmove()ing their
contents from the end of the buffer to the start, this avoids a
pathological state where an almost-full buffer that is doing
small get/put operations spends almost all of its time in memcpy.
ok markus@
add async DNS resolution for dynamic (SOCKS 4a/5) forwarding
using libc ASR. Avoids hangs in ssh/sshd when forwarding requests
lookup of a name that is slow to resolve.
Controlled using ASR option in Makefile.inc, on by default.
feedback/ok markus@