summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/monitor.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* don't record hostbased authentication hostkeys as user keysdjm2015-09-041-2/+2
| | | | in test for multiple authentication with the same key
* Fix occurrences of "r = func() != 0" which result in the wrong errorjsg2015-09-021-2/+2
| | | | | | codes being returned due to != having higher precedence than =. ok deraadt@ markus@
* Improve size == 0, count == 0 checking in mm_zalloc, which is "array" like.deraadt2015-08-211-8/+3
| | | | Discussed with tedu, millert, otto.... and ok djm
* Don't count successful partial authentication as failures in monitor;djm2015-06-221-2/+2
| | | | | this may have caused the monitor to refuse multiple authentications that would otherwise have successfully completed; ok markus@
* Remove pattern length argument from match_pattern_list(),djm2015-05-041-5/+3
| | | | | | | | | | we only ever use it for strlen(pattern). Prompted by hanno AT hboeck.de pointing an out-of-bound read error caused by an incorrect pattern length found using AFL and his own tools. ok markus@
* prevent authorized_keys options picked up on public key tests withoutdjm2015-05-011-4/+7
| | | | | a corresponding private key authentication being applied to other authentication methods. Reported by halex@, ok markus@
* fix compilation with OPENSSL=no; ok dtucker@djm2015-04-271-1/+3
|
* don't call record_login() in monitor when UseLogin is enabled;djm2015-04-171-1/+4
| | | | bz#278 reported by drk AT sgi.com; ok dtucker
* UpdateHostKeys fixes:djm2015-02-201-4/+4
| | | | | | | | | | | | | | I accidentally changed the format of the hostkeys@openssh.com messages last week without changing the extension name, and this has been causing connection failures for people who are running -current. First reported by sthen@ s/hostkeys@openssh.com/hostkeys-00@openssh.com/ Change the name of the proof message too, and reorder it a little. Also, UpdateHostKeys=ask is incompatible with ControlPersist (no TTY available to read the response) so disable UpdateHostKeys if it is in ask mode and ControlPersist is active (and document this)
* Revise hostkeys@openssh.com hostkey learning extension.djm2015-02-161-6/+39
| | | | | | | | | | The client will not ask the server to prove ownership of the private halves of any hitherto-unseen hostkeys it offers to the client. Allow UpdateHostKeys option to take an 'ask' argument to let the user manually review keys offered. ok markus@
* make rekey_limit for sshd w/privsep work; ok djm@ dtucker@markus2015-02-131-6/+1
|
* SIZE_MAX is standard, we should be using it in preference to themillert2015-02-061-3/+3
| | | | obsolete SIZE_T_MAX. OK miod@ beck@
* Reduce use of <sys/param.h> and transition to <limits.h> throughout.deraadt2015-01-201-2/+2
| | | | ok djm markus
* adapt kex to sshbuf and struct ssh; ok djm@markus2015-01-191-2/+2
|
* update packet.c & isolate, introduce struct sshmarkus2015-01-191-228/+61
| | | | | | | | a) switch packet.c to buffer api and isolate per-connection info into struct ssh b) (de)serialization of the state is moved from monitor to packet.c c) the old packet.c API is implemented in opacket.[ch] d) compress.c/h is removed and integrated into packet.c with and ok djm@
* move authfd.c and its tentacles to the new buffer/key API;djm2015-01-141-18/+24
| | | | ok markus@
* add sshd_config HostbasedAcceptedKeyTypes and PubkeyAcceptedKeyTypesdjm2015-01-131-1/+13
| | | | | options to allow sshd to control what public key types will be accepted. Currently defaults to all. Feedback & ok markus@
* remember which public keys have been used for authentication anddjm2014-12-221-2/+8
| | | | | | | | | refuse to accept previously-used keys. This allows AuthenticationMethods=publickey,publickey to require that users authenticate using two _different_ pubkeys. ok markus@
* Add support for Unix domain socket forwarding. A remote TCP portmillert2014-07-151-2/+2
| | | | | | | | may be forwarded to a local Unix domain socket and vice versa or both ends may be a Unix domain socket. This is a reimplementation of the streamlocal patches by William Ahern from: http://www.25thandclement.com/~william/projects/streamlocal.html OK djm@ markus@
* New key API: refactor key-related functions to be more library-like,djm2014-06-241-1/+3
| | | | | | | | | existing API is offered as a set of wrappers. with and ok markus@ Thanks also to Ben Hawkes, David Tomaschik, Ivan Fratric, Matthew Dempsky and Ron Bowes for a detailed review a few months ago.
* unbreak compression, by re-init-ing the compression code in themarkus2014-05-031-1/+3
| | | | | | post-auth child. the new buffer code is more strict, and requires buffer_init() while the old code was happy after a bzero(); originally from djm@
* make compiling against OpenSSL optional (make OPENSSL=no);markus2014-04-291-1/+22
| | | | | reduces algorithms to curve25519, aes-ctr, chacha, ed25519; allows us to explore further options; with and ok djm
* convert memset of potentially-private data to explicit_bzero()djm2014-02-021-4/+4
|
* replace most bzero with explicit_bzero, except a few that cna be memsettedu2014-01-311-2/+2
| | | | ok djm dtucker
* remove experimental, never-enabled JPAKE code; ok markus@djm2014-01-291-225/+1
|
* fix rekeying for KEX_C25519_SHA256; noted by dtucker@markus2013-11-041-1/+2
|
* add ssh-agent(1) support to sshd(8); allows encrypted hostkeys,markus2013-07-191-4/+14
| | | | | or hostkeys on smartcards; most of the work by Zev Weiss; bz #1974 ok djm@
* for hostbased authentication, print the client host and user ondjm2013-06-211-2/+5
| | | | the auth success/failure line; bz#2064, ok dtucker@
* Standardise logging of supplemental information during userauth. Keysdjm2013-05-191-5/+4
| | | | | | | | | | and ruser is now logged in the auth success/failure message alongside the local username, remote host/port and protocol in use. Certificates contents and CA are logged too. Pushing all logging onto a single line simplifies log analysis as it is no longer necessary to relate information scattered across multiple log entries. "I like it" markus@
* bye, bye xfree(); ok markus@djm2013-05-171-65/+60
|
* Add RekeyLimit to sshd with the same syntax as the client allowing rekeyingdtucker2013-05-161-1/+5
| | | | based on traffic volume or time. ok djm@, help & ok jmc@ for the man page.
* add submethod support to AuthenticationMethods; ok and freedback djm@markus2013-03-071-5/+6
|
* reconstruct the original username that was sent by the client, which maydjm2013-03-071-11/+19
| | | | | | have included a style (e.g. "root:skey") when checking public key signatures. Fixes public key and hostbased auth when the client specified a style; ok markus@
* drain the log messages after receiving the keystate from the unprivmarkus2012-12-111-5/+5
| | | | child. otherwise it might block while sending. ok djm@
* Fixes logging of partial authentication when privsep is enableddjm2012-12-021-5/+11
| | | | | | | | | | | | | Previously, we recorded "Failed xxx" since we reset authenticated before calling auth_log() in auth2.c. This adds an explcit "Partial" state. Add a "submethod" to auth_log() to report which submethod is used for keyboard-interactive. Fix multiple authentication when one of the methods is keyboard-interactive. ok markus@
* Support multiple required authentication via an AuthenticationMethodsdjm2012-11-041-4/+31
| | | | | | | option. This option lists one or more comma-separated lists of authentication method names. Successful completion of all the methods in any list is required for authentication to complete; feedback and ok markus@
* remove dead code following 'for (;;)' loops.dtucker2012-06-221-4/+1
| | | | From Steve.McClellan at radisys com, ok markus@
* memleak on error pathdjm2012-01-051-1/+2
|
* ignore EINTR errors from poll()djm2011-06-231-2/+5
|
* make the pre-auth privsep slave log via a socketpair shared with thedjm2011-06-171-15/+108
| | | | monitor rather than /var/empty/dev/log; ok dtucker@ deraadt@ markus@
* allow AuthorizedKeysFile to specify multiple files, separated by spaces.djm2011-05-231-2/+7
| | | | | | | | | Bring back authorized_keys2 as a default search path (to avoid breaking existing users of this file), but override this in sshd_config so it will be no longer used on fresh installs. Maybe in 2015 we can remove it entierly :) feedback and ok markus@ dtucker@
* use a macro to define which string options to copy between configsdjm2011-05-201-3/+10
| | | | | | | for Match. This avoids problems caused by forgetting to keep three code locations in perfect sync and ordering "this is at once beautiful and horrible" + ok dtucker@
* use FD_CLOEXEC consistently; patch from zion AT x96.orgdjm2011-05-151-2/+2
|
* ECDH/ECDSA compliance fix: these methods vary the hash function they usedjm2010-09-091-4/+4
| | | | | | | | | | | | | (SHA256/384/512) depending on the length of the curve in use. The previous code incorrectly used SHA256 in all cases. This fix will cause authentication failure when using 384 or 521-bit curve keys if one peer hasn't been upgraded and the other has. (256-bit curve keys work ok). In particular you may need to specify HostkeyAlgorithms when connecting to a server that has not been upgraded from an upgraded client. ok naddy@
* Implement Elliptic Curve Cryptography modes for key exchange (ECDH) anddjm2010-08-311-1/+2
| | | | | | | | | | | | | | | | | host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA offer better performance than plain DH and DSA at the same equivalent symmetric key length, as well as much shorter keys. Only the mandatory sections of RFC5656 are implemented, specifically the three REQUIRED curves nistp256, nistp384 and nistp521 and only ECDH and ECDSA. Point compression (optional in RFC5656 is NOT implemented). Certificate host and user keys using the new ECDSA key types are supported. Note that this code has not been tested for interoperability and may be subject to change. feedback and ok markus@
* s/timing_safe_cmp/timingsafe_bcmp/gdjm2010-07-131-6/+6
|
* implement a timing_safe_cmp() function to compare memory without leakingdjm2010-07-131-8/+8
| | | | | | timing information by short-circuiting like memcmp() and use it for some of the more sensitive comparisons (though nothing high-value was readily attackable anyway); "looks ok" markus@
* Hold authentication debug messages until after successful authentication.dtucker2010-03-071-17/+1
| | | | | Fixes an info leak of environment variables specified in authorized_keys, reported by Jacob Appelbaum. ok djm@
* Add support for certificate key types for users and hosts.djm2010-02-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | OpenSSH certificate key types are not X.509 certificates, but a much simpler format that encodes a public key, identity information and some validity constraints and signs it with a CA key. CA keys are regular SSH keys. This certificate style avoids the attack surface of X.509 certificates and is very easy to deploy. Certified host keys allow automatic acceptance of new host keys when a CA certificate is marked as trusted in ~/.ssh/known_hosts. see VERIFYING HOST KEYS in ssh(1) for details. Certified user keys allow authentication of users when the signing CA key is marked as trusted in authorized_keys. See "AUTHORIZED_KEYS FILE FORMAT" in sshd(8) for details. Certificates are minted using ssh-keygen(1), documentation is in the "CERTIFICATES" section of that manpage. Documentation on the format of certificates is in the file PROTOCOL.certkeys feedback and ok markus@
* Fix warnings found by chl@ and djm@ and change roaming_atomicio'sandreas2009-06-121-1/+2
| | | | | return type to match atomicio's Diff from djm@, ok markus@