OpenBSD CVS

CVS log for src/usr.bin/ssh/kex.c


[BACK] Up to [local] / src / usr.bin / ssh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.186 / (download) - annotate - [select for diffs], Fri May 17 00:30:23 2024 UTC (2 hours, 18 minutes ago) by djm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.185: +10 -250 lines
Diff to previous 1.185 (colored)

Start the process of splitting sshd into separate binaries. This step
splits sshd into a listener and a session binary. More splits are
planned.

After this changes, the listener binary will validate the configuration,
load the hostkeys, listen on port 22 and manage MaxStartups only. All
session handling will be performed by a new sshd-session binary that the
listener fork+execs.

This reduces the listener process to the minimum necessary and sets us
up for future work on the sshd-session binary.

feedback/ok markus@ deraadt@

NB. if you're updating via source, please restart sshd after installing,
otherwise you run the risk of locking yourself out.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jan 8 00:34:33 2024 UTC (4 months, 1 week ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.184: +27 -4 lines
Diff to previous 1.184 (colored)

remove ext-info-* in the kex.c code, not in callers; with/ok markus@

Revision 1.178.4.1 / (download) - annotate - [select for diffs], Mon Dec 18 14:57:43 2023 UTC (4 months, 4 weeks ago) by bluhm
Branch: OPENBSD_7_3
Changes since 1.178: +56 -28 lines
Diff to previous 1.178 (colored) next main 1.179 (colored)

implement "strict key exchange" in ssh and sshd

This adds a protocol extension to improve the integrity of the SSH
transport protocol, particular in and around the initial key exchange
(KEX) phase.

Full details of the extension are in the PROTOCOL file.

from djm@; with markus@

this is errata/7.3/024_ssh.patch.sig

Revision 1.181.2.1 / (download) - annotate - [select for diffs], Mon Dec 18 14:56:35 2023 UTC (4 months, 4 weeks ago) by bluhm
Branch: OPENBSD_7_4
Changes since 1.181: +56 -28 lines
Diff to previous 1.181 (colored) next main 1.182 (colored)

implement "strict key exchange" in ssh and sshd

This adds a protocol extension to improve the integrity of the SSH
transport protocol, particular in and around the initial key exchange
(KEX) phase.

Full details of the extension are in the PROTOCOL file.

from djm@; with markus@

this is errata/7.4/011_ssh.patch.sig

Revision 1.184 / (download) - annotate - [select for diffs], Mon Dec 18 14:45:49 2023 UTC (4 months, 4 weeks ago) by djm
Branch: MAIN
Changes since 1.183: +187 -46 lines
Diff to previous 1.183 (colored)

add "ext-info-in-auth@openssh.com" extension

This adds another transport protocol extension to allow a sshd to send
SSH2_MSG_EXT_INFO during user authentication, after the server has
learned the username that is being logged in to.

This lets sshd to update the acceptable signature algoritms for public
key authentication, and allows these to be varied via sshd_config(5)
"Match" directives, which are evaluated after the server learns the
username being authenticated.

Full details in the PROTOCOL file

Revision 1.183 / (download) - annotate - [select for diffs], Mon Dec 18 14:45:17 2023 UTC (4 months, 4 weeks ago) by djm
Branch: MAIN
Changes since 1.182: +56 -28 lines
Diff to previous 1.182 (colored)


implement "strict key exchange" in ssh and sshd

This adds a protocol extension to improve the integrity of the SSH
transport protocol, particular in and around the initial key exchange
(KEX) phase.

Full details of the extension are in the PROTOCOL file.

with markus@

Revision 1.182 / (download) - annotate - [select for diffs], Wed Oct 11 04:46:29 2023 UTC (7 months ago) by djm
Branch: MAIN
Changes since 1.181: +2 -2 lines
Diff to previous 1.181 (colored)

s/%.100s/%s/ in SSH- banner construction as there's no reason to
limit its size: the version string bring included is a compile time
constant going into an allocated banner string.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Aug 28 03:28:43 2023 UTC (8 months, 2 weeks ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE
Branch point for: OPENBSD_7_4
Changes since 1.180: +34 -13 lines
Diff to previous 1.180 (colored)

Introduce a transport-level ping facility

This adds a pair of SSH transport protocol messages SSH2_MSG_PING/PONG
to implement a ping capability. These messages use numbers in the "local
extensions" number space and are advertised using a "ping@openssh.com"
ext-info message with a string version number of "0".

ok markus@

Revision 1.180 / (download) - annotate - [select for diffs], Mon Aug 21 21:16:18 2023 UTC (8 months, 3 weeks ago) by tobhe
Branch: MAIN
Changes since 1.179: +5 -5 lines
Diff to previous 1.179 (colored)

Log errors in kex_exchange_identification() with level verbose instead
of error to reduce preauth log spam. All of those get logged with a more
generic error message by sshpkt_fatal().

feedback from sthen@
ok djm@

Revision 1.179 / (download) - annotate - [select for diffs], Fri Aug 18 01:37:41 2023 UTC (8 months, 4 weeks ago) by djm
Branch: MAIN
Changes since 1.178: +2 -2 lines
Diff to previous 1.178 (colored)

fix regression in OpenSSH 9.4 (mux.c r1.99) that caused multiplexed
sessions to ignore SIGINT under some circumstances. Reported by /
feedback naddy@, ok dtucker@

Revision 1.178 / (download) - annotate - [select for diffs], Sun Mar 12 10:40:39 2023 UTC (14 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE
Branch point for: OPENBSD_7_3
Changes since 1.177: +6 -1 lines
Diff to previous 1.177 (colored)

Put upper bound on number of entries in SSH2_MSG_EXT_INFO request.
This is already constrained by the maximum SSH packet size but this
makes it explicit.  Prompted by Coverity CID 291868, ok djm@ markus@

Revision 1.177 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:12 2023 UTC (14 months, 1 week ago) by guenther
Branch: MAIN
Changes since 1.176: +1 -3 lines
Diff to previous 1.176 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.176 / (download) - annotate - [select for diffs], Mon Mar 6 12:14:48 2023 UTC (14 months, 1 week ago) by dtucker
Branch: MAIN
Changes since 1.175: +58 -1 lines
Diff to previous 1.175 (colored)

Refactor creation of KEX proposal.

This adds kex_proposal_populate_entries (and corresponding free) which
populates the KEX proposal array with dynamically allocated strings.
This replaces the previous mix of static and dynamic that has been the
source of previous leaks and bugs.  Remove unused compat functions.
With & ok djm@.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Feb 28 21:31:50 2023 UTC (14 months, 2 weeks ago) by dtucker
Branch: MAIN
Changes since 1.174: +2 -2 lines
Diff to previous 1.174 (colored)

fatal out if allocating banner string fails to avoid potential null
deref later in sscanf.  Spotted by Coverity, ok deraadt@

Revision 1.174 / (download) - annotate - [select for diffs], Fri Feb 17 04:22:50 2023 UTC (14 months, 4 weeks ago) by dtucker
Branch: MAIN
Changes since 1.173: +1 -5 lines
Diff to previous 1.173 (colored)

Remove now-unused compat bit SSH_BUG_RSASIGMD5.  The code to set this
was removed in OpenSSH 7.7 when support for SSH implementations dating
back to before RFC standardization were removed.  "burn it all" djm@

Revision 1.173 / (download) - annotate - [select for diffs], Mon Nov 7 10:05:38 2022 UTC (18 months, 1 week ago) by dtucker
Branch: MAIN
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored)

Remove some set but otherwise unused variables, spotted in -portable by
clang 16's -Wunused-but-set-variable.  ok djm@

Revision 1.172 / (download) - annotate - [select for diffs], Tue Feb 1 23:32:51 2022 UTC (2 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.171: +2 -2 lines
Diff to previous 1.171 (colored)

mark const string array contents const too, i.e.
static const char *array => static const char * const array
from Mike Frysinger

Revision 1.171 / (download) - annotate - [select for diffs], Thu Jan 6 21:55:23 2022 UTC (2 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.170: +23 -1 lines
Diff to previous 1.170 (colored)

Fix signature algorithm selection logic for UpdateHostkeys on the
server side. The previous code tried to prefer RSA/SHA2 for hostkey
proofs of RSA keys, but missed some cases. This will use RSA/SHA2
signatures for RSA keys if the client proposed these algorithms in
initial KEX. bz3375

Mostly by Dmitry Belyavskiy with some tweaks by me.

ok markus@

Revision 1.170 / (download) - annotate - [select for diffs], Sun Dec 19 22:13:12 2021 UTC (2 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.169: +20 -2 lines
Diff to previous 1.169 (colored)

EXT_INFO negotiation of hostbound pubkey auth

the EXT_INFO packet gets a new publickey-hostbound@openssh.com to
advertise the hostbound public key method.

Client side support to parse this feature flag and set the kex->flags
indicator if the expected version is offered (currently "0").

ok markus@

Revision 1.169 / (download) - annotate - [select for diffs], Sun Dec 19 22:08:06 2021 UTC (2 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.168: +3 -1 lines
Diff to previous 1.168 (colored)

Record session ID, host key and sig at intital KEX

These will be used later for agent session ID / hostkey binding

ok markus@

Revision 1.168 / (download) - annotate - [select for diffs], Sat Apr 3 06:18:40 2021 UTC (3 years, 1 month ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.167: +2 -2 lines
Diff to previous 1.167 (colored)

highly polished whitespace, mostly fixing spaces-for-tab and bad
indentation on continuation lines. Prompted by GHPR#185

Revision 1.167 / (download) - annotate - [select for diffs], Sun Jan 31 22:55:29 2021 UTC (3 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.166: +2 -2 lines
Diff to previous 1.166 (colored)

more strictly enforce KEX state-machine by banning packet types
once they are received. Fixes memleak caused by duplicate
SSH2_MSG_KEX_DH_GEX_REQUEST (spotted by portable OpenSSH kex_fuzz
via oss-fuzz #30078).

ok markus@

Revision 1.166 / (download) - annotate - [select for diffs], Wed Jan 27 23:49:46 2021 UTC (3 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.165: +6 -4 lines
Diff to previous 1.165 (colored)

fix leak: was double allocating kex->session_id buffer

Revision 1.165 / (download) - annotate - [select for diffs], Wed Jan 27 10:05:28 2021 UTC (3 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.164: +12 -10 lines
Diff to previous 1.164 (colored)

make ssh->kex->session_id a sshbuf instead of u_char*/size_t and
use that instead of global variables containing copies of it.
feedback/ok markus@

Revision 1.164 / (download) - annotate - [select for diffs], Wed Jan 27 09:26:54 2021 UTC (3 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.163: +2 -2 lines
Diff to previous 1.163 (colored)

remove global variable used to stash compat flags and use the
purpose-built ssh->compat variable instead; feedback/ok markus@

Revision 1.163 / (download) - annotate - [select for diffs], Tue Dec 29 00:59:15 2020 UTC (3 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

Update/replace the experimental post-quantim hybrid key exchange
method based on Streamlined NTRU Prime (coupled with X25519).

The previous sntrup4591761x25519-sha512@tinyssh.org method is
replaced with sntrup761x25519-sha512@openssh.com. Per the authors,
sntrup4591761 was replaced almost two years ago by sntrup761.

The sntrup761 implementaion, like sntrup4591761 before it, is public
domain code extracted from the SUPERCOP cryptography benchmark
suite (https://bench.cr.yp.to/supercop.html).

Thanks for Daniel J Bernstein for guidance on algorithm selection.
Patch from Tobias Heider; feedback & ok markus@ and myself

(note this both the updated method and the one that it replaced are
disabled by default)

Revision 1.162 / (download) - annotate - [select for diffs], Fri Dec 4 02:27:57 2020 UTC (3 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.161: +2 -1 lines
Diff to previous 1.161 (colored)

fix minor memleak of kex->hostkey_alg on rekex

Revision 1.161 / (download) - annotate - [select for diffs], Fri Dec 4 02:27:08 2020 UTC (3 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.160: +3 -3 lines
Diff to previous 1.160 (colored)

typos: s/hex/kex/ in error messages

Revision 1.160 / (download) - annotate - [select for diffs], Sun Oct 18 11:32:01 2020 UTC (3 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.159: +47 -53 lines
Diff to previous 1.159 (colored)

use the new variant log macros instead of prepending __func__ and
appending ssh_err(r) manually; ok markus@

Revision 1.159 / (download) - annotate - [select for diffs], Sun Jul 5 23:59:45 2020 UTC (3 years, 10 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored)

some language improvements; ok markus

Revision 1.158 / (download) - annotate - [select for diffs], Fri Mar 13 04:01:56 2020 UTC (4 years, 2 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.157: +11 -3 lines
Diff to previous 1.157 (colored)

use sshpkt_fatal() for kex_exchange_identification() errors.
This ensures that the logged errors are consistent with other transport-
layer errors and that the relevant IP addresses are logged. bz3129
ok dtucker@

Revision 1.157 / (download) - annotate - [select for diffs], Wed Feb 26 13:40:09 2020 UTC (4 years, 2 months ago) by jsg
Branch: MAIN
Changes since 1.156: +2 -3 lines
Diff to previous 1.156 (colored)

change explicit_bzero();free() to freezero()

While freezero() returns early if the pointer is NULL the tests for
NULL in callers are left to avoid warnings about passing an
uninitialised size argument across a function boundry.

ok deraadt@ djm@

Revision 1.156 / (download) - annotate - [select for diffs], Thu Jan 23 10:24:29 2020 UTC (4 years, 3 months ago) by dtucker
Branch: MAIN
Changes since 1.155: +5 -2 lines
Diff to previous 1.155 (colored)

Make zlib optional.  This adds a "ZLIB" build time option that allows
building without zlib compression and associated options.  With feedback
from markus@, ok djm@

Revision 1.155 / (download) - annotate - [select for diffs], Tue Oct 8 22:40:39 2019 UTC (4 years, 7 months ago) by dtucker
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

Correct type for end-of-list sentinel; fixes initializer warnings on
some platforms.  ok deraadt.

Revision 1.154 / (download) - annotate - [select for diffs], Fri Sep 6 14:45:34 2019 UTC (4 years, 8 months ago) by naddy
Branch: MAIN
Changes since 1.153: +12 -3 lines
Diff to previous 1.153 (colored)

Allow prepending a list of algorithms to the default set by starting
the list with the '^' character, e.g.

HostKeyAlgorithms ^ssh-ed25519
Ciphers ^aes128-gcm@openssh.com,aes256-gcm@openssh.com

ok djm@ dtucker@

Revision 1.153 / (download) - annotate - [select for diffs], Fri Sep 6 01:58:50 2019 UTC (4 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.152: +5 -2 lines
Diff to previous 1.152 (colored)

better error code for bad arguments; inspired by
https://github.com/openssh/openssh-portable/pull/144 by Ed Maste

Revision 1.152 / (download) - annotate - [select for diffs], Thu Sep 5 09:35:19 2019 UTC (4 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.151: +60 -20 lines
Diff to previous 1.151 (colored)

sprinkle in some explicit errors here, otherwise the percolate all
the way up to dispatch_run_fatal() and lose all meaninful context

to help with bz#3063; ok dtucker@

Revision 1.151 / (download) - annotate - [select for diffs], Thu Sep 5 09:25:13 2019 UTC (4 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.150: +4 -3 lines
Diff to previous 1.150 (colored)

only send ext_info for KEX_INITIAL; bz#2929 ok dtucker

Revision 1.150 / (download) - annotate - [select for diffs], Mon Jan 21 12:08:13 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.149: +2 -2 lines
Diff to previous 1.149 (colored)

fix reversed arguments to kex_load_hostkey(); manifested as errors in
cert-hostkey.sh regress failures.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Jan 21 10:40:11 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.148: +2 -2 lines
Diff to previous 1.148 (colored)

rename kex->kem_client_pub -> kex->client_pub now that KEM has been renamed
to kexgen

from markus@ ok djm@

Revision 1.148 / (download) - annotate - [select for diffs], Mon Jan 21 10:33:49 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.147: +1 -18 lines
Diff to previous 1.147 (colored)

remove kex_derive_keys_bn wrapper; no unused since the DH-like KEX
methods have moved to KEM

from markus@ ok djm@

Revision 1.147 / (download) - annotate - [select for diffs], Mon Jan 21 10:20:12 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.146: +5 -2 lines
Diff to previous 1.146 (colored)

Add support for a PQC KEX/KEM: sntrup4591761x25519-sha512@tinyssh.org
using the Streamlined NTRU Prime 4591^761 implementation from SUPERCOP
coupled with X25519 as a stop-loss. Not enabled by default.

introduce KEM API; a simplified framework for DH-ish KEX methods.

from markus@ feedback & ok djm@

Revision 1.146 / (download) - annotate - [select for diffs], Mon Jan 21 10:07:22 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.145: +17 -1 lines
Diff to previous 1.145 (colored)

factor out kex_verify_hostkey() - again, duplicated almost exactly
across client and server for several KEX methods.

from markus@ ok djm@

Revision 1.145 / (download) - annotate - [select for diffs], Mon Jan 21 10:05:09 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.144: +19 -1 lines
Diff to previous 1.144 (colored)

factor out kex_load_hostkey() - this is duplicated in both the client and
server implementations for most KEX methods.

from markus@ ok djm@

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jan 21 09:55:52 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.143: +9 -1 lines
Diff to previous 1.143 (colored)

save the derived session id in kex_derive_keys() rather than making each
kex method implementation do it.

from markus@ ok djm@

Revision 1.143 / (download) - annotate - [select for diffs], Thu Dec 27 03:25:25 2018 UTC (5 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.142: +267 -26 lines
Diff to previous 1.142 (colored)

move client/server SSH-* banners to buffers under ssh->kex and factor
out the banner exchange. This eliminates some common code from the
client and server.

Also be more strict about handling \r characters - these should only
be accepted immediately before \n (pointed out by Jann Horn).

Inspired by a patch from Markus Schmidt.
(lots of) feedback and ok markus@

Revision 1.142 / (download) - annotate - [select for diffs], Fri Dec 7 03:39:40 2018 UTC (5 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored)

only consider the ext-info-c extension during the initial KEX. It shouldn't
be sent in subsequent ones, but if it is present we should ignore it.

This prevents sshd from sending a SSH_MSG_EXT_INFO for REKEX for buggy
these clients. Reported by Jakub Jelen via bz2929; ok dtucker@

Revision 1.141 / (download) - annotate - [select for diffs], Mon Jul 9 13:37:10 2018 UTC (5 years, 10 months ago) by sf
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.140: +3 -1 lines
Diff to previous 1.140 (colored)

Revert previous two commits

It turns out we still support pre-auth compression on the client.
Therefore revert the previous two commits:

date: 2018/07/06 09:06:14;  author: sf;  commitid: yZVYKIRtUZWD9CmE;
  Rename COMP_DELAYED to COMP_ZLIB

  Only delayed compression is supported nowadays.

  ok markus@

date: 2018/07/06 09:05:01;  author: sf;  commitid: rEGuT5UgI9f6kddP;
  Remove leftovers from pre-authentication compression

  Support for this has been removed in 2016.
  COMP_DELAYED will be renamed in a later commit.

  ok markus@

Revision 1.140 / (download) - annotate - [select for diffs], Fri Jul 6 09:06:14 2018 UTC (5 years, 10 months ago) by sf
Branch: MAIN
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored)

Rename COMP_DELAYED to COMP_ZLIB

Only delayed compression is supported nowadays.

ok markus@

Revision 1.139 / (download) - annotate - [select for diffs], Fri Jul 6 09:05:01 2018 UTC (5 years, 10 months ago) by sf
Branch: MAIN
Changes since 1.138: +1 -3 lines
Diff to previous 1.138 (colored)

Remove leftovers from pre-authentication compression

Support for this has been removed in 2016.
COMP_DELAYED will be renamed in a later commit.

ok markus@

Revision 1.138 / (download) - annotate - [select for diffs], Wed Jul 4 13:49:31 2018 UTC (5 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.137: +78 -17 lines
Diff to previous 1.137 (colored)

repair PubkeyAcceptedKeyTypes (and friends) after RSA signature work -
returns ability to add/remove/specify algorithms by wildcard.

Algorithm lists are now fully expanded when the server/client configs
are finalised, so errors are reported early and the config dumps
(e.g. "ssh -G ...") now list the actual algorithms selected.

Clarify that, while wildcards are accepted in algorithm lists, they
aren't full pattern-lists that support negation.

(lots of) feedback, ok markus@

Revision 1.137 / (download) - annotate - [select for diffs], Tue Jul 3 11:39:54 2018 UTC (5 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.136: +5 -12 lines
Diff to previous 1.136 (colored)

Improve strictness and control over RSA-SHA2 signature types:

In ssh, when an agent fails to return a RSA-SHA2 signature when
requested and falls back to RSA-SHA1 instead, retry the signature to
ensure that the public key algorithm sent in the SSH_MSG_USERAUTH
matches the one in the signature itself.

In sshd, strictly enforce that the public key algorithm sent in the
SSH_MSG_USERAUTH message matches what appears in the signature.

Make the sshd_config PubkeyAcceptedKeyTypes and
HostbasedAcceptedKeyTypes options control accepted signature algorithms
(previously they selected supported key types). This allows these
options to ban RSA-SHA1 in favour of RSA-SHA2.

Add new signature algorithms "rsa-sha2-256-cert-v01@openssh.com" and
"rsa-sha2-512-cert-v01@openssh.com" to force use of RSA-SHA2 signatures
with certificate keys.

feedback and ok markus@

Revision 1.136 / (download) - annotate - [select for diffs], Wed Feb 7 02:06:50 2018 UTC (6 years, 3 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.135: +3 -5 lines
Diff to previous 1.135 (colored)

Remove all guards for calls to OpenSSL free functions - all of these
functions handle NULL, from at least OpenSSL 1.0.1g onwards.

Prompted by dtucker@ asking about guards for RSA_free(), when looking at
openssh-portable pr#84 on github.

ok deraadt@ dtucker@

Revision 1.135 / (download) - annotate - [select for diffs], Tue Jan 23 05:27:21 2018 UTC (6 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.134: +2 -6 lines
Diff to previous 1.134 (colored)

Drop compatibility hacks for some ancient SSH implementations, including
ssh.com <=2.* and OpenSSH <= 3.*.

These versions were all released in or before 2001 and predate the
final SSH RFCs. The hacks in question aren't necessary for RFC-
compliant SSH implementations.

ok markus@

Revision 1.134 / (download) - annotate - [select for diffs], Tue Jun 13 12:13:59 2017 UTC (6 years, 11 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.133: +13 -5 lines
Diff to previous 1.133 (colored)

Do not require that unknown EXT_INFO extension values not contain
\0 characters. This would cause fatal connection errors if an
implementation sent e.g. string-encoded sub-values inside a value.

Reported by Denis Bider; ok markus@

Revision 1.133 / (download) - annotate - [select for diffs], Tue May 30 14:23:52 2017 UTC (6 years, 11 months ago) by markus
Branch: MAIN
Changes since 1.132: +6 -10 lines
Diff to previous 1.132 (colored)

protocol handlers all get struct ssh passed; ok djm@

Revision 1.132 / (download) - annotate - [select for diffs], Sun Apr 30 23:10:43 2017 UTC (7 years ago) by djm
Branch: MAIN
Changes since 1.131: +1 -42 lines
Diff to previous 1.131 (colored)

unifdef WITH_SSH1
ok markus@

Revision 1.131 / (download) - annotate - [select for diffs], Wed Mar 15 07:07:39 2017 UTC (7 years, 2 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.130: +3 -2 lines
Diff to previous 1.130 (colored)

disallow KEXINIT before NEWKEYS; ok djm; report by vegard.nossum at oracle.com

Revision 1.130 / (download) - annotate - [select for diffs], Fri Mar 10 04:07:20 2017 UTC (7 years, 2 months ago) by djm
Branch: MAIN
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

fix regression in 7.4 server-sig-algs, where we were accidentally
excluding SHA2 RSA signature methods. bz#2680, patch from Nuno
Goncalves; ok dtucker@

Revision 1.129 / (download) - annotate - [select for diffs], Fri Mar 10 03:45:40 2017 UTC (7 years, 2 months ago) by dtucker
Branch: MAIN
Changes since 1.128: +12 -5 lines
Diff to previous 1.128 (colored)

Plug some mem leaks mostly on error paths.  From jjelen at redhat.com
via bz#2687, ok djm@

Revision 1.128 / (download) - annotate - [select for diffs], Fri Feb 3 23:01:19 2017 UTC (7 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.127: +13 -8 lines
Diff to previous 1.127 (colored)

support =- for removing methods from algorithms lists, e.g.
Ciphers=-*cbc; suggested by Cristian Ionescu-Idbohrn in bz#2671
"I like it" markus@

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Mon Oct 10 19:37:33 2016 UTC (7 years, 7 months ago) by markus
Branch: OPENBSD_5_9
Changes since 1.117: +2 -1 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

MFC:
Unregister the KEXINIT handler after message has been received.
Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed.
Reported by shilei-c at 360.cn

Revision 1.118.4.1 / (download) - annotate - [select for diffs], Mon Oct 10 19:35:47 2016 UTC (7 years, 7 months ago) by markus
Branch: OPENBSD_6_0
Changes since 1.118: +2 -1 lines
Diff to previous 1.118 (colored) next main 1.119 (colored)

MFC:
Unregister the KEXINIT handler after message has been received.
Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed.
Reported by shilei-c at 360.cn

Revision 1.127 / (download) - annotate - [select for diffs], Mon Oct 10 19:28:48 2016 UTC (7 years, 7 months ago) by markus
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored)

Unregister the KEXINIT handler after message has been received.
Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed.
Reported by shilei-c at 360.cn

Revision 1.126 / (download) - annotate - [select for diffs], Wed Sep 28 21:44:52 2016 UTC (7 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.125: +3 -1 lines
Diff to previous 1.125 (colored)

put back some pre-auth zlib bits that I shouldn't have removed -
they are still used by the client. Spotted by naddy@

Revision 1.125 / (download) - annotate - [select for diffs], Wed Sep 28 20:32:42 2016 UTC (7 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.124: +1 -3 lines
Diff to previous 1.124 (colored)

restore pre-auth compression support in the client -- the previous
commit was intended to remove it from the server only.

remove a few server-side pre-auth compression bits that escaped

adjust wording of Compression directive in sshd_config(5)

pointed out by naddy@ ok markus@

Revision 1.124 / (download) - annotate - [select for diffs], Thu Sep 22 17:52:53 2016 UTC (7 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.123: +2 -1 lines
Diff to previous 1.123 (colored)

support plain curve25519-sha256 KEX algorithm now that it is
approaching standardisation (same algorithm is currently supported
as curve25519-sha256@libssh.org)

Revision 1.123 / (download) - annotate - [select for diffs], Wed Sep 21 19:53:12 2016 UTC (7 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.122: +2 -2 lines
Diff to previous 1.122 (colored)

correctly return errors from kex_send_ext_info(). Fix from Sami Farin
via https://github.com/openssh/openssh-portable/pull/50

Revision 1.122 / (download) - annotate - [select for diffs], Mon Sep 19 19:02:19 2016 UTC (7 years, 7 months ago) by markus
Branch: MAIN
Changes since 1.121: +3 -1 lines
Diff to previous 1.121 (colored)

move inbound NEWKEYS handling to kex layer; otherwise early NEWKEYS causes
NULL deref; found by Robert Swiecki/honggfuzz; fixed with & ok djm@

Revision 1.121 / (download) - annotate - [select for diffs], Mon Sep 12 23:31:27 2016 UTC (7 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.120: +10 -3 lines
Diff to previous 1.120 (colored)

list all supported signature algorithms in the server-sig-algs
Reported by mb AT smartftp.com in bz#2547 and (independantly)
Ron Frederick; ok markus@

Revision 1.120 / (download) - annotate - [select for diffs], Mon Sep 12 01:22:38 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.119: +10 -11 lines
Diff to previous 1.119 (colored)

Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions
rather than pulling <sys/param.h> and unknown namespace pollution.
ok djm markus dtucker

Revision 1.119 / (download) - annotate - [select for diffs], Tue Sep 6 09:14:05 2016 UTC (7 years, 8 months ago) by markus
Branch: MAIN
Changes since 1.118: +3 -5 lines
Diff to previous 1.118 (colored)

update ext_info_c every time we receive a kexinit msg; fixes sending of
ext_info if privsep is disabled; report Aris Adamantiadis & Mancha; ok djm@

Revision 1.118 / (download) - annotate - [select for diffs], Mon May 2 10:26:04 2016 UTC (8 years ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE
Branch point for: OPENBSD_6_0
Changes since 1.117: +5 -2 lines
Diff to previous 1.117 (colored)

add support for additional fixed DH groups from
draft-ietf-curdle-ssh-kex-sha2-03

diffie-hellman-group14-sha256 (2K group)
diffie-hellman-group16-sha512 (4K group)
diffie-hellman-group18-sha512 (8K group)

based on patch from Mark D. Baushke and Darren Tucker
ok markus@

Revision 1.117 / (download) - annotate - [select for diffs], Mon Feb 8 10:57:07 2016 UTC (8 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE
Branch point for: OPENBSD_5_9
Changes since 1.116: +20 -1 lines
Diff to previous 1.116 (colored)

refactor activation of rekeying

This makes automatic rekeying internal to the packet code (previously
the server and client loops needed to assist). In doing to it makes
application of rekey limits more accurate by accounting for packets
about to be sent as well as packets queued during rekeying events
themselves.

Based on a patch from dtucker@ which was in turn based on a patch
Aleksander Adamowski in bz#2521; ok markus@

Revision 1.116 / (download) - annotate - [select for diffs], Thu Jan 14 16:17:39 2016 UTC (8 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.115: +1 -13 lines
Diff to previous 1.115 (colored)

remove roaming support; ok djm@

Revision 1.115 / (download) - annotate - [select for diffs], Sun Dec 13 22:42:23 2015 UTC (8 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.114: +4 -4 lines
Diff to previous 1.114 (colored)

unbreak connections with peers that set first_kex_follows;
fix from Matt Johnston va bz#2515

Revision 1.114 / (download) - annotate - [select for diffs], Thu Dec 10 17:08:40 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.113: +2 -3 lines
Diff to previous 1.113 (colored)

Remove NULL-checks before free().

ok dtucker@

Revision 1.113 / (download) - annotate - [select for diffs], Fri Dec 4 16:41:28 2015 UTC (8 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.112: +75 -7 lines
Diff to previous 1.112 (colored)

implement SHA2-{256,512} for RSASSA-PKCS1-v1_5 signatures (user and host auth)
based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt;
with & ok djm@

Revision 1.112 / (download) - annotate - [select for diffs], Fri Nov 13 04:39:35 2015 UTC (8 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.111: +9 -2 lines
Diff to previous 1.111 (colored)

send SSH2_MSG_UNIMPLEMENTED replies to unexpected messages during
KEX; bz#2949, ok dtucker@

Revision 1.111 / (download) - annotate - [select for diffs], Tue Oct 13 00:21:27 2015 UTC (8 years, 7 months ago) by djm
Branch: MAIN
Changes since 1.110: +2 -2 lines
Diff to previous 1.110 (colored)

free the correct IV length, don't assume it's always the cipher
blocksize; ok dtucker@

Revision 1.110 / (download) - annotate - [select for diffs], Fri Aug 21 23:57:48 2015 UTC (8 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.109: +38 -19 lines
Diff to previous 1.109 (colored)

Improve printing of KEX offers and decisions

The debug output now labels the client and server offers and the
negotiated options. ok markus@

Revision 1.109 / (download) - annotate - [select for diffs], Thu Jul 30 00:01:34 2015 UTC (8 years, 9 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.108: +63 -1 lines
Diff to previous 1.108 (colored)

Allow ssh_config and sshd_config kex parameters options be prefixed
by a '+' to indicate that the specified items be appended to the
default rather than replacing it.

approach suggested by dtucker@, feedback dlg@, ok markus@

Revision 1.108 / (download) - annotate - [select for diffs], Wed Jul 29 08:34:54 2015 UTC (8 years, 9 months ago) by djm
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

fix bug in previous; was printing incorrect string for failed
host key algorithms negotiation

Revision 1.107 / (download) - annotate - [select for diffs], Wed Jul 29 04:43:06 2015 UTC (8 years, 9 months ago) by djm
Branch: MAIN
Changes since 1.106: +24 -7 lines
Diff to previous 1.106 (colored)

include the peer's offer when logging a failure to negotiate a
mutual set of algorithms (kex, pubkey, ciphers, etc.)
ok markus@

Revision 1.106 / (download) - annotate - [select for diffs], Fri Apr 17 13:25:52 2015 UTC (9 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.105: +3 -1 lines
Diff to previous 1.105 (colored)

don't try to cleanup NULL KEX proposals in kex_prop_free();
found by Jukka Taimisto and Markus Hietava

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jan 30 00:22:25 2015 UTC (9 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.104: +20 -9 lines
Diff to previous 1.104 (colored)

fix ssh protocol 1, spotted by miod@

Revision 1.104 / (download) - annotate - [select for diffs], Mon Jan 26 06:10:03 2015 UTC (9 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.103: +2 -1 lines
Diff to previous 1.103 (colored)

correctly match ECDSA subtype (== curve) for offered/recevied
host keys. Fixes connection-killing host key mismatches when
a server offers multiple ECDSA keys with different curve type
(an extremely unlikely configuration).

ok markus, "looks mechanical" deraadt@

Revision 1.103 / (download) - annotate - [select for diffs], Tue Jan 20 23:14:00 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

Reduce use of <sys/param.h> and transition to <limits.h> throughout.
ok djm markus

Revision 1.102 / (download) - annotate - [select for diffs], Mon Jan 19 20:16:15 2015 UTC (9 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.101: +335 -234 lines
Diff to previous 1.101 (colored)

adapt kex to sshbuf and struct ssh; ok djm@

Revision 1.101 / (download) - annotate - [select for diffs], Mon Jan 19 20:07:45 2015 UTC (9 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.100: +5 -3 lines
Diff to previous 1.100 (colored)

move dispatch to struct ssh; ok djm@

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jan 19 19:52:16 2015 UTC (9 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.99: +54 -33 lines
Diff to previous 1.99 (colored)

update packet.c & isolate, introduce struct ssh
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@

Revision 1.99 / (download) - annotate - [select for diffs], Tue Apr 29 18:01:49 2014 UTC (10 years ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.98: +9 -1 lines
Diff to previous 1.98 (colored)

make compiling against OpenSSL optional (make OPENSSL=no);
reduces algorithms to curve25519, aes-ctr, chacha, ed25519;
allows us to explore further options; with and ok djm

Revision 1.98 / (download) - annotate - [select for diffs], Sun Feb 2 03:44:31 2014 UTC (10 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored)

convert memset of potentially-private data to explicit_bzero()

Revision 1.97 / (download) - annotate - [select for diffs], Sat Jan 25 20:35:37 2014 UTC (10 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.96: +9 -11 lines
Diff to previous 1.96 (colored)

dh_need needs to be set to max(seclen, blocksize, ivlen, mac_len)
ok dtucker@, noted by mancha

Revision 1.96 / (download) - annotate - [select for diffs], Sat Jan 25 10:12:50 2014 UTC (10 years, 3 months ago) by dtucker
Branch: MAIN
Changes since 1.95: +6 -3 lines
Diff to previous 1.95 (colored)

Add a special case for the DH group size for 3des-cbc, which has an
effective strength much lower than the key size.  This causes problems
with some cryptlib implementations, which don't support group sizes larger
than 4k but also don't use the largest group size it does support as
specified in the RFC.  Based on a patch from Petr Lautrbach at Redhat,
reduced by me with input from Markus.  ok djm@ markus@

Revision 1.95 / (download) - annotate - [select for diffs], Sun Jan 12 08:13:13 2014 UTC (10 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.94: +18 -5 lines
Diff to previous 1.94 (colored)

avoid use of OpenSSL BIGNUM type and functions for KEX with
Curve25519 by adding a buffer_put_bignum2_from_string() that stores
a string using the bignum encoding rules. Will make it easier to
build a reduced-feature OpenSSH without OpenSSL in the future;
ok markus@

Revision 1.94 / (download) - annotate - [select for diffs], Thu Jan 9 23:20:00 2014 UTC (10 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.93: +52 -41 lines
Diff to previous 1.93 (colored)

Introduce digest API and use it to perform all hashing operations
rather than calling OpenSSL EVP_Digest* directly. Will make it easier
to build a reduced-feature OpenSSH without OpenSSL in future;
feedback, ok markus@

Revision 1.93 / (download) - annotate - [select for diffs], Thu Nov 7 11:58:27 2013 UTC (10 years, 6 months ago) by dtucker
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

Output the effective values of Ciphers, MACs and KexAlgorithms when
the default has not been overridden.  ok markus@

Revision 1.92 / (download) - annotate - [select for diffs], Sat Nov 2 21:59:15 2013 UTC (10 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored)

use curve25519 for default key exchange (curve25519-sha256@libssh.org);
initial patch from Aris Adamantiadis; ok djm@

Revision 1.91 / (download) - annotate - [select for diffs], Fri May 17 00:13:13 2013 UTC (11 years ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.90: +9 -9 lines
Diff to previous 1.90 (colored)

bye, bye xfree(); ok markus@

Revision 1.90 / (download) - annotate - [select for diffs], Fri Apr 19 12:07:08 2013 UTC (11 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.89: +1 -2 lines
Diff to previous 1.89 (colored)

remove duplicated list entry pointed out by naddy@

Revision 1.89 / (download) - annotate - [select for diffs], Fri Apr 19 01:06:50 2013 UTC (11 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.88: +57 -26 lines
Diff to previous 1.88 (colored)

add the ability to query supported ciphers, MACs, key type and KEX
algorithms to ssh. Includes some refactoring of KEX and key type handling
to be table-driven; ok markus@

Revision 1.88 / (download) - annotate - [select for diffs], Tue Jan 8 18:49:04 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.87: +11 -5 lines
Diff to previous 1.87 (colored)

support AES-GCM as defined in RFC 5647 (but with simpler KEX handling)
ok and feedback djm@

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 17 01:22:56 2012 UTC (11 years, 9 months ago) by djm
Branch: MAIN
Changes since 1.86: +13 -3 lines
Diff to previous 1.86 (colored)

add some comments about better handling first-KEX-follows notifications
from the server. Nothing uses these right now. No binary change

Revision 1.86 / (download) - annotate - [select for diffs], Wed Sep 22 05:01:29 2010 UTC (13 years, 7 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.85: +29 -1 lines
Diff to previous 1.85 (colored)

add a KexAlgorithms knob to the client and server configuration to allow
selection of which key exchange methods are used by ssh(1) and sshd(8)
and their order of preference.

ok markus@

Revision 1.85 / (download) - annotate - [select for diffs], Thu Sep 9 10:45:45 2010 UTC (13 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.84: +4 -4 lines
Diff to previous 1.84 (colored)

ECDH/ECDSA compliance fix: these methods vary the hash function they use
(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@

Revision 1.84 / (download) - annotate - [select for diffs], Tue Aug 31 11:54:45 2010 UTC (13 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.83: +7 -3 lines
Diff to previous 1.83 (colored)

Implement Elliptic Curve Cryptography modes for key exchange (ECDH) and
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@

Revision 1.83 / (download) - annotate - [select for diffs], Tue Aug 31 09:58:37 2010 UTC (13 years, 8 months ago) by djm
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Add buffer_get_cstring() and related functions that verify that the
string extracted from the buffer contains no embedded \0 characters*
This prevents random (possibly malicious) crap from being appended to
strings where it would not be noticed if the string is used with
a string(3) function.

Use the new API in a few sensitive places.

* actually, we allow a single one at the end of the string for now because
we don't know how many deployed implementations get this wrong, but don't
count on this to remain indefinitely.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Oct 24 11:13:54 2009 UTC (14 years, 6 months ago) by andreas
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.81: +12 -1 lines
Diff to previous 1.81 (colored)

Let the client detect if the server supports roaming by looking
for the resume@appgate.com kex algorithm.
ok markus@

Revision 1.81 / (download) - annotate - [select for diffs], Wed May 27 06:34:36 2009 UTC (14 years, 11 months ago) by andreas
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.80: +1 -3 lines
Diff to previous 1.80 (colored)

Move the KEX_COOKIE_LEN define to kex.h
ok markus@

Revision 1.80 / (download) - annotate - [select for diffs], Sat Sep 6 12:24:13 2008 UTC (15 years, 8 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.79: +2 -4 lines
Diff to previous 1.79 (colored)

OpenSSL 0.9.8h supplies a real EVP_sha256 so we do not need our
replacement anymore

Revision 1.79 / (download) - annotate - [select for diffs], Tue Jun 5 06:52:37 2007 UTC (16 years, 11 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Preserve MAC ctx between packets, saving 2xhash calls per-packet.
Yields around a 12-16% end-to-end speedup for arcfour256/hmac-md5

patch from markus@ tested dtucker@ and myself, ok markus@ and me (I'm
committing at his request)

Revision 1.78 / (download) - annotate - [select for diffs], Wed May 30 05:58:13 2007 UTC (16 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.77: +12 -7 lines
Diff to previous 1.77 (colored)

tidy: KNF, ARGSUSED and u_int

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jan 21 01:41:54 2007 UTC (17 years, 3 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

spaces

Revision 1.64.2.2 / (download) - annotate - [select for diffs], Fri Oct 6 03:19:32 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.64.2.1: +23 -12 lines
Diff to previous 1.64.2.1 (colored) to branchpoint 1.64 (colored) next main 1.65 (colored)

upgrade to OpenSSH 4.4

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sat Sep 30 04:06:50 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_3_9
Changes since 1.65: +23 -12 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

upgrade to OpenSSH 4.4

Revision 1.76 / (download) - annotate - [select for diffs], Thu Aug 3 03:34:42 2006 UTC (17 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.75: +6 -8 lines
Diff to previous 1.75 (colored)

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step

Revision 1.75 / (download) - annotate - [select for diffs], Tue Aug 1 23:22:47 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.74: +2 -1 lines
Diff to previous 1.74 (colored)

move #include <stdio.h> out of includes.h

Revision 1.74 / (download) - annotate - [select for diffs], Wed Jul 26 13:57:17 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored)

move #include <stdlib.h> out of includes.h

Revision 1.73 / (download) - annotate - [select for diffs], Wed Jul 26 02:35:17 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored)

move #include <sys/param.h> out of includes.h

Revision 1.72 / (download) - annotate - [select for diffs], Sat Jul 22 20:48:23 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.71: +3 -1 lines
Diff to previous 1.71 (colored)

move #include <string.h> out of includes.h

Revision 1.71 / (download) - annotate - [select for diffs], Sat Mar 25 13:17:02 2006 UTC (18 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.70: +1 -0 lines
Diff to previous 1.70 (colored)

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files

Revision 1.70 / (download) - annotate - [select for diffs], Sat Mar 25 00:05:41 2006 UTC (18 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.69: +3 -5 lines
Diff to previous 1.69 (colored)

introduce xcalloc() and xasprintf() failure-checked allocations functions
and use them throughout openssh

xcalloc is particularly important because malloc(nmemb * size) is a
dangerous idiom (subject to integer overflow) and it is time for it to
die

feedback and ok deraadt@

Revision 1.69 / (download) - annotate - [select for diffs], Mon Mar 20 18:48:34 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.68: +5 -1 lines
Diff to previous 1.68 (colored)

spacing

Revision 1.68 / (download) - annotate - [select for diffs], Sun Mar 19 18:53:12 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.67: +1 -1 lines
Diff to previous 1.67 (colored)

spacing

Revision 1.67 / (download) - annotate - [select for diffs], Sun Mar 19 18:51:18 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.66: +0 -1 lines
Diff to previous 1.66 (colored)

RCSID() can die

Revision 1.66 / (download) - annotate - [select for diffs], Tue Mar 7 09:07:40 2006 UTC (18 years, 2 months ago) by djm
Branch: MAIN
Changes since 1.65: +6 -1 lines
Diff to previous 1.65 (colored)

Implement the diffie-hellman-group-exchange-sha256 key exchange method
using the SHA256 code in libc (and wrapper to make it into an OpenSSL
EVP), interop tested against CVS PuTTY

Revision 1.64.2.1 / (download) - annotate - [select for diffs], Fri Feb 3 03:01:56 2006 UTC (18 years, 3 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.64: +21 -15 lines
Diff to previous 1.64 (colored)

upgrade to OpenSSH 4.3

Revision 1.60.4.2 / (download) - annotate - [select for diffs], Fri Feb 3 02:53:44 2006 UTC (18 years, 3 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.60.4.1: +21 -15 lines
Diff to previous 1.60.4.1 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

upgrade to OpenSSH 4.3

Revision 1.65 / (download) - annotate - [select for diffs], Fri Nov 4 05:15:59 2005 UTC (18 years, 6 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.64: +21 -15 lines
Diff to previous 1.64 (colored)

remove hardcoded hash lengths in key exchange code, allowing
implementation of KEX methods with different hashes (e.g. SHA-256);
ok markus@ dtucker@ stevesk@

Revision 1.60.4.1 / (download) - annotate - [select for diffs], Sun Sep 4 18:40:02 2005 UTC (18 years, 8 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.60: +23 -20 lines
Diff to previous 1.60 (colored)

upgrade to OpenSSH 4.2

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Fri Sep 2 03:45:00 2005 UTC (18 years, 8 months ago) by brad
Branch: OPENBSD_3_6
Changes since 1.60: +23 -20 lines
Diff to previous 1.60 (colored) next main 1.61 (colored)

upgrade to OpenSSH 4.2

Revision 1.64 / (download) - annotate - [select for diffs], Mon Jul 25 11:59:39 2005 UTC (18 years, 9 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE
Branch point for: OPENBSD_3_8
Changes since 1.63: +6 -4 lines
Diff to previous 1.63 (colored)

add a new compression method that delays compression until the user
has been authenticated successfully and set compression to 'delayed'
for sshd.

this breaks older openssh clients (< 3.5) if they insist on
compression, so you have to re-enable compression in sshd_config.
ok djm@

Revision 1.63 / (download) - annotate - [select for diffs], Sun Jul 17 07:17:55 2005 UTC (18 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

knf says that a 2nd level indent is four (not three or five) spaces

Revision 1.62 / (download) - annotate - [select for diffs], Sat Jul 16 01:35:24 2005 UTC (18 years, 10 months ago) by djm
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

spacing

Revision 1.61 / (download) - annotate - [select for diffs], Fri Jun 17 02:44:32 2005 UTC (18 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.60: +17 -16 lines
Diff to previous 1.60 (colored)

make this -Wsign-compare clean; ok avsm@ markus@

Revision 1.55.2.2 / (download) - annotate - [select for diffs], Thu Aug 19 22:37:31 2004 UTC (19 years, 9 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.55.2.1: +40 -5 lines
Diff to previous 1.55.2.1 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored)

upgrade to OpenSSH 3.9

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Thu Aug 19 04:13:26 2004 UTC (19 years, 9 months ago) by brad
Branch: OPENBSD_3_5
Changes since 1.56: +40 -5 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

upgrade to OpenSSH 3.9

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jun 21 17:36:31 2004 UTC (19 years, 10 months ago) by avsm
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_6_BASE
Branch point for: OPENBSD_3_7, OPENBSD_3_6
Changes since 1.59: +5 -5 lines
Diff to previous 1.59 (colored)

make ssh -Wshadow clean, no functional changes
markus@ ok

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 13 12:53:24 2004 UTC (19 years, 11 months ago) by djm
Branch: MAIN
Changes since 1.58: +3 -1 lines
Diff to previous 1.58 (colored)

implement diffie-hellman-group14-sha1 kex method (trivial extension to
existing diffie-hellman-group1-sha1); ok markus@

Revision 1.58 / (download) - annotate - [select for diffs], Sun May 9 01:26:48 2004 UTC (20 years ago) by djm
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

don't overwrite what we are trying to compute

Revision 1.57 / (download) - annotate - [select for diffs], Sun May 9 01:19:27 2004 UTC (20 years ago) by djm
Branch: MAIN
Changes since 1.56: +34 -1 lines
Diff to previous 1.56 (colored)

kill some more tiny files; ok deraadt@

Revision 1.54.2.3 / (download) - annotate - [select for diffs], Thu Mar 4 18:18:15 2004 UTC (20 years, 2 months ago) by brad
Branch: OPENBSD_3_3
Changes since 1.54.2.2: +3 -3 lines
Diff to previous 1.54.2.2 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored)

upgrade to OpenSSH 3.8upgrade to OpenSSH 3.8upgrade to OpenSSH 3.8

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Sat Feb 28 03:51:33 2004 UTC (20 years, 2 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

upgrade to OpenSSH 3.8

Revision 1.56 / (download) - annotate - [select for diffs], Fri Nov 21 11:57:03 2003 UTC (20 years, 6 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE
Branch point for: OPENBSD_3_5
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

unexpand and delete whitespace at EOL; ok markus@

Revision 1.51.2.3 / (download) - annotate - [select for diffs], Tue Sep 16 21:20:25 2003 UTC (20 years, 8 months ago) by brad
Branch: OPENBSD_3_2
Changes since 1.51.2.2: +0 -0 lines
Diff to previous 1.51.2.2 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored)

upgrade to OpenSSH 3.7

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Tue Sep 16 20:50:43 2003 UTC (20 years, 8 months ago) by brad
Branch: OPENBSD_3_3
Changes since 1.54.2.1: +1 -1 lines
Diff to previous 1.54.2.1 (colored) to branchpoint 1.54 (colored)

upgrade to OpenSSH 3.7

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Sun May 11 12:01:52 2003 UTC (21 years ago) by margarida
Branch: OPENBSD_3_3
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

Update OpenSSH to version 3.6.1

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Thu Apr 3 23:27:12 2003 UTC (21 years, 1 month ago) by margarida
Branch: OPENBSD_3_2
Changes since 1.51.2.1: +3 -2 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored)

Update to OpenSSH 3.6.1

Revision 1.49.2.4 / (download) - annotate - [select for diffs], Thu Apr 3 22:35:17 2003 UTC (21 years, 1 month ago) by miod
Branch: OPENBSD_3_1
Changes since 1.49.2.3: +46 -21 lines
Diff to previous 1.49.2.3 (colored) to branchpoint 1.49 (colored) next main 1.50 (colored)

Merge OpenSSH 3.6.1

Revision 1.55 / (download) - annotate - [select for diffs], Tue Apr 1 10:31:26 2003 UTC (21 years, 1 month ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE
Branch point for: OPENBSD_3_4
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

bugfix causes stalled connections for ssh.com < 3.0; noticed by ho@; tested by ho@ and myself

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Tue Apr 1 00:12:13 2003 UTC (21 years, 1 month ago) by margarida
Branch: OPENBSD_3_2
Changes since 1.51: +45 -21 lines
Diff to previous 1.51 (colored)

Update to OpenSSH 3.6

Revision 1.54 / (download) - annotate - [select for diffs], Sun Feb 16 17:09:57 2003 UTC (21 years, 3 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE
Branch point for: OPENBSD_3_3
Changes since 1.53: +7 -16 lines
Diff to previous 1.53 (colored)

split kex into client and server code, no need to link
server code into the client; ok provos@

Revision 1.53 / (download) - annotate - [select for diffs], Sun Feb 2 10:56:08 2003 UTC (21 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.52: +37 -4 lines
Diff to previous 1.52 (colored)

add support for key exchange guesses; based on work by
avraham.fraenkel@commatch.com; fixes bug #148; ok deraadt@

Revision 1.52 / (download) - annotate - [select for diffs], Thu Nov 21 22:45:31 2002 UTC (21 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

debug->debug2, unify debug messages

Revision 1.36.2.3 / (download) - annotate - [select for diffs], Wed Jun 26 18:22:35 2002 UTC (21 years, 10 months ago) by miod
Branch: OPENBSD_3_0
Changes since 1.36.2.2: +3 -3 lines
Diff to previous 1.36.2.2 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

There was an update to OpenSSH 3.4, and people rejoiced.

Revision 1.49.2.3 / (download) - annotate - [select for diffs], Wed Jun 26 15:30:38 2002 UTC (21 years, 10 months ago) by jason
Branch: OPENBSD_3_1
Changes since 1.49.2.2: +3 -3 lines
Diff to previous 1.49.2.2 (colored) to branchpoint 1.49 (colored)

Pull in OpenSSH-3.4

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jun 24 14:55:38 2002 UTC (21 years, 10 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE
Branch point for: OPENBSD_3_2
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

cat to (void) when output from buffer_get_X is ignored

Revision 1.33.2.3 / (download) - annotate - [select for diffs], Sun Jun 2 22:56:10 2002 UTC (21 years, 11 months ago) by miod
Branch: OPENBSD_2_9
Changes since 1.33.2.2: +28 -8 lines
Diff to previous 1.33.2.2 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)

Upgrade to OpenSSH 3.2.3.

Except for improbable compilation error fixes, this should be the last
commit made to the 2.9-STABLE branche. Have fun upgrading.

Revision 1.49.2.2 / (download) - annotate - [select for diffs], Sat May 18 04:50:38 2002 UTC (22 years ago) by jason
Branch: OPENBSD_3_1
Changes since 1.49.2.1: +0 -0 lines
Diff to previous 1.49.2.1 (colored) to branchpoint 1.49 (colored)

Update to OpenSSH-3.2.3

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Sat May 18 04:12:10 2002 UTC (22 years ago) by jason
Branch: OPENBSD_3_1
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Update to OpenSSH-3.2.2

Revision 1.36.2.2 / (download) - annotate - [select for diffs], Fri May 17 00:03:23 2002 UTC (22 years ago) by miod
Branch: OPENBSD_3_0
Changes since 1.36.2.1: +28 -8 lines
Diff to previous 1.36.2.1 (colored) to branchpoint 1.36 (colored)

Update OpenSSH to version 3.2.2.

Revision 1.50 / (download) - annotate - [select for diffs], Wed May 15 15:47:49 2002 UTC (22 years ago) by mouring
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

'monitor' variable clashes with at least one lame platform (NeXT).  Renamed
to 'pmonitor'.  provos@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Mar 26 23:14:51 2002 UTC (22 years, 1 month ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE
Branch point for: OPENBSD_3_1
Changes since 1.48: +22 -8 lines
Diff to previous 1.48 (colored)

generate a new cookie for each SSH2_MSG_KEXINIT message we send out

Revision 1.48 / (download) - annotate - [select for diffs], Mon Mar 18 17:50:31 2002 UTC (22 years, 2 months ago) by provos
Branch: MAIN
Changes since 1.47: +7 -1 lines
Diff to previous 1.47 (colored)

integrate privilege separated openssh; its turned off by default for now.
work done by me and markus@

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sat Mar 9 00:20:44 2002 UTC (22 years, 2 months ago) by miod
Branch: OPENBSD_2_9
Changes since 1.33.2.1: +24 -27 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored)

Merge OpenSSH 3.1, keeping /etc as configuration files directory.
(i.e. OpenSSH 3.1 + openbsd29_3.1.patch)

Revision 1.12.2.6 / (download) - annotate - [select for diffs], Fri Mar 8 17:04:42 2002 UTC (22 years, 2 months ago) by brad
Branch: OPENBSD_2_8
Changes since 1.12.2.5: +24 -27 lines
Diff to previous 1.12.2.5 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Merge OpenSSH 3.1.

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Thu Mar 7 17:37:46 2002 UTC (22 years, 2 months ago) by jason
Branch: OPENBSD_3_0
Changes since 1.36: +24 -27 lines
Diff to previous 1.36 (colored)

Update to OpenSSH-3.1 on 3.0-stable branch

Revision 1.47 / (download) - annotate - [select for diffs], Thu Feb 28 15:46:33 2002 UTC (22 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

add some const EVP_MD for openssl-0.9.7

Revision 1.46 / (download) - annotate - [select for diffs], Sat Feb 23 17:59:02 2002 UTC (22 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored)

don't allow garbage after payload.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Feb 14 23:41:01 2002 UTC (22 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.44: +8 -7 lines
Diff to previous 1.44 (colored)

hide some more implementation details of cipher.[ch] and prepares for move
to EVP, ok deraadt@

Revision 1.44 / (download) - annotate - [select for diffs], Mon Feb 11 16:10:15 2002 UTC (22 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)

restore kexinit handler if we reset the dispatcher, this unbreaks rekeying
s/kex_clear_dispatch/kex_reset_dispatch/

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jan 25 22:07:40 2002 UTC (22 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

use EVP_MD_size(evp_md) and not evp_md->md_size; ok steveks@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jan 11 13:39:36 2002 UTC (22 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.41: +3 -6 lines
Diff to previous 1.41 (colored)

a single dispatch_protocol_error() that sends a message of type 'UNIMPLEMENTED'
dispatch_range(): set handler for a ranges message types
use dispatch_protocol_ignore() for authentication requests after
	successful authentication (the drafts requirement).
serverloop/clientloop now send a 'UNIMPLEMENTED' message instead of exiting.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Dec 28 15:06:00 2001 UTC (22 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

remove plen from the dispatch fn. it's no longer used.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Dec 28 14:50:54 2001 UTC (22 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.39: +2 -4 lines
Diff to previous 1.39 (colored)

packet_read* no longer return the packet length, since it's not used.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Dec 28 12:14:27 2001 UTC (22 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

s/packet_done/packet_check_eom/ (end-of-message); ok djm@

Revision 1.38 / (download) - annotate - [select for diffs], Thu Dec 20 22:50:24 2001 UTC (22 years, 5 months ago) by djm
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

Conformance fix: we should send failing packet sequence number when
responding with a SSH_MSG_UNIMPLEMENTED message. Spotted by
yakk@yakk.dot.net; ok markus@

Revision 1.37 / (download) - annotate - [select for diffs], Wed Dec 5 10:06:12 2001 UTC (22 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

minor KNF

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Thu Sep 27 19:03:54 2001 UTC (22 years, 7 months ago) by jason
Branch: OPENBSD_2_9
Changes since 1.33: +22 -19 lines
Diff to previous 1.33 (colored)

Pull in OpenSSH-2.9.9

Revision 1.12.2.5 / (download) - annotate - [select for diffs], Thu Sep 27 00:15:42 2001 UTC (22 years, 7 months ago) by miod
Branch: OPENBSD_2_8
Changes since 1.12.2.4: +22 -19 lines
Diff to previous 1.12.2.4 (colored) to branchpoint 1.12 (colored)

Pull in OpenSSH 2.9.9 to the 2.8 branch.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jun 25 08:25:37 2001 UTC (22 years, 10 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE
Branch point for: OPENBSD_3_0
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

update copyright for 2001

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jun 23 15:12:18 2001 UTC (22 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.34: +17 -16 lines
Diff to previous 1.34 (colored)

more strict prototypes.  raise warning level in Makefile.inc.  markus ok'ed
TODO; cleanup headers

Revision 1.12.2.4 / (download) - annotate - [select for diffs], Mon May 7 21:09:30 2001 UTC (23 years ago) by jason
Branch: OPENBSD_2_8
Changes since 1.12.2.3: +257 -312 lines
Diff to previous 1.12.2.3 (colored) to branchpoint 1.12 (colored)

Pull in OpenSSH-2.9 to 2.8 branch.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 30 15:50:46 2001 UTC (23 years ago) by markus
Branch: MAIN
Changes since 1.33: +5 -3 lines
Diff to previous 1.33 (colored)

allow interop with weaker key generation used by ssh-2.0.x, x < 10

Revision 1.33 / (download) - annotate - [select for diffs], Thu Apr 5 10:42:50 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE
Branch point for: OPENBSD_2_9
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

fix whitespace: unexpand + trailing spaces.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Apr 4 23:09:18 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.31: +4 -1 lines
Diff to previous 1.31 (colored)

clear+free keys,iv for rekeying.
+ fix DH mem leaks. ok niels@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 4 22:04:34 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.30: +11 -1 lines
Diff to previous 1.30 (colored)

parse full kexinit packet.
make server-side more robust, too.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Apr 4 20:25:37 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.29: +28 -18 lines
Diff to previous 1.29 (colored)

more robust rekeying
don't send channel data after rekeying is started.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Apr 4 14:34:58 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.28: +22 -9 lines
Diff to previous 1.28 (colored)

enable server side rekeying + some rekey related clientup.
todo: we should not send any non-KEX messages after we send KEXINIT

Revision 1.28 / (download) - annotate - [select for diffs], Wed Apr 4 09:48:34 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.27: +11 -11 lines
Diff to previous 1.27 (colored)

don't sent multiple kexinit-requests.
send newkeys, block while waiting for newkeys.
fix comments.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 3 23:32:11 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.26: +49 -36 lines
Diff to previous 1.26 (colored)

undo parts of recent my changes: main part of keyexchange does not
need dispatch-callbacks, since application data is delayed until
the keyexchange completes (if i understand the drafts correctly).

add some infrastructure for re-keying.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Apr 3 19:53:29 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.25: +189 -191 lines
Diff to previous 1.25 (colored)

move kex to kex*.c, used dispatch_set() callbacks for kex. should
make rekeying easier.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Mar 29 21:17:39 2001 UTC (23 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.24: +1 -109 lines
Diff to previous 1.24 (colored)

prepare for rekeying: move DH code to dh.c

Revision 1.24 / (download) - annotate - [select for diffs], Wed Mar 28 21:59:40 2001 UTC (23 years, 1 month ago) by provos
Branch: MAIN
Changes since 1.23: +9 -3 lines
Diff to previous 1.23 (colored)

forgot to include min and max params in hash, okay markus@

Revision 1.12.2.3 / (download) - annotate - [select for diffs], Wed Mar 21 19:46:25 2001 UTC (23 years, 2 months ago) by jason
Branch: OPENBSD_2_8
Changes since 1.12.2.2: +29 -48 lines
Diff to previous 1.12.2.2 (colored) to branchpoint 1.12 (colored)

Pull in OpenSSH-2.5.2 for 2.8 branch.

Revision 1.6.2.5 / (download) - annotate - [select for diffs], Wed Mar 21 18:52:47 2001 UTC (23 years, 2 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.6.2.4: +29 -48 lines
Diff to previous 1.6.2.4 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Pull in OpenSSH-2.5.2 for 2.7 branch.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Mon Mar 12 15:44:11 2001 UTC (23 years, 2 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.6.2.3: +48 -47 lines
Diff to previous 1.6.2.3 (colored) to branchpoint 1.6 (colored)

OpenSSH-2.5.1 for 2.7 patch branch

Revision 1.23 / (download) - annotate - [select for diffs], Sat Mar 10 17:51:04 2001 UTC (23 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.22: +8 -45 lines
Diff to previous 1.22 (colored)

add PreferredAuthentications

Revision 1.22 / (download) - annotate - [select for diffs], Mon Mar 5 17:17:20 2001 UTC (23 years, 2 months ago) by markus
Branch: MAIN
Changes since 1.21: +22 -4 lines
Diff to previous 1.21 (colored)

generate a 2*need size (~300 instead of 1024/2048) random private
exponent during the DH key agreement. according to Niels (the great
german advisor) this is safe since /etc/primes contains strong
primes only.

References:
        P. C. van Oorschot and M. J. Wiener, On Diffie-Hellman key
        agreement with short exponents, In Advances in Cryptology
        - EUROCRYPT'96, LNCS 1070, Springer-Verlag, 1996, pp.332-343.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Mon Feb 19 17:18:59 2001 UTC (23 years, 3 months ago) by jason
Branch: OPENBSD_2_8
Changes since 1.12.2.1: +0 -0 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored)

Pull in OpenSSH-2.5.1

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Fri Feb 16 20:13:03 2001 UTC (23 years, 3 months ago) by jason
Branch: OPENBSD_2_8
Changes since 1.12: +48 -47 lines
Diff to previous 1.12 (colored)

Pull in OpenSSH 2.5.0

Revision 1.21 / (download) - annotate - [select for diffs], Sun Feb 11 12:59:24 2001 UTC (23 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.20: +6 -11 lines
Diff to previous 1.20 (colored)

1) clean up the MAC support for SSH-2
2) allow you to specify the MAC with 'ssh -m'
3) or the 'MACs' keyword in ssh(d)_config
4) add hmac-{md5,sha1}-96
	ok stevesk@, provos@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Feb 8 19:30:51 2001 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

sync with netbsd tree changes.
- more strict prototypes, include necessary headers
- use paths.h/pathnames.h decls
- size_t typecase to int -> u_long

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 4 15:32:23 2001 UTC (23 years, 3 months ago) by stevesk
Branch: MAIN
Changes since 1.18: +6 -6 lines
Diff to previous 1.18 (colored)

unexpand and remove end-of-line whitespace; ok markus@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jan 21 19:05:49 2001 UTC (23 years, 3 months ago) by markus
Branch: MAIN
Changes since 1.17: +9 -12 lines
Diff to previous 1.17 (colored)

split ssh.h and try to cleanup the #include mess. remove unnecessary #includes.
rename util.[ch] -> misc.[ch]

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jan 8 21:48:17 2001 UTC (23 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

missing free; thanks stevesk@pobox.com

Revision 1.16 / (download) - annotate - [select for diffs], Wed Dec 20 19:37:22 2000 UTC (23 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

fix prototypes; from  stevesk@pobox.com

Revision 1.15 / (download) - annotate - [select for diffs], Tue Dec 19 23:17:56 2000 UTC (23 years, 5 months ago) by markus
Branch: MAIN
Changes since 1.14: +12 -12 lines
Diff to previous 1.14 (colored)

replace 'unsigned bla' with 'u_bla' everywhere. also, replace 'char unsigned'
with u_char.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Dec 15 17:30:14 2000 UTC (23 years, 5 months ago) by provos
Branch: MAIN
Changes since 1.13: +9 -5 lines
Diff to previous 1.13 (colored)

compute diffie-hellman in parallel between server and client. okay markus@

Revision 1.13 / (download) - annotate - [select for diffs], Sun Nov 12 19:50:37 2000 UTC (23 years, 6 months ago) by markus
Branch: MAIN
Changes since 1.12: +7 -5 lines
Diff to previous 1.12 (colored)

add support for RSA to SSH2.  please test.

there are now 3 types of keys: RSA1 is used by ssh-1 only,
RSA and DSA are used by SSH2.

you can use 'ssh-keygen -t rsa -f ssh2_rsa_file' to generate RSA
keys for SSH2 and use the RSA keys for hostkeys or for user keys.

SSH2 RSA or DSA keys are added to .ssh/authorised_keys2 as before.

IdentityFile2, HostDsaKey and DSAAuthentication are obsolete.
you can use multiple IdentityFile and HostKey for all types of keys.

the option DSAAuthentication is replaced by PubkeyAuthetication.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Wed Nov 8 21:30:51 2000 UTC (23 years, 6 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.6.2.2: +115 -59 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored)

openssh-2.3.0 (again) for 2.7 branch

Revision 1.12 / (download) - annotate - [select for diffs], Wed Oct 11 20:27:23 2000 UTC (23 years, 7 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE
Branch point for: OPENBSD_2_8
Changes since 1.11: +8 -28 lines
Diff to previous 1.11 (colored)

new cipher framework

Revision 1.11 / (download) - annotate - [select for diffs], Wed Oct 11 04:02:17 2000 UTC (23 years, 7 months ago) by provos
Branch: MAIN
Changes since 1.10: +108 -27 lines
Diff to previous 1.10 (colored)

First rough implementation of the diffie-hellman group exchange.  The
client can ask the server for bigger groups to perform the diffie-hellman
in, thus increasing the attack complexity when using ciphers with longer
keys.  University of Windsor provided network, T the company.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Sep 7 20:27:51 2000 UTC (23 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +1 -6 lines
Diff to previous 1.9 (colored)

cleanup copyright notices on all files.  I have attempted to be accurate with
the details.  everything is now under Tatu's licence (which I copied from his
readme), and/or the core-sdi bsd-ish thing for deattack, or various openbsd
developers under a 2-term bsd licence.  We're not changing any rules, just
being accurate.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Fri Sep 1 18:23:20 2000 UTC (23 years, 8 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.6.2.1: +8 -6 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored)

Pull in the rest of openssh-2.2.0 to 2.7 branch (luvin' cvs...)

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 10 16:30:25 2000 UTC (23 years, 10 months ago) by ho
Branch: MAIN
Changes since 1.8: +8 -6 lines
Diff to previous 1.8 (colored)

strtok() --> strsep(). (niels@ ok)

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 20 01:39:41 2000 UTC (23 years, 11 months ago) by markus
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

OpenBSD tag

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Mon Jun 12 02:37:33 2000 UTC (23 years, 11 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.6: +70 -26 lines
Diff to previous 1.6 (colored)

lovin' CVS... update patch branch to OpenSSH-2.1.1

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 25 20:45:20 2000 UTC (23 years, 11 months ago) by markus
Branch: MAIN
Changes since 1.6: +70 -26 lines
Diff to previous 1.6 (colored)

split kexinit/kexdh, factor out common code

Revision 1.6 / (download) - annotate - [select for diffs], Mon May 8 17:42:25 2000 UTC (24 years ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE
Branch point for: OPENBSD_2_7
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

bug compat w/ ssh-2.0.13 x11, split out bugs

Revision 1.5 / (download) - annotate - [select for diffs], Fri Apr 14 10:30:31 2000 UTC (24 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.4: +6 -6 lines
Diff to previous 1.4 (colored)

whitespace cleanup

Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 12 09:39:10 2000 UTC (24 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.3: +8 -8 lines
Diff to previous 1.3 (colored)

#include <ssl/foo.h> -> <openssh/foo.h>

Revision 1.3 / (download) - annotate - [select for diffs], Wed Apr 12 07:03:05 2000 UTC (24 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.2: +39 -7 lines
Diff to previous 1.2 (colored)

check for reasonable public DH values

Revision 1.2 / (download) - annotate - [select for diffs], Wed Apr 12 06:37:02 2000 UTC (24 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

less debugging output

Revision 1.1 / (download) - annotate - [select for diffs], Mon Apr 3 20:06:15 2000 UTC (24 years, 1 month ago) by markus
Branch: MAIN

DSA, keyexchange, algorithm agreement for ssh2

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.