summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* move advance_past_options to authfile.c and make it public;djm2019-09-033-26/+27
| | | | ok markus@
* move skip_space() to misc.c and make it public; ok markus@djm2019-09-033-13/+14
|
* authfd: add function to check if key is in agentdjm2019-09-032-2/+29
| | | | | | | This commit adds a helper function which allows the caller to check if a given public key is present in ssh-agent. work by Sebastian Kinne; ok markus@
* fix memleak in ssh_free_identitylist(); ok markus@djm2019-09-031-1/+3
|
* factor out confirm_overwrite(); ok markus@djm2019-09-031-11/+27
|
* constify an argumentdjm2019-09-021-2/+2
|
* downgrade PKCS#11 "provider returned no slots" warning from log leveldjm2019-09-021-2/+2
| | | | | error to debug. This is common when attempting to enumerate keys on smartcard readers with no cards plugged in. bz#3058 ok dtucker@
* print comment when printing pubkey from privatedjm2019-09-011-7/+13
| | | | bz#3052; ok dtucker
* Call comma-separated lists as such to clarify semanticskn2019-08-161-10/+10
| | | | | | | | | | | | | Options such as Ciphers take values that may be a list of ciphers; the complete list, not indiviual elements, may be prefixed with a dash or plus character to remove from or append to the default list respectively. Users might read the current text as if each elment took an optional prefix, so tweak the wording from "values" to "list" to prevent such ambiguity for all options supporting this semantics (those that provide a list of available elements via "ssh -Q ..."). Input and OK jmc
* include sshbuf-misc.c in SRCS_BASEdjm2019-08-161-2/+2
|
* switch percent_expand() to use sshbuf instead of a limited fixed buffer;djm2019-08-161-15/+24
| | | | ok markus@
* produce a useful error message if the user's shell is set incorrectlydjm2019-08-091-1/+6
| | | | | during "match exec" processing. bz#2791 reported by Dario Bertini; ok dtucker
* Change description of TCPKeepAlive from "inactive" to "unresponsive"dtucker2019-08-092-6/+6
| | | | | to clarify what it checks for. Patch from jblaine at kickflop.net via github pr#129, ok djm@.
* Allow the maximimum uint32 value for the argument passed to -b whichdtucker2019-08-081-4/+5
| | | | allows better error messages from later validation. bz#3050, ok djm@
* Many key types are supported now, so take care to check the sizenaddy2019-08-051-13/+15
| | | | | | restrictions and apply the default size only to the matching key type. tweak and ok dtucker@
* Remove now-redundant perm_ok arg since sshkey_load_private_type willdtucker2019-08-053-22/+14
| | | | | now return SSH_ERR_KEY_BAD_PERMISSIONS in that case. Patch from jitendra.sharma at intel.com, ok djm@
* typo; from Christian Hessedjm2019-08-021-3/+3
|
* let sshbuf_find/cmp take a void* for the search/comparisondjm2019-07-302-7/+6
| | | | argument, instead of a u_char*. Saves callers needing to cast.
* When using a combination of a Yubikey+GnuPG+remote forwarding the gpg-agentmestre2019-07-241-2/+2
| | | | | | | | | | | | | | (and options ControlMaster+RemoteForward in ssh_config(5)) then the codepath taken will call mux_client_request_session -> mm_send_fd -> sendmsg(2). Since sendmsg(2) is not allowed in that codepath then pledge(2) kills the process. The solution is to add "sendfd" to pledge(2), which is not too bad considering a little bit later we reduce pledge(2) to only "stdio proc tty" in that codepath. Problem reported and diff provided by Timothy Brown <tbrown at freeshell.org> OK deraadt@
* Fix typo in CASignatureAlgorithms wherein what should be a comma is a dot.dtucker2019-07-231-3/+3
| | | | Patch from hnj2 via github pr#141.
* Accept the verbose flag when searching for host keys in known hostsdjm2019-07-192-4/+13
| | | | | (i.e. "ssh-keygen -vF host") to print the matching host's random- art signature too. bz#3003 "amusing, pretty" deraadt@
* fix off-by-one in sshbuf_dtob64() base64 wrapping that could causedjm2019-07-181-2/+2
| | | | | extra newlines to be appended at the end of the base64 text (ugly, but harmless). Found and fixed by Sebastian Kinne
* remove mostly vestigal uuencode.[ch]; moving the only uniquedjm2019-07-168-187/+85
| | | | | functionality there (wrapping of base64-encoded data) to sshbuf functions; feedback and ok markus@
* support PKCS8 as an optional format for storage of private keys,djm2019-07-155-41/+86
| | | | | | | | | | | | enabled via "ssh-keygen -m PKCS8" on operations that save private keys to disk. The OpenSSH native key format remains the default, but PKCS8 is a superior format to PEM if interoperability with non-OpenSSH software is required, as it may use a less terrible KDF (IIRC PEM uses a single round of MD5 as a KDF). adapted from patch by Jakub Jelen via bz3013; ok markus
* two more bounds-checking sshbuf counterparts to common stringdjm2019-07-152-2/+66
| | | | | | operations: sshbuf_cmp() (bcmp-like) and sshbuf_find() (memmem like) feedback and ok markus@
* add some functions to perform random-access read/write operationsdjm2019-07-142-3/+183
| | | | | | | inside buffers with bounds checking. Intended to replace manual pointer arithmetic wherever possible. feedback and ok markus@
* include SHA2-variant RSA key algorithms in KEX proposal; allowsdjm2019-07-121-2/+7
| | | | | ssh-keyscan to harvest keys from servers that disable olde SHA1 ssh-rsa. bz#3029 from Jakub Jelen
* print explicit "not modified" message if a file was requested fordjm2019-07-121-3/+6
| | | | | | resumed download but was considered already complete. bz#2978 ok dtucker
* Fix a typo and make <esc><right> move right to the closest end of a wordtb2019-07-101-2/+2
| | | | | | just like <esc><left> moves left to the closest beginning of a word. ok djm
* cap the number of permiopen/permitlisten directives we're willing todjm2019-07-092-3/+6
| | | | parse on a single authorized_keys line; ok deraadt@
* Remove some set but never used variables. ok daraadt@dtucker2019-07-075-18/+12
|
* still compile uuencode.c, unbreaks buildderaadt2019-07-051-2/+2
|
* revert header removal that snuck into previousdjm2019-07-051-1/+2
|
* add a local implementation of BSD realpath() for sftp-server usedjm2019-07-056-10/+235
| | | | | | ahead of OpenBSD's realpath changing to match POSIX; ok deraadt@ (thanks for snaps testing)
* fatal() if getgrnam() cannot find "tty"deraadt2019-07-041-1/+3
|
* stat() returns precisely -1 to indicate errorderaadt2019-07-041-2/+2
|
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-2/+2
|
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-2831-247/+247
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* asprintf returns -1, not an arbitrary value < 0. Also upon error thederaadt2019-06-281-2/+2
| | | | | | | (very sloppy specification) leaves an undefined value in *ret, so it is wrong to inspect it, the error condition is enough. discussed a little with nicm, and then much more with millert until we were exasperated
* oops, from asouderaadt2019-06-281-2/+2
|
* Some asprintf() calls were checked < 0, rather than the precise == -1.deraadt2019-06-274-14/+14
| | | | ok millert nicm tb, etc
* fix NULL deference (bzero) on error path added in last commit;djm2019-06-271-2/+2
| | | | | | spotted by Reynir Björnsson ok deraadt@ markus@ tb@
* Remove unneeded unlink of xauthfile on error path. From Erik Sjölund viadtucker2019-06-261-2/+1
| | | | github, ok djm@ deraadt@
* fix mismatch proto/decl from key shielding change; spotted via oss-fuzzdjm2019-06-231-2/+2
|
* Add protection for private keys at rest in RAM against speculationdjm2019-06-2111-41/+324
| | | | | | | | | | | | | | | | | | | | | | | and memory sidechannel attacks like Spectre, Meltdown, Rowhammer and Rambleed. This change encrypts private keys when they are not in use with a symmetic key that is derived from a relatively large "prekey" consisting of random data (currently 16KB). Attackers must recover the entire prekey with high accuracy before they can attempt to decrypt the shielded private key, but the current generation of attacks have bit error rates that, when applied cumulatively to the entire prekey, make this unlikely. Implementation-wise, keys are encrypted "shielded" when loaded and then automatically and transparently unshielded when used for signatures or when being saved/serialised. Hopefully we can remove this in a few years time when computer architecture has become less unsafe. been in snaps for a bit already; thanks deraadt@ ok dtucker@ deraadt@
* print the correct AuthorizedPrincipalsCommand rather than andjm2019-06-211-3/+3
| | | | uninitialised variable; spotted by dtucker@
* from tim:jmc2019-06-192-22/+30
| | | | | | | | | | | | | | | | | | - for reput, it is remote-path which is optional, not local-path - sync help from deraadt: - prefer -R and undocument -r (but add a comment for future editors) from schwarze: - prefer -p and undocument -P (as above. the comment was schwarze's too) more: - add the -f flag to reput and reget - sort help (i can;t remember who suggested this originally) djm and deraadt were ok with earlier versions of this; tim and schwarze ok
* slightly more instructive error message when the user specifies multipledjm2019-06-141-3/+6
| | | | -J options on the commandline. bz3015 ok dtucker@
* process agent requests for RSA certificate private keys using correctdjm2019-06-141-1/+6
| | | | | signature algorithm when requested. Patch from Jakub Jelen in bz3016 ok dtucker markus
* for public key authentication, check AuthorizedKeysFiles files beforedjm2019-06-141-11/+18
| | | | consulting AuthorizedKeysCommand; ok dtucker markus