djm [Sun, 29 Jun 2008 12:46:35 +0000 (12:46 +0000)]
- djm@cvs.openbsd.org 2008/06/26 06:10:09
[sftp-client.c sftp-server.c]
allow the sftp chmod(2)-equivalent operation to set set[ug]id/sticky
bits. Note that this only affects explicit setting of modes (e.g. via
sftp(1)'s chmod command) and not file transfers. (bz#1310)
ok deraadt@ at c2k8
djm [Sun, 29 Jun 2008 12:45:13 +0000 (12:45 +0000)]
- (djm) OpenBSD CVS Sync
- martynas@cvs.openbsd.org 2008/06/21 07:46:46
[sftp.c]
use optopt to get invalid flag, instead of return value of getopt,
which is always '?'; ok djm@
djm [Sun, 15 Jun 2008 21:59:23 +0000 (21:59 +0000)]
- djm@cvs.openbsd.org 2008/06/15 20:06:26
[channels.c channels.h session.c]
don't call isatty() on a pty master, instead pass a flag down to
channel_set_fds() indicating that te fds refer to a tty. Fixes a
hang on exit on Solaris (bz#1463) in portable but is actually
a generic bug; ok dtucker deraadt markus
dtucker [Fri, 13 Jun 2008 23:14:46 +0000 (23:14 +0000)]
- (dtucker) [configure.ac] Bug #1276: avoid linking against libgssapi, which
despite its name doesn't seem to implement all of GSSAPI. Patch from
Jan Engelhardt, sanity checked by Simon Wilkinson.
dtucker [Fri, 13 Jun 2008 23:04:26 +0000 (23:04 +0000)]
- grunk@cvs.openbsd.org 2008/06/13 20:13:26
[ssh.1]
Explain the use of SSH fpr visualization using random art, and cite the
original scientific paper inspiring that technique.
Much help with English and nroff by jmc@, thanks.
dtucker [Fri, 13 Jun 2008 22:59:49 +0000 (22:59 +0000)]
- dtucker@cvs.openbsd.org 2008/06/13 13:56:59
[monitor.c]
Clear key options in the monitor on failed authentication, prevents
applying additional restrictions to non-pubkey authentications in
the case where pubkey fails but another method subsequently succeeds.
bz #1472, found by Colin Watson, ok markus@ djm
dtucker [Fri, 13 Jun 2008 04:51:28 +0000 (04:51 +0000)]
- djm@cvs.openbsd.org 2008/06/13 04:40:22
[auth2-pubkey.c auth-rhosts.c]
refuse to read ~/.shosts or ~/.ssh/authorized_keys that are not
regular files; report from Solar Designer via Colin Watson in bz#1471
ok dtucker@ deraadt@
dtucker [Fri, 13 Jun 2008 02:40:55 +0000 (02:40 +0000)]
- (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used
on big endian machines, so ifdef them for little endian only to prevent
unused function warnings.
dtucker [Fri, 13 Jun 2008 00:24:03 +0000 (00:24 +0000)]
- djm@cvs.openbsd.org 2008/06/13 00:16:49
[mux.c]
fall back to creating a new TCP connection on most multiplexing errors
(socket connect fail, invalid version, refused permittion, corrupted
messages, etc.); bz #1329 ok dtucker@
dtucker [Fri, 13 Jun 2008 00:22:54 +0000 (00:22 +0000)]
- dtucker@cvs.openbsd.org 2008/06/13 00:12:02
[sftp.h log.h]
replace __dead with __attribute__((noreturn)), makes things
a little easier to port. Also, add it to sigdie(). ok djm@
dtucker [Thu, 12 Jun 2008 22:56:01 +0000 (22:56 +0000)]
- djm@cvs.openbsd.org 2008/06/12 21:06:25
[clientloop.c]
I was coalescing expected global request confirmation replies at
the wrong end of the queue - fix; prompted by markus@
dtucker [Thu, 12 Jun 2008 20:42:45 +0000 (20:42 +0000)]
- dtucker@cvs.openbsd.org 2008/06/12 20:38:28
[sshd.c sshconnect.c packet.h misc.c misc.h packet.c]
Make keepalive timeouts apply while waiting for a packet, particularly
during key renegotiation (bz #1363). With djm and Matt Day, ok djm@
dtucker [Thu, 12 Jun 2008 18:55:46 +0000 (18:55 +0000)]
- djm@cvs.openbsd.org 2008/06/12 15:19:17
[clientloop.h channels.h clientloop.c channels.c mux.c]
The multiplexing escape char handler commit last night introduced a
small memory leak per session; plug it.
dtucker [Thu, 12 Jun 2008 18:55:10 +0000 (18:55 +0000)]
- grunk@cvs.openbsd.org 2008/06/12 06:32:59
[key.c]
We already mark the start of the worm, now also mark the end of the worm
in our random art drawings.
ok djm@
dtucker [Thu, 12 Jun 2008 18:54:40 +0000 (18:54 +0000)]
- grunk@cvs.openbsd.org 2008/06/12 05:42:46
[key.c]
supply the key type (rsa1, rsa, dsa) as a caption in the frame of the
random art. while there, stress the fact that the field base should at
least be 8 characters for the pictures to make sense.
comment and ok djm@
dtucker [Thu, 12 Jun 2008 18:50:27 +0000 (18:50 +0000)]
- djm@cvs.openbsd.org 2008/06/12 04:06:00
[clientloop.h ssh.c clientloop.c]
maintain an ordered queue of outstanding global requests that we
expect replies to, similar to the per-channel confirmation queue.
Use this queue to verify success or failure for remote forward
establishment in a race free way.
ok dtucker@
dtucker [Thu, 12 Jun 2008 18:49:33 +0000 (18:49 +0000)]
- djm@cvs.openbsd.org 2008/06/12 03:40:52
[clientloop.h mux.c channels.c clientloop.c channels.h]
Enable ~ escapes for multiplex slave sessions; give each channel
its own escape state and hook the escape filters up to muxed
channels. bz #1331
Mux slaves do not currently support the ~^Z and ~& escapes.
NB. this change cranks the mux protocol version, so a new ssh
mux client will not be able to connect to a running old ssh
mux master.
ok dtucker@
dtucker [Thu, 12 Jun 2008 18:47:34 +0000 (18:47 +0000)]
- grunk@cvs.openbsd.org 2008/06/12 00:13:55
[sshconnect.c]
Make ssh print the random art also when ssh'ing to a host using IP only.
spotted by naddy@, ok and help djm@ dtucker@
dtucker [Thu, 12 Jun 2008 18:46:45 +0000 (18:46 +0000)]
- dtucker@cvs.openbsd.org 2008/06/12 00:03:49
[dns.c canohost.c sshconnect.c]
Do not pass "0" strings as ports to getaddrinfo because the lookups
can slow things down and we never use the service info anyway. bz
#859, patch from YOSHIFUJI Hideaki and John Devitofranceschi. ok
deraadt@ djm@
djm belives that the reason for the "0" strings is to ensure that
it's not possible to call getaddrinfo with both host and port being
NULL. In the case of canohost.c host is a local array. In the
case of sshconnect.c, it's checked for null immediately before use.
In dns.c it ultimately comes from ssh.c:main() and is guaranteed to
be non-null but it's not obvious, so I added a warning message in
case it is ever passed a null.
dtucker [Thu, 12 Jun 2008 18:45:50 +0000 (18:45 +0000)]
- grunk@cvs.openbsd.org 2008/06/11 23:51:57
[key.c]
#define statements that are not atoms need braces around them, else they
will cause trouble in some cases.
Also do a computation of -1 once, and not in a loop several times.
spotted by otto@
dtucker [Thu, 12 Jun 2008 18:43:15 +0000 (18:43 +0000)]
- grunk@cvs.openbsd.org 2008/06/11 22:20:46
[ssh-keygen.c ssh-keygen.1]
ssh-keygen would write fingerprints to STDOUT, and random art to STDERR,
that is not how it was envisioned.
Also correct manpage saying that -v is needed along with -l for it to work.
spotted by naddy@
dtucker [Thu, 12 Jun 2008 18:42:14 +0000 (18:42 +0000)]
- grunk@cvs.openbsd.org 2008/06/11 21:38:25
[ssh-keygen.c]
ssh-keygen -lv -f /etc/ssh/ssh_host_rsa_key.pub
would not display you the random art as intended, spotted by canacar@
dtucker [Thu, 12 Jun 2008 18:40:35 +0000 (18:40 +0000)]
- grunk@cvs.openbsd.org 2008/06/11 21:01:35
[ssh_config.5 key.h readconf.c readconf.h ssh-keygen.1 ssh-keygen.c key.c
sshconnect.c]
Introduce SSH Fingerprint ASCII Visualization, a technique inspired by the
graphical hash visualization schemes known as "random art", and by
Dan Kaminsky's musings on the subject during a BlackOp talk at the
23C3 in Berlin.
Scientific publication (original paper):
"Hash Visualization: a New Technique to improve Real-World Security",
Perrig A. and Song D., 1999, International Workshop on Cryptographic
Techniques and E-Commerce (CrypTEC '99)
http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf
The algorithm used here is a worm crawling over a discrete plane,
leaving a trace (augmenting the field) everywhere it goes.
Movement is taken from dgst_raw 2bit-wise. Bumping into walls
makes the respective movement vector be ignored for this turn,
thus switching to the other color of the chessboard.
Graphs are not unambiguous for now, because circles in graphs can be
walked in either direction.
discussions with several people,
help, corrections and ok markus@ djm@
dtucker [Tue, 10 Jun 2008 23:34:01 +0000 (23:34 +0000)]
- djm@cvs.openbsd.org 2008/06/10 22:15:23
[PROTOCOL ssh.c serverloop.c]
Add a no-more-sessions@openssh.com global request extension that the
client sends when it knows that it will never request another session
(i.e. when session multiplexing is disabled). This allows a server to
disallow further session requests and terminate the session.
Why would a non-multiplexing client ever issue additional session
requests? It could have been attacked with something like SSH'jack:
http://www.storm.net.nz/projects/7
feedback & ok markus
dtucker [Tue, 10 Jun 2008 13:01:51 +0000 (13:01 +0000)]
- dtucker@cvs.openbsd.org 2008/06/10 04:50:25
[sshd.c channels.h channels.c log.c servconf.c log.h servconf.h sshd.8]
Add extended test mode (-T) and connection parameters for test mode (-C).
-T causes sshd to write its effective configuration to stdout and exit.
-C causes any relevant Match rules to be applied before output. The
combination allows tesing of the parser and config files. ok deraadt djm
dtucker [Tue, 10 Jun 2008 12:59:10 +0000 (12:59 +0000)]
- (dtucker) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/06/10 03:57:27
[servconf.c match.h sshd_config.5]
support CIDR address matching in sshd_config "Match address" blocks, with
full support for negation and fall-back to classic wildcard matching.
For example:
Match address 192.0.2.0/24,3ffe:ffff::/32,!10.*
PasswordAuthentication yes
addrmatch.c code mostly lifted from flowd's addr.c
feedback and ok dtucker@
dtucker [Mon, 9 Jun 2008 13:49:09 +0000 (13:49 +0000)]
- dtucker@cvs.openbsd.org 2008/06/08 20:15:29
[PROTOCOL]
Have the sftp client store the statvfs replies in wire format,
which prevents problems when the server's native sizes exceed the
client's.
Also extends the sizes of the remaining 32bit wire format to 64bit,
they're specified as unsigned long in the standard.
dtucker [Mon, 9 Jun 2008 13:47:37 +0000 (13:47 +0000)]
- djm@cvs.openbsd.org 2008/06/07 21:52:46
[PROTOCOL]
statvfs member fsid needs to be wider, increase it to 64 bits and
crank extension revision number to 2; prodded and ok dtucker@
dtucker [Mon, 9 Jun 2008 12:49:36 +0000 (12:49 +0000)]
- dtucker@cvs.openbsd.org 2008/06/08 20:15:29
[sftp.c sftp-client.c sftp-client.h]
Have the sftp client store the statvfs replies in wire format,
which prevents problems when the server's native sizes exceed the
client's.
Also extends the sizes of the remaining 32bit wire format to 64bit,
they're specified as unsigned long in the standard.
dtucker [Sun, 8 Jun 2008 20:17:53 +0000 (20:17 +0000)]
- (dtucker) [configure.ac defines.h sftp-client.c M sftp-server.c] Add a
macro to convert fsid to unsigned long for platforms where fsid is a
2-member array.
dtucker [Sun, 8 Jun 2008 17:32:29 +0000 (17:32 +0000)]
- (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c
openbsd-compat/Makefile.in openbsd-compat/openbsd-compat.h
openbsd-compat/bsd-statvfs.{c,h}] Add a null implementation of statvfs and
fstatvfs and remove #defines around statvfs code. ok djm@
dtucker [Sun, 8 Jun 2008 02:57:08 +0000 (02:57 +0000)]
- djm@cvs.openbsd.org 2008/06/07 21:52:46
[sftp-server.c sftp-client.c]
statvfs member fsid needs to be wider, increase it to 64 bits and
crank extension revision number to 2; prodded and ok dtucker@
dtucker [Sun, 8 Jun 2008 02:55:32 +0000 (02:55 +0000)]
- djm@cvs.openbsd.org 2008/05/19 20:53:52
[clientloop.c]
unbreak tree by committing this bit that I missed from:
Fix sending tty modes when stdin is not a tty (bz#1199). Previously
we would send the modes corresponding to a zeroed struct termios,
whereas we should have been sending an empty list of modes.
Based on patch from daniel.ritz AT alcatel.ch; ok dtucker@ markus@
dtucker [Sun, 8 Jun 2008 02:54:29 +0000 (02:54 +0000)]
- djm@cvs.openbsd.org 2008/05/19 15:46:31
[ssh-keygen.c]
support -l (print fingerprint) in combination with -F (find host) to
search for a host in ~/.ssh/known_hosts and display its fingerprint;
ok markus@
dtucker [Sun, 8 Jun 2008 02:53:20 +0000 (02:53 +0000)]
- djm@cvs.openbsd.org 2008/05/19 15:45:07
[sshtty.c ttymodes.c sshpty.h]
Fix sending tty modes when stdin is not a tty (bz#1199). Previously
we would send the modes corresponding to a zeroed struct termios,
whereas we should have been sending an empty list of modes.
Based on patch from daniel.ritz AT alcatel.ch; ok dtucker@ markus@
dtucker [Sat, 7 Jun 2008 23:25:28 +0000 (23:25 +0000)]
- (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c] Do not enable statvfs extensions on platforms that do not have statvfs. ok djm@
djm [Wed, 4 Jun 2008 00:54:00 +0000 (00:54 +0000)]
- (djm) [openbsd-compat/bsd-arc4random.c] Fix math bug that caused bias
in arc4random_uniform with upper_bound in (2^30,2*31). Note that
OpenSSH did not make requests with upper bounds in this range.
djm [Mon, 19 May 2008 22:57:06 +0000 (22:57 +0000)]
- (djm) [configure.ac mux.c sftp.c openbsd-compat/Makefile.in]
[openbsd-compat/fmt_scaled.c openbsd-compat/openbsd-compat.h]
Fix compilation on Linux, including pulling in fmt_scaled(3)
implementation from OpenBSD's libutil.