├── .gitignore
├── .htaccess
├── CVE-2015-1782.patch
├── CVE-2016-0787.patch
├── CVE-2019-3855.md
├── CVE-2019-3855.t
├── CVE-2019-3856.md
├── CVE-2019-3856.t
├── CVE-2019-3857.md
├── CVE-2019-3857.t
├── CVE-2019-3858.md
├── CVE-2019-3858.t
├── CVE-2019-3859.md
├── CVE-2019-3859.t
├── CVE-2019-3860.md
├── CVE-2019-3860.t
├── CVE-2019-3861.md
├── CVE-2019-3861.t
├── CVE-2019-3862.md
├── CVE-2019-3862.t
├── CVE-2019-3863.md
├── CVE-2019-3863.t
├── Makefile
├── Makefile.docs
├── README.md
├── adv_20150311.t
├── adv_20150311.txt
├── adv_20160223.t
├── adv_20160223.txt
├── body.t
├── changes.t
├── css.t
├── cvs.t
├── date.pm
├── docmake.sh
├── docs.t
├── doctype.t
├── examples
├── .gitignore
├── Makefile
├── _example-templ.html
├── index.t
└── mkexam.pl
├── footer.t
├── func.t
├── index.t
├── indexbot.t
├── indextop.t
├── libssh2-vs-libssh.t
├── libssh2.css
├── libssh2.pm
├── license.t
├── logo1-623.png
├── mail.cgi
├── mailbot.t
├── mailhead.t
├── mailtop.t
├── manpage.css
├── manpage.t
├── menu.t
├── security.t
├── setup.t
├── source.t
├── txt2plain.pl
└── update.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | libssh2*html
2 | libssh2*raw
3 | *~
4 | changes.html
5 | cvs.html
6 | cvs.raw
7 | docs.html
8 | index.html
9 | indexbot.html
10 | indextop.html
11 | license.html
12 | mailbot.html
13 | mailhead.html
14 | mailtop.html
15 | menu.html
16 | snapshots.html
17 | source.html
18 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 | RedirectMatch "^/.git" https://github.com/libssh2/libssh2
2 |
3 | RewriteEngine On
4 |
5 | RewriteCond expr "! %{HTTP_HOST} -strmatch 'libssh2.org'"
6 | RewriteRule (.*) https://libssh2.org%{REQUEST_URI} [R=301,L]
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CVE-2015-1782.patch:
--------------------------------------------------------------------------------
1 | From dd57ee000d2241274ef46ad5e08802c35ba0eb2c Mon Sep 17 00:00:00 2001
2 | From: Mariusz Ziulek
3 | Date: Sat, 21 Feb 2015 23:31:36 +0100
4 | Subject: [PATCH] kex: bail out on rubbish in the incoming packet
5 |
6 | CVE-2015-1782
7 |
8 | Bug: https://www.libssh2.org/adv_20150311.html
9 | ---
10 | src/kex.c | 73 +++++++++++++++++++++++++++++++++++----------------------------
11 | 1 file changed, 41 insertions(+), 32 deletions(-)
12 |
13 | diff --git a/src/kex.c b/src/kex.c
14 | index fa4c4e1..ad7498a 100644
15 | --- a/src/kex.c
16 | +++ b/src/kex.c
17 | @@ -1547,10 +1547,34 @@ static int kex_agree_comp(LIBSSH2_SESSION *session,
18 |
19 | /* TODO: When in server mode we need to turn this logic on its head
20 | * The Client gets to make the final call on "agreed methods"
21 | */
22 |
23 | +/*
24 | + * kex_string_pair() extracts a string from the packet and makes sure it fits
25 | + * within the given packet.
26 | + */
27 | +static int kex_string_pair(unsigned char **sp, /* parsing position */
28 | + unsigned char *data, /* start pointer to packet */
29 | + size_t data_len, /* size of total packet */
30 | + size_t *lenp, /* length of the string */
31 | + unsigned char **strp) /* pointer to string start */
32 | +{
33 | + unsigned char *s = *sp;
34 | + *lenp = _libssh2_ntohu32(s);
35 | +
36 | + /* the length of the string must fit within the current pointer and the
37 | + end of the packet */
38 | + if (*lenp > (data_len - (s - data) -4))
39 | + return 1;
40 | + *strp = s + 4;
41 | + s += 4 + *lenp;
42 | +
43 | + *sp = s;
44 | + return 0;
45 | +}
46 | +
47 | /* kex_agree_methods
48 | * Decide which specific method to use of the methods offered by each party
49 | */
50 | static int kex_agree_methods(LIBSSH2_SESSION * session, unsigned char *data,
51 | unsigned data_len)
52 | @@ -1566,42 +1590,27 @@ static int kex_agree_methods(LIBSSH2_SESSION * session, unsigned char *data,
53 |
54 | /* Skip cookie, don't worry, it's preserved in the kexinit field */
55 | s += 16;
56 |
57 | /* Locate each string */
58 | - kex_len = _libssh2_ntohu32(s);
59 | - kex = s + 4;
60 | - s += 4 + kex_len;
61 | - hostkey_len = _libssh2_ntohu32(s);
62 | - hostkey = s + 4;
63 | - s += 4 + hostkey_len;
64 | - crypt_cs_len = _libssh2_ntohu32(s);
65 | - crypt_cs = s + 4;
66 | - s += 4 + crypt_cs_len;
67 | - crypt_sc_len = _libssh2_ntohu32(s);
68 | - crypt_sc = s + 4;
69 | - s += 4 + crypt_sc_len;
70 | - mac_cs_len = _libssh2_ntohu32(s);
71 | - mac_cs = s + 4;
72 | - s += 4 + mac_cs_len;
73 | - mac_sc_len = _libssh2_ntohu32(s);
74 | - mac_sc = s + 4;
75 | - s += 4 + mac_sc_len;
76 | - comp_cs_len = _libssh2_ntohu32(s);
77 | - comp_cs = s + 4;
78 | - s += 4 + comp_cs_len;
79 | - comp_sc_len = _libssh2_ntohu32(s);
80 | - comp_sc = s + 4;
81 | -#if 0
82 | - s += 4 + comp_sc_len;
83 | - lang_cs_len = _libssh2_ntohu32(s);
84 | - lang_cs = s + 4;
85 | - s += 4 + lang_cs_len;
86 | - lang_sc_len = _libssh2_ntohu32(s);
87 | - lang_sc = s + 4;
88 | - s += 4 + lang_sc_len;
89 | -#endif
90 | + if(kex_string_pair(&s, data, data_len, &kex_len, &kex))
91 | + return -1;
92 | + if(kex_string_pair(&s, data, data_len, &hostkey_len, &hostkey))
93 | + return -1;
94 | + if(kex_string_pair(&s, data, data_len, &crypt_cs_len, &crypt_cs))
95 | + return -1;
96 | + if(kex_string_pair(&s, data, data_len, &crypt_sc_len, &crypt_sc))
97 | + return -1;
98 | + if(kex_string_pair(&s, data, data_len, &mac_cs_len, &mac_cs))
99 | + return -1;
100 | + if(kex_string_pair(&s, data, data_len, &mac_sc_len, &mac_sc))
101 | + return -1;
102 | + if(kex_string_pair(&s, data, data_len, &comp_cs_len, &comp_cs))
103 | + return -1;
104 | + if(kex_string_pair(&s, data, data_len, &comp_sc_len, &comp_sc))
105 | + return -1;
106 | +
107 | /* If the server sent an optimistic packet, assume that it guessed wrong.
108 | * If the guess is determined to be right (by kex_agree_kex_hostkey)
109 | * This flag will be reset to zero so that it's not ignored */
110 | session->burn_optimistic_kexinit = *(s++);
111 | /* Next uint32 in packet is all zeros (reserved) */
112 | --
113 | 2.1.4
114 |
115 |
--------------------------------------------------------------------------------
/CVE-2016-0787.patch:
--------------------------------------------------------------------------------
1 | From 8a453a7b0f1e667b7369eb73b00843a8decdecc9 Mon Sep 17 00:00:00 2001
2 | From: Daniel Stenberg
3 | Date: Thu, 11 Feb 2016 13:52:20 +0100
4 | Subject: [PATCH] diffie_hellman_sha256: convert bytes to bits
5 |
6 | As otherwise we get far too small numbers.
7 |
8 | CVE-2016-0787
9 | ---
10 | src/kex.c | 2 +-
11 | 1 file changed, 1 insertion(+), 1 deletion(-)
12 |
13 | diff --git a/src/kex.c b/src/kex.c
14 | index 6349457..e89b36c 100644
15 | --- a/src/kex.c
16 | +++ b/src/kex.c
17 | @@ -751,11 +751,11 @@ static int diffie_hellman_sha256(LIBSSH2_SESSION *session,
18 |
19 | /* Zero the whole thing out */
20 | memset(&exchange_state->req_state, 0, sizeof(packet_require_state_t));
21 |
22 | /* Generate x and e */
23 | - _libssh2_bn_rand(exchange_state->x, group_order, 0, -1);
24 | + _libssh2_bn_rand(exchange_state->x, group_order * 8 - 1, 0, -1);
25 | _libssh2_bn_mod_exp(exchange_state->e, g, exchange_state->x, p,
26 | exchange_state->ctx);
27 |
28 | /* Send KEX init */
29 | /* packet_type(1) + String Length(4) + leading 0(1) */
30 | --
31 | 2.7.0
32 |
33 |
--------------------------------------------------------------------------------
/CVE-2019-3855.md:
--------------------------------------------------------------------------------
1 | Possible integer overflow in transport read allows out-of-bounds write
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3855.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A malicious server could send a specially crafted packet which could result in
11 | an unchecked integer overflow. The value would then be used to allocate memory
12 | causing a possible memory write out of bounds error (CWE-130).
13 |
14 | There are no known exploits of this flaw at this time.
15 |
16 | INFO
17 | ----
18 |
19 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
20 | CVE-2019-3855 to this issue.
21 |
22 | AFFECTED VERSIONS
23 | -----------------
24 |
25 | - Affected versions: all versions to and including 1.8.0
26 | - Not affected versions: libssh2 >= 1.8.1
27 |
28 | THE SOLUTION
29 | ------------
30 |
31 | libssh2 1.8.1 ensures packet length value is below `LIBSSH2_PACKET_MAXPAYLOAD`
32 | (4000 bytes) before processing payload.
33 |
34 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3855.patch)
35 |
36 | RECOMMENDATIONS
37 | ---------------
38 |
39 | We suggest you take one of the following actions immediately, in order of
40 | preference:
41 |
42 | A - Upgrade to libssh2 1.8.1 or later
43 |
44 | B - Apply the patch and rebuild libssh2
45 |
46 | TIME LINE
47 | ---------
48 |
49 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
50 |
51 | libssh2 1.8.1 as released on March 18 2019, coordinated with the publication
52 | of this advisory.
53 |
54 | CREDITS
55 | -------
56 |
57 | Reported by Chris Coulson of Canonical Ltd.
58 |
--------------------------------------------------------------------------------
/CVE-2019-3855.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3855)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3855)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3855.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3856.md:
--------------------------------------------------------------------------------
1 | Possible integer overflow in keyboard interactive handling allows out-of-bounds write
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3856.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a value approaching unsigned int max number of keyboard
11 | prompt requests which could result in an unchecked integer overflow. The value
12 | would then be used to allocate memory causing a possible memory write out of
13 | bounds error (CWE-130).
14 |
15 |
16 | There are no known exploits of this flaw at this time.
17 |
18 | INFO
19 | ----
20 |
21 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
22 | CVE-2019-3856 to this issue.
23 |
24 | AFFECTED VERSIONS
25 | -----------------
26 |
27 | - Affected versions: all versions to and including 1.8.0
28 | - Not affected versions: libssh2 >= 1.8.1
29 |
30 | THE SOLUTION
31 | ------------
32 |
33 | libssh2 1.8.1 ensures keyboard prompt requests value is less than 100 before
34 | proceeding with the login process.
35 |
36 |
37 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3856.patch)
38 |
39 | RECOMMENDATIONS
40 | ---------------
41 |
42 | We suggest you take one of the following actions immediately, in order of
43 | preference:
44 |
45 | A - Upgrade to libssh2 1.8.1 or later
46 |
47 | B - Apply the patch and rebuild libssh2
48 |
49 | TIME LINE
50 | ---------
51 |
52 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
53 |
54 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
55 | of this advisory.
56 |
57 | CREDITS
58 | -------
59 |
60 | Reported by Chris Coulson of Canonical Ltd.
61 |
--------------------------------------------------------------------------------
/CVE-2019-3856.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3856)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3856)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3856.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3857.md:
--------------------------------------------------------------------------------
1 | Possible integer overflow leading to zero-byte allocation and out-of-bounds write
2 | =================================================================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3857.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a `SSH_MSG_CHANNEL_REQUEST` packet with an exit signal
11 | message with a length of max unsigned integer value. The length would then
12 | have a value of 1 added to it and used to allocate memory causing a possible
13 | memory write out of bounds error or zero byte allocation (CWE-130).
14 |
15 |
16 | There are no known exploits of this flaw at this time.
17 |
18 | INFO
19 | ----
20 |
21 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
22 | CVE-2019-3857 to this issue.
23 |
24 | AFFECTED VERSIONS
25 | -----------------
26 |
27 | - Affected versions: versions 1.2.8 up to and including 1.8.0
28 | - Not affected versions: libssh2 >= 1.8.1
29 |
30 | THE SOLUTION
31 | ------------
32 |
33 | libssh2 1.8.1 ensures the length of the message plus 1 is less than `UINT_MAX`
34 | before allocating memory using the computed value.
35 |
36 |
37 | A patch for this problem is
38 | [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3857.patch)
39 |
40 |
41 | RECOMMENDATIONS
42 | ---------------
43 |
44 | We suggest you take one of the following actions immediately, in order of
45 | preference:
46 |
47 | A - Upgrade to libssh2 1.8.1 or later
48 |
49 | B - Apply the patch and rebuild libssh2
50 |
51 | TIME LINE
52 | ---------
53 |
54 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
55 |
56 | libssh2 1.8.1 was released on March 18, coordinated with the
57 | publication of this advisory.
58 |
59 | CREDITS
60 | -------
61 |
62 | Reported by Chris Coulson of Canonical Ltd.
63 |
--------------------------------------------------------------------------------
/CVE-2019-3857.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3857)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3857)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3857.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3858.md:
--------------------------------------------------------------------------------
1 | Possible zero-byte allocation leading to an out-of-bounds read
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3858.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a specially crafted partial SFTP packet with a zero value
11 | for the payload length. This zero value would be used to then allocate memory
12 | resulting in a zero byte allocation and possible out of bounds read (CWE-130).
13 |
14 |
15 | There are no known exploits of this flaw at this time.
16 |
17 | INFO
18 | ----
19 |
20 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
21 | CVE-2019-3858 to this issue.
22 |
23 | AFFECTED VERSIONS
24 | -----------------
25 |
26 | - Affected versions: versions 0.3 up to and including 1.8.0
27 | - Not affected versions: libssh2 >= 1.8.1
28 |
29 | THE SOLUTION
30 | ------------
31 |
32 | libssh2 1.8.1 ensures the length of the payload is not zero before allocing
33 | the memory buffer using the value.
34 |
35 |
36 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3858.patch)
37 |
38 | RECOMMENDATIONS
39 | ---------------
40 |
41 | We suggest you take one of the following actions immediately, in order of
42 | preference:
43 |
44 | A - Upgrade to libssh2 1.8.1 or later
45 |
46 | B - Apply the patch and rebuild libssh2
47 |
48 | TIME LINE
49 | ---------
50 |
51 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
52 |
53 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
54 | of this advisory.
55 |
56 | CREDITS
57 | -------
58 |
59 | Reported by Chris Coulson of Canonical Ltd.
60 |
--------------------------------------------------------------------------------
/CVE-2019-3858.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3858)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3858)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3858.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3859.md:
--------------------------------------------------------------------------------
1 | Out-of-bounds reads with specially crafted payloads due to unchecked use of
2 | `_libssh2_packet_require` and `_libssh2_packet_requirev`
3 | =======================================
4 |
5 | Project libssh2 Security Advisory, March 18 2019 -
6 | [Permalink](https://www.libssh2.org/CVE-2019-3859.html)
7 |
8 | VULNERABILITY
9 | -------------
10 |
11 | A server could send a specially crafted partial packet in response to various
12 | commands such as: sha1 and sha226 key exchange, user auth list, user auth
13 | password response, public key auth response, channel startup/open/forward/
14 | setenv/request pty/x11 and session start up. The result would be a memory out
15 | of bounds read (CWE-130).
16 |
17 | There are no known exploits of this flaw at this time.
18 |
19 | INFO
20 | ----
21 |
22 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
23 | CVE-2019-3859 to this issue.
24 |
25 | AFFECTED VERSIONS
26 | -----------------
27 |
28 | - Affected versions: versions 0.1 up to and including 1.8.0
29 | - Not affected versions: libssh2 >= 1.8.1
30 |
31 | THE SOLUTION
32 | ------------
33 |
34 | libssh2 1.8.1 ensures the length of the payload is the required length before
35 | reading the packet buffer content.
36 |
37 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3859.patch)
38 |
39 | RECOMMENDATIONS
40 | ---------------
41 |
42 | We suggest you take one of the following actions immediately, in order of
43 | preference:
44 |
45 | A - Upgrade to libssh2 1.8.1 or greater
46 |
47 | B - Apply the patch and rebuild libssh2
48 |
49 | TIME LINE
50 | ---------
51 |
52 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
53 |
54 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
55 | of this advisory.
56 |
57 | CREDITS
58 | -------
59 |
60 | Reported by Chris Coulson of Canonical Ltd.
61 |
--------------------------------------------------------------------------------
/CVE-2019-3859.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3859)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3859)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3859.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3860.md:
--------------------------------------------------------------------------------
1 | Out-of-bounds reads with specially crafted SFTP packets
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3860.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a specially crafted partial SFTP packet with a empty payload
11 | in response to various SFTP commands such as read directory, file status,
12 | status vfs and symlink. The result would be a memory out of bounds read
13 | (CWE-130).
14 |
15 | There are no known exploits of this flaw at this time.
16 |
17 | INFO
18 | ----
19 |
20 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
21 | CVE-2019-3860 to this issue.
22 |
23 | AFFECTED VERSIONS
24 | -----------------
25 |
26 | - Affected versions: versions 0.3 up to and including 1.8.0
27 | - Not affected versions: libssh2 >= 1.9.0
28 |
29 | THE SOLUTION
30 | ------------
31 |
32 | libssh2 1.8.1 ensures the length of the payload is the required length before
33 | reading the packet buffer content.
34 |
35 |
36 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3860.patch)
37 |
38 | RECOMMENDATIONS
39 | ---------------
40 |
41 | We suggest you take one of the following actions immediately, in order of
42 | preference:
43 |
44 | A - Upgrade to libssh2 1.8.1 or later
45 |
46 | B - Apply the patch and rebuild libssh2
47 |
48 | TIME LINE
49 | ---------
50 |
51 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
52 |
53 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
54 | of this advisory.
55 |
56 | CREDITS
57 | -------
58 |
59 | Reported by Chris Coulson of Canonical Ltd.
60 |
--------------------------------------------------------------------------------
/CVE-2019-3860.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3860)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3860)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3860.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3861.md:
--------------------------------------------------------------------------------
1 | Out-of-bounds reads with specially crafted SSH packets
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3861.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a specially crafted SSH packet with a padding length value
11 | greater than the packet length. This would result in a buffer read out of bounds
12 | when decompressing the packet or result in a corrupted packet value (CWE-130).
13 |
14 | There are no known exploits of this flaw at this time.
15 |
16 | INFO
17 | ----
18 |
19 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
20 | CVE-2019-3861 to this issue.
21 |
22 | AFFECTED VERSIONS
23 | -----------------
24 |
25 | - Affected versions: versions 0.15 up to and including 1.8.0
26 | - Not affected versions: libssh2 >= 1.8.1
27 |
28 | THE SOLUTION
29 | ------------
30 |
31 | libssh2 1.8.1 ensures the length of the packet padding is less than the packet
32 | size minus 1.
33 |
34 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3861.patch)
35 |
36 | RECOMMENDATIONS
37 | ---------------
38 |
39 | We suggest you take one of the following actions immediately, in order of
40 | preference:
41 |
42 | A - Upgrade to libssh2 1.8.1 or later
43 |
44 | B - Apply the patch and rebuild libssh2
45 |
46 | TIME LINE
47 | ---------
48 |
49 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
50 |
51 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
52 | of this advisory.
53 |
54 | CREDITS
55 | -------
56 |
57 | Reported by Chris Coulson of Canonical Ltd.
58 |
--------------------------------------------------------------------------------
/CVE-2019-3861.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3861)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3861)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3861.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3862.md:
--------------------------------------------------------------------------------
1 | Out-of-bounds memory comparison
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3862.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a specially crafted `SSH_MSG_CHANNEL_REQUEST` packet with
11 | an exit status message and no payload. This would result in an out of bounds
12 | memory comparison (CWE-130).
13 |
14 | There are no known exploits of this flaw at this time.
15 |
16 | INFO
17 | ----
18 |
19 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
20 | CVE-2019-3862 to this issue.
21 |
22 | AFFECTED VERSIONS
23 | -----------------
24 |
25 | - Affected versions: versions 0.11 up to and including 1.8.0
26 | - Not affected versions: libssh2 >= 1.8.1
27 |
28 | THE SOLUTION
29 | ------------
30 |
31 | libssh2 1.8.1 ensures the length of the packet is greater or equal to the value
32 | being compared before calling memcmp().
33 |
34 | A patch for this problem is [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3862.patch)
35 |
36 | RECOMMENDATIONS
37 | ---------------
38 |
39 | We suggest you take one of the following actions immediately, in order of
40 | preference:
41 |
42 | A - Upgrade to libssh2 1.8.1 or later
43 |
44 | B - Apply the patch and rebuild libssh2
45 |
46 | TIME LINE
47 | ---------
48 |
49 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
50 |
51 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
52 | of this advisory.
53 |
54 | CREDITS
55 | -------
56 |
57 | Reported by Chris Coulson of Canonical Ltd.
58 |
--------------------------------------------------------------------------------
/CVE-2019-3862.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3862)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3862)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3862.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/CVE-2019-3863.md:
--------------------------------------------------------------------------------
1 | Integer overflow in user authenticate keyboard interactive allows out-of-bounds writes
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, March 18 2019 -
5 | [Permalink](https://www.libssh2.org/CVE-2019-3863.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | A server could send a multiple keyboard interactive response messages whose
11 | total length are greater than unsigned char max characters. This value is
12 | used as an index to copy memory causing in an out of bounds memory write error.
13 | (CWE-130).
14 |
15 | There are no known exploits of this flaw at this time.
16 |
17 | INFO
18 | ----
19 |
20 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
21 | CVE-2019-3863 to this issue.
22 |
23 | AFFECTED VERSIONS
24 | -----------------
25 |
26 | - Affected versions: versions 0.1 up to and including 1.8.0
27 | - Not affected versions: libssh2 >= 1.8.1
28 |
29 | THE SOLUTION
30 | ------------
31 |
32 | libssh2 1.8.1 ensures the current memory index value plus the length of the
33 | response message will fit into the memory buffer before copying the value and
34 | incrementing the index value.
35 |
36 | A patch for this problem is
37 | [available](https://libssh2.org/1.8.0-CVE/CVE-2019-3863.patch)
38 |
39 | RECOMMENDATIONS
40 | ---------------
41 |
42 | We suggest you take one of the following actions immediately, in order of
43 | preference:
44 |
45 | A - Upgrade to libssh2 1.8.1 or later
46 |
47 | B - Apply the patch and rebuild libssh2
48 |
49 | TIME LINE
50 | ---------
51 |
52 | It was first reported to the libssh2 project on Dec 3 2018 by Chris Coulson.
53 |
54 | libssh2 1.8.1 was released on March 18 2019, coordinated with the publication
55 | of this advisory.
56 |
57 | CREDITS
58 | -------
59 |
60 | Reported by Chris Coulson of Canonical Ltd.
61 |
--------------------------------------------------------------------------------
/CVE-2019-3863.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: CVE-2019-3863)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory: CVE-2019-3863)
8 | BOXTOP
9 |
10 | #include "CVE-2019-3863.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | ROOT=.
2 | MAINPARTS= $(ROOT)/doctype.t $(ROOT)/body.t $(ROOT)/footer.t \
3 | $(ROOT)/setup.t menu.t $(ROOT)/css.t
4 | ACTION=@echo preprocessing $@; rm -f $@; fcpp -WWW -Uunix -H -I$(ROOT) -C -V -LL $< $@;
5 | TXT2PLAIN = perl txt2plain.pl
6 | SRCDIR=git-source
7 | MARKDOWN=markdown
8 |
9 | CVES = \
10 | adv_20150311.html \
11 | adv_20160223.html \
12 | CVE-2019-3855.html \
13 | CVE-2019-3856.html \
14 | CVE-2019-3857.html \
15 | CVE-2019-3858.html \
16 | CVE-2019-3859.html \
17 | CVE-2019-3860.html \
18 | CVE-2019-3861.html \
19 | CVE-2019-3862.html \
20 | CVE-2019-3863.html
21 |
22 | all: index.html mailhead.html cvs.html docs.html mailtop.html mailbot.html \
23 | indextop.html indexbot.html menu.html changes.html source.html \
24 | libssh2-vs-libssh.html license.html security.html $(CVES)
25 | cd git-source && git pull
26 | cd examples && make
27 |
28 | index.html: index.t $(MAINPARTS)
29 | $(ACTION)
30 |
31 | libssh2-vs-libssh.html: libssh2-vs-libssh.t $(MAINPARTS)
32 | $(ACTION)
33 |
34 | security.html: security.t $(MAINPARTS) security.gen
35 | $(ACTION)
36 |
37 | security.gen: $(SRCDIR)/docs/SECURITY.md
38 | $(MARKDOWN) $< >$@
39 |
40 | changes.html: changes.t $(MAINPARTS)
41 | $(ACTION)
42 |
43 | license.html: license.t $(MAINPARTS) license.txt
44 | $(ACTION)
45 | license.txt: $(SRCDIR)/COPYING
46 | $(TXT2PLAIN) < $< > $@
47 |
48 | docs.html: docs.t $(MAINPARTS) docmenu.t
49 | $(ACTION)
50 |
51 | cvs.html: cvs.t $(MAINPARTS)
52 | $(ACTION)
53 |
54 | source.html: source.t $(MAINPARTS)
55 | $(ACTION)
56 |
57 | menu.html: menu.t $(MAINPARTS)
58 | $(ACTION)
59 |
60 | mailhead.html: mailhead.t $(MAINPARTS)
61 | $(ACTION)
62 |
63 | mailtop.html: mailtop.t $(MAINPARTS)
64 | $(ACTION)
65 |
66 | mailbot.html: mailbot.t $(MAINPARTS)
67 | $(ACTION)
68 |
69 | indextop.html: indextop.t $(MAINPARTS)
70 | $(ACTION)
71 |
72 | indexbot.html: indexbot.t $(MAINPARTS)
73 | $(ACTION)
74 |
75 | adv_20150311.html: adv_20150311.t adv_20150311.gen $(MAINPARTS)
76 | $(ACTION)
77 |
78 | adv_20150311.gen: adv_20150311.txt
79 | $(MARKDOWN) $< >$@
80 |
81 | adv_20160223.html: adv_20160223.t adv_20160223.gen $(MAINPARTS)
82 | $(ACTION)
83 |
84 | adv_20160223.gen: adv_20160223.txt
85 | $(MARKDOWN) $< >$@
86 |
87 | CVE-2019-3855.html: CVE-2019-3855.t CVE-2019-3855.gen $(MAINPARTS)
88 | $(ACTION)
89 |
90 | CVE-2019-3855.gen: CVE-2019-3855.md
91 | $(MARKDOWN) $< >$@
92 |
93 | CVE-2019-3856.html: CVE-2019-3856.t CVE-2019-3856.gen $(MAINPARTS)
94 | $(ACTION)
95 |
96 | CVE-2019-3856.gen: CVE-2019-3856.md
97 | $(MARKDOWN) $< >$@
98 |
99 | CVE-2019-3857.html: CVE-2019-3857.t CVE-2019-3857.gen $(MAINPARTS)
100 | $(ACTION)
101 |
102 | CVE-2019-3857.gen: CVE-2019-3857.md
103 | $(MARKDOWN) $< >$@
104 |
105 | CVE-2019-3858.html: CVE-2019-3858.t CVE-2019-3858.gen $(MAINPARTS)
106 | $(ACTION)
107 |
108 | CVE-2019-3858.gen: CVE-2019-3858.md
109 | $(MARKDOWN) $< >$@
110 |
111 | CVE-2019-3859.html: CVE-2019-3859.t CVE-2019-3859.gen $(MAINPARTS)
112 | $(ACTION)
113 |
114 | CVE-2019-3859.gen: CVE-2019-3859.md
115 | $(MARKDOWN) $< >$@
116 |
117 | CVE-2019-3860.html: CVE-2019-3860.t CVE-2019-3860.gen $(MAINPARTS)
118 | $(ACTION)
119 |
120 | CVE-2019-3860.gen: CVE-2019-3860.md
121 | $(MARKDOWN) $< >$@
122 |
123 | CVE-2019-3861.html: CVE-2019-3861.t CVE-2019-3861.gen $(MAINPARTS)
124 | $(ACTION)
125 |
126 | CVE-2019-3861.gen: CVE-2019-3861.md
127 | $(MARKDOWN) $< >$@
128 |
129 | CVE-2019-3862.html: CVE-2019-3862.t CVE-2019-3862.gen $(MAINPARTS)
130 | $(ACTION)
131 |
132 | CVE-2019-3862.gen: CVE-2019-3862.md
133 | $(MARKDOWN) $< >$@
134 |
135 | CVE-2019-3863.html: CVE-2019-3863.t CVE-2019-3863.gen $(MAINPARTS)
136 | $(ACTION)
137 |
138 | CVE-2019-3863.gen: CVE-2019-3863.md
139 | $(MARKDOWN) $< >$@
140 |
141 |
142 | clean:
143 | find . -name "*~" -exec rm {} \;
144 |
--------------------------------------------------------------------------------
/Makefile.docs:
--------------------------------------------------------------------------------
1 | ROOT=.
2 |
3 | MAINPARTS= $(ROOT)/doctype.t body.t footer.t $(ROOT)/setup.t \
4 | menu.t Makefile docmenu.t css.t
5 | OPTS=-WWW -Uunix -H -C -V -I$(ROOT) -LL
6 | FCPP=fcpp
7 | ACTION=$(FCPP) $(OPTS) $< $@
8 | MAN2HTML=roffit --bare --mandir=docs --hrefdir=.
9 |
10 | include doc.mk
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | libssh2 www
2 | ===========
3 |
4 | This is the contents of the web site for libssh2, libssh2.org.
5 |
6 | Requirements
7 | ============
8 |
9 | * GNU make
10 | * fcpp - https://github.com/bagder/fcpp
11 | * roffit - https://github.com/bagder/roffit
12 |
13 | Steps
14 | =====
15 | 1. ln -s [libssh2 git repo]/docs .
16 |
17 | 2. ln -s [libssh2 git repo] git-source
18 |
19 | 3. make
20 |
--------------------------------------------------------------------------------
/adv_20150311.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: Using SSH_MSG_KEXINIT data unbounded)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory)
8 | BOXTOP
9 |
10 | #include "adv_20150311.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/adv_20150311.txt:
--------------------------------------------------------------------------------
1 | Using `SSH_MSG_KEXINIT` data unbounded
2 | ======================================
3 |
4 | Project libssh2 Security Advisory, March 11th 2015 -
5 | [Permalink](https://www.libssh2.org/adv_20150311.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | When negotiating a new SSH session with a remote server, one of libssh2's
11 | functions for doing the key exchange (`kex_agree_methods()`) was naively
12 | reading data from the incoming packet and using it without doing sufficient
13 | range checks. The `SSH_MSG_KEXINIT` packet arrives to libssh2 with a set of
14 | strings, sent as a series of LENGTH + DATA pairs. libssh2 would go through the
15 | list and read the LENGTH field, read the string following the LENGTH and then
16 | advance the pointer LENGTH bytes in memory and expect to find the next LENGTH
17 | + DATA pair there. Then move on until seven subsequent strings are taken care
18 | of. It would naively assume that the (unsigned 32 bit) LENGTH fields were
19 | valid.
20 |
21 | This packet arrives in the negotiating phase so the remote server has not yet
22 | been deemed to be a known or trusted party.
23 |
24 | A malicious attacker could man in the middle a real server and cause libssh2
25 | using clients to crash (denial of service) or otherwise read and use
26 | completely unintended memory areas in this process.
27 |
28 | There are no known exploits of this flaw at this time.
29 |
30 | INFO
31 | ----
32 |
33 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
34 | CVE-2015-1782 to this issue.
35 |
36 | AFFECTED VERSIONS
37 | -----------------
38 |
39 | - Affected versions: all versions to and including 1.4.3
40 | - Not affected versions: libssh2 >= 1.5.0
41 |
42 | libssh2 is used by many applications, but not always advertised as such!
43 |
44 | THE SOLUTION
45 | ------------
46 |
47 | libssh2 1.5.0 makes sure that the LENGTH fields read from the packet fit
48 | within the received packet size before attempting to read them, or it fails
49 | graciously.
50 |
51 | A patch for this problem is available at:
52 |
53 | https://www.libssh2.org/CVE-2015-1782.patch
54 |
55 | RECOMMENDATIONS
56 | ---------------
57 |
58 | We suggest you take one of the following actions immediately, in order of
59 | preference:
60 |
61 | A - Upgrade to libssh2 1.5.0
62 |
63 | B - Apply the patch and rebuild libssh2
64 |
65 | TIME LINE
66 | ---------
67 |
68 | It was first reported to the libssh2 project on January 25 2015. We contacted
69 | distros@openwall on March 6.
70 |
71 | libssh2 1.5.0 was released on March 11th 2015, coordinated with the
72 | publication of this advisory.
73 |
74 | CREDITS
75 | -------
76 |
77 | Reported by Mariusz Ziulek. Patch written by Mariusz Ziulek and Daniel Stenberg,
78 |
79 | Thanks a lot!
80 |
--------------------------------------------------------------------------------
/adv_20160223.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2 Security Advisory: Truncated Difffie-Hellman secret length)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 | TITLE(libssh2 Security Advisory)
8 | BOXTOP
9 |
10 | #include "adv_20160223.gen"
11 |
12 | BOXBOT
13 |
14 | #include "footer.t"
15 |
--------------------------------------------------------------------------------
/adv_20160223.txt:
--------------------------------------------------------------------------------
1 | Truncated Difffie-Hellman secret length
2 | =======================================
3 |
4 | Project libssh2 Security Advisory, February 23rd 2016 -
5 | [Permalink](https://www.libssh2.org/adv_20160223.html)
6 |
7 | VULNERABILITY
8 | -------------
9 |
10 | During the SSHv2 handshake when libssh2 is to get a suitable value for 'group
11 | order' in the Diffle Hellman negotiation, it would pass in number of *bytes*
12 | to a function that expected number of *bits*. This would result in the library
13 | generating numbers using only an 8th the number of random bits than what were
14 | intended: 128 or 256 bits instead of 1023 or 2047
15 |
16 | Using such drastically reduced amount of random bits for Diffie Hellman
17 | weakended the handshake security significantly.
18 |
19 | There are no known exploits of this flaw at this time.
20 |
21 | INFO
22 | ----
23 |
24 | The Common Vulnerabilities and Exposures (CVE) project has assigned the name
25 | CVE-2016-0787 to this issue.
26 |
27 | AFFECTED VERSIONS
28 | -----------------
29 |
30 | - Affected versions: all versions to and including 1.6.0
31 | - Not affected versions: libssh2 >= 1.7.0
32 |
33 | libssh2 is used by many applications, but not always advertised as such!
34 |
35 | THE SOLUTION
36 | ------------
37 |
38 | libssh2 1.7.0 makes sure that there's a conversion done from number of bytes
39 | to number of bits when the internal `_libssh2_bn_rand` function is called.
40 |
41 | A patch for this problem is available at:
42 |
43 | https://www.libssh2.org/CVE-2016-0787.patch
44 |
45 | RECOMMENDATIONS
46 | ---------------
47 |
48 | We suggest you take one of the following actions immediately, in order of
49 | preference:
50 |
51 | A - Upgrade to libssh2 1.7.0
52 |
53 | B - Apply the patch and rebuild libssh2
54 |
55 | TIME LINE
56 | ---------
57 |
58 | It was first reported to the libssh2 project on February 7 2016 by Andreas
59 | Schneider.
60 |
61 | libssh2 1.7.0 was released on February 23rd 2016, coordinated with the
62 | publication of this advisory.
63 |
64 | CREDITS
65 | -------
66 |
67 | Reported by Andreas Schneider.
68 |
69 | Thanks a lot!
70 |
--------------------------------------------------------------------------------
/body.t:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/changes.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 | HEAD(libssh2)
4 | #include "body.t"
5 | #include "menu.t"
6 |
7 |
Downloads using SCP or SFTP are now significantly faster
1085 |
Added a Libtool -export-symbols-regex flag to reduce the number of
1086 | exported symbols in shared libraries.
1087 |
Added a bunch of new man pages and renamed some of the previous ones
1088 |
Enhanced download performance
1089 |
Made libssh2_scp_recv() and libssh2_scp_send() deal with spaces in
1090 | filenames
1091 |
Fixed the bad randomness and off-by-one in libssh2_channel_x11_req_ex()
1092 |
Added libssh2_version()
1093 |
Fixed libssh2_channel_direct_tcpip_ex() to not fail when called a second
1094 | time
1095 |
Fixed libssh2_channel_write_ex problems in blocking situations
1096 |
'make check' runs fine on cygwin
1097 |
Added libssh2_channel_receive_window_adjust2() and deprecated
1098 | libssh2_channel_receive_window_adjust()
1099 |
better socket error handling internally on win32
1100 |
libssh2 now always set the socket non-blocking internally and deals with
1101 | the interface as blocking or non-blocking set by
1102 | libssh2_session_set_blocking.
1103 |
20 | The libssh2 offers a large amount of functions and this is an attempt to
21 | provide HTML versions of the man pages present in the source tree. These pages
22 | are updated automatically from the source code repository.
23 |
24 |
25 | Select page in the menu to the right.
26 |
27 |
28 | The functions are grouped into different subsystems:
29 |
30 |
Session
31 |
Userauth
32 |
Channel
33 |
SFTP
34 |
Publickey
35 |
36 |
37 |
38 | There is also a small collection of examples and
39 | we're always open for adding more!
40 |
41 |
23 | You will also find all examples in the distribution archive, in the
24 | example directory.
25 | BOXBOT
26 |
27 | #include "footer.t"
28 |
--------------------------------------------------------------------------------
/examples/index.t:
--------------------------------------------------------------------------------
1 | #include "doctype.t"
2 | #include "setup.t"
3 |
19 | Welcome to the examples section of the web site. This displays online versions
20 | of all the examples already present in the example
22 | directory of the release tarballs.
23 |
24 |
25 | If you end up writing any suitable examples yourself, please send them over
26 | and help us expand this section!
27 |
28 |