1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00
Commit Graph

1860 Commits

Author SHA1 Message Date
Michael Buckley
f15b1e297f More 1.8.0 security fixes (#316)
* Defend against possible integer overflows in comp_method_zlib_decomp.

* Defend against writing beyond the end of the payload in _libssh2_transport_read().

* Sanitize padding_length - _libssh2_transport_read(). https://libssh2.org/CVE-2019-3861.html

This prevents an underflow resulting in a potential out-of-bounds read if a server sends a too-large padding_length, possibly with malicious intent.

* Prevent zero-byte allocation in sftp_packet_read() which could lead to an out-of-bounds read. https://libssh2.org/CVE-2019-3858.html

* Check the length of data passed to sftp_packet_add() to prevent out-of-bounds reads.

* Add a required_size parameter to sftp_packet_require et. al. to require callers of these functions to handle packets that are too short. https://libssh2.org/CVE-2019-3860.html

* Additional length checks to prevent out-of-bounds reads and writes in _libssh2_packet_add(). https://libssh2.org/CVE-2019-3862.html
libssh2-1.8.1
2019-03-14 15:19:59 -07:00
Will Cosgrove
c286e4d82f 1.8 Security fixes (#314)
* fixed possible integer overflow in packet_length

CVE https://www.libssh2.org/CVE-2019-3861.html

* fixed possible interger overflow with userauth_keyboard_interactive

CVE https://www.libssh2.org/CVE-2019-3856.html

* fixed possible out zero byte/incorrect bounds allocation

CVE https://www.libssh2.org/CVE-2019-3857.html

* bounds checks for response packets

* fixed integer overflow in userauth_keyboard_interactive

CVE https://www.libssh2.org/CVE-2019-3863.html

* 1.8.1 release notes
2019-03-14 13:14:28 -07:00
Daniel Stenberg
30e9c1347e RELEASE-NOTES: adjusted for 1.8.0 libssh2-1.8.0 2016-10-25 08:43:39 +02:00
Kamil Dudka
e9207ee2d1 Revert "aes: the init function fails when OpenSSL has AES support"
This partially reverts commit f4f2298ef3
because it caused the compatibility code to call initialization routines
redundantly, leading to memory leakage with OpenSSL 1.1 and broken curl
test-suite in Fedora:

88 bytes in 1 blocks are definitely lost in loss record 5 of 8
   at 0x4C2DB8D: malloc (vg_replace_malloc.c:299)
   by 0x72C607D: CRYPTO_zalloc (mem.c:100)
   by 0x72A2480: EVP_CIPHER_meth_new (cmeth_lib.c:18)
   by 0x4E5A550: make_ctr_evp.isra.0 (openssl.c:407)
   by 0x4E5A8E8: _libssh2_init_aes_ctr (openssl.c:471)
   by 0x4E5BB5A: libssh2_init (global.c:49)
2016-10-20 17:32:27 +02:00
Charles Collicutt
29bcf75fb1 libssh2_wait_socket: Fix comparison with api_timeout to use milliseconds (#134)
Fixes #74
2016-10-19 09:49:37 +02:00
Charles Collicutt
15851ba78e Set err_msg on _libssh2_wait_socket errors (#135) 2016-10-19 09:46:41 +02:00
Daniel Stenberg
c4c60eac5c Revert "travis: Test mbedtls too"
This reverts commit 3e6de50a24.

Travis doesn't seem to support the mbedtls-dev package
2016-10-17 10:15:16 +02:00
Daniel Stenberg
e46b4f9448 maketgz: support "only" to only update version number locally
and fix the date output locale
2016-10-17 09:46:18 +02:00
Daniel Stenberg
42941b44f8 configure: make the --with-* options override the OpenSSL default
... previously it would default to OpenSSL even with the --with-[crypto]
options used unless you specificly disabled OpenSSL. Now, enabling another
backend will automatically disable OpenSSL if the other one is found.
2016-09-27 08:06:35 +02:00
Keno Fischer
1b808234e3 docs: Add documentation on new cmake/configure options 2016-09-27 08:06:35 +02:00
Keno Fischer
dc8f7ca3ab configure: Add support for building with mbedtls 2016-09-27 08:06:35 +02:00
wildart
3e6de50a24 travis: Test mbedtls too 2016-09-27 08:06:34 +02:00
wildart
186f1a2d75 crypto: add support for the mbedTLS backend
Closes #132
2016-09-27 08:06:29 +02:00
wildart
289e9482e4 cmake: Add CLEAR_MEMORY option, analogously to that for autoconf 2016-09-27 08:02:55 +02:00
Daniel Stenberg
aa2ae0c359 README.md: fix link typo 2016-09-27 00:17:29 +02:00
Daniel Stenberg
7b2c445349 README: markdown version to look nicer on github 2016-09-27 00:16:45 +02:00
Taylor Holberton
64ebfd8182 openssl: add OpenSSL 1.1.0 compatibility 2016-09-05 12:28:51 +02:00
Antenore Gatta
32d0965ca4 tests: HAVE_NETINET_IN_H was not defined correctly (#127)
Fixes #125
2016-09-04 00:44:24 +02:00
Daniel Stenberg
daf2cc1470 SECURITY: fix web site typo 2016-08-21 10:41:23 +02:00
Daniel Stenberg
ef8063b924 SECURITY: security process 2016-08-20 17:37:25 +02:00
Alexander Lamaison
cf80f2f4b5 Basic dockerised test suite.
This introduces a test suite for libssh2. It runs OpenSSH in a Docker
container because that works well on Windows (via docker-machine) as
well as Linux. Presumably it works on Mac too with docker-machine, but
I've not tested that.

Because the test suite is docker-machine aware, you can also run it
against a cloud provider, for more realistic network testing, by setting
your cloud provider as your active docker machine. The Appveyor CI setup
in this commit does that because Appveyor doesn't support docker
locally.
2016-08-14 16:03:25 +01:00
Viktor Szakats
1fc7c8571e misc.c: Delete unused static variables
Closes #114
2016-08-03 10:15:59 +02:00
Will Cosgrove
7934c9ce2a Merge pull request #103 from willco007/patch-2
Fix for security issue CVE-2016-0787
2016-04-09 00:54:03 +02:00
Zenju
ded55537ac Fix MSVC 14 compilation errors
For _MSC_VER == 1900 these macros are not needed and create problems:



1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file libssh2-files\src\mac.c)

1> \win32\libssh2_config.h(27): note: see previous definition of 'snprintf' (compiling source file libssh2-files\src\mac.c)

1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file libssh2-files\src\mac.c)
2016-04-02 11:19:04 +01:00
Brad Harder
4138f1e412 _libssh2_channel_open: speeling error fixed in channel error message 2016-03-26 23:57:14 +01:00
Alexander Lamaison
7b9a9a782d Link with crypt32.lib on Windows.
Makes linking with static OpenSSL work again.  Although it's not
required for dynamic OpenSSL, it does no harm.

Fixes #98.
2016-03-15 22:09:13 +00:00
Craig A. Berry
e6278aa2a6 Tweak VMS help file building.
Primarily this is handling cases where top-level files moved into
the docs/ directory.  I also corrected a typo and removed the
claim that libssh2 is public domain.
2016-03-15 21:58:26 +00:00
Craig A. Berry
a239e637c9 Build with standard stat structure on VMS.
This gets us large file support, is available on any VMS release
in the last decade and more, and gives stat other modern features
such as 64-bit ino_t.
2016-03-15 21:57:45 +00:00
Craig A. Berry
8a903d1083 Update vms/libssh2_config.h.
VMS does have stdlib.h, gettimeofday(), and OpenSSL.  The latter
is appropriate to hard-wire in the configuration because it's
installed by default as part of the base operating system and
there is currently no libgcrypt port.
2016-03-15 21:57:13 +00:00
Craig A. Berry
f6a4ccf22b VMS can't use %zd for off_t format.
%z is a C99-ism that VMS doesn't currently have; even though the
compiler is C99-compliant, the library isn't quite.  The off_t used
for the st_size element of the stat can be 32-bit or 64-bit, so
detect what we've got and pick a format accordingly.
2016-03-15 21:56:47 +00:00
Craig A. Berry
0268b974a7 Normalize line endings in libssh2_sftp_get_channel.3.
Somehow it got Windows-style CRLF endings so convert to just LF,
for consistency as well as not to confuse tools that will regard
the \r as content (e.g. the OpenVMS help librarian).
2016-03-15 21:55:56 +00:00
Dan Fandrich
a8dff80726 libgcrypt: Fixed a NULL pointer dereference on OOM 2016-02-29 23:55:29 +01:00
Viktor Szakats
433c327ee2 url updates, HTTP => HTTPS
Closes #87
2016-02-24 23:44:13 +01:00
Dan Fandrich
7faa0e466f RELEASE-NOTES: removed some duplicated names 2016-02-23 21:23:48 +01:00
Daniel Stenberg
6d553a7bb9 web: the site is now HTTPS libssh2-1.7.0 2016-02-23 08:52:47 +01:00
Daniel Stenberg
da6676483b RELEASE-NOTES: 1.7.0 release 2016-02-23 08:25:01 +01:00
Daniel Stenberg
ca5222ea81 diffie_hellman_sha256: convert bytes to bits
As otherwise we get far too small numbers.

Reported-by: Andreas Schneider

CVE-2016-0787
2016-02-23 08:23:19 +01:00
Alexander Lamaison
d453f4ce3c Allow CI failures with VS 2008 x64.
Appveyor doesn't support this combination.
2016-02-18 21:56:04 +00:00
Viktor Szakats
1fcf849e15 GNUmakefile: list system libs after user libs
Otherwise some referenced WinSock functions will fail to
resolve when linking against LibreSSL 2.3.x static libraries
with mingw.

Closes #80
2016-02-16 00:11:32 +01:00
Viktor Szakats
65a4528d17 openssl: apply new HAVE_OPAQUE_STRUCTS macro
Closes #81
2016-02-16 00:08:43 +01:00
Viktor Szakats
0ffb3bfafe openssl: fix LibreSSL support after OpenSSL 1.1.0-pre1/2 support 2016-02-16 00:08:08 +01:00
Alexander Lamaison
30221cfe5d sftp.h: Fix non-C90 type.
uint64_t does not exist in C90.  Use libssh2_uint64_t instead.
2016-02-14 22:12:10 +00:00
Alexander Lamaison
fb2840bc9c Exclude sshd tests from AppVeyor.
They fail complaining that sshd wasn't invoked with an absolute path.
2016-02-14 21:38:12 +00:00
Alexander Lamaison
78043ff25d Test on more versions of Visual Studio. 2016-02-14 20:57:03 +00:00
Alexander Lamaison
5eac3edda5 Fix Appveyor builds. 2016-02-14 20:49:31 +00:00
Viktor Szakats
298f056fd6 openssl: add OpenSSL 1.1.0-pre3-dev compatibility
by using API instead of accessing an internal structure.

Closes #83
2016-02-14 10:56:37 +01:00
Daniel Stenberg
652ae4d134 RELEASE-NOTES: synced with 996b04ecec 2016-02-12 16:19:26 +01:00
Daniel Stenberg
996b04ecec include/libssh2.h: next version is 1.7.0 2016-02-12 16:19:06 +01:00
Daniel Stenberg
8d568d6c3b configure: build "silent" if possible 2016-02-11 14:00:37 +01:00
Daniel Stenberg
ae484b426c sftp: re-indented some minor stuff 2016-02-11 13:57:14 +01:00