1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00
Commit Graph

3708 Commits

Author SHA1 Message Date
4aef82237d Comment that ssh_forward_cancel() is deprecated.
Signed-off-by: Aris Adamantiadis <aris@badcode.be>
2015-05-29 11:29:49 +02:00
8a4a22d7b7 Reintroduce ssh_forward_listen() (Fixes: #194)
Signed-off-by: Aris Adamantiadis <aris@badcode.be>
2015-05-29 11:23:31 +02:00
5eb7a6ca38 cpack: Use application version.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-08 13:54:56 +02:00
3f4b5436e5 Bump version to 0.7.0
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 11:01:33 +02:00
82cf5ea24c Update ChangeLog
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 11:00:43 +02:00
90e4786523 valgrind: Add suppression for openssl FIPS dlopen leak
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 10:27:09 +02:00
f65f41acc2 valgrind: Ignore valgrind free bug on exit
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 10:23:27 +02:00
8979150745 tests: Migrate torture_keyfiles to testkey functions
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 09:47:37 +02:00
f81d296e54 torture: Move TORTURE_TESTKEY_PASSWORD to header
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 09:47:17 +02:00
57afe78167 tests: Fix memory leak in torture_server_x11 test
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-06 09:33:51 +02:00
ee460dc04b kex: also compare host keys for 'first_kex_packet_follows'
Also consider the host key type at hand when computing whether a
'first_kex_packet_follows' packet matches the current server settings.
Without this change libssh may incorrectly believe that guessed
settings which match by kex algorithm alone fully match: the host
key types must also match.  Observed when testing with dropbear
clients.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 22:03:47 +02:00
f134cb3d57 server: return SSH_OK for ignored SSH_MSG_KEXDH_INIT case
Return SSH_OK for the case that an incoming SSH_MSG_KEXDH_INIT should be
ignored.  That is, for the case that the initial 'first_kex_packet_follows'
guess is incorrect.  Before this change sessions served with libssh can be
observed to error out unexpectedly early when testing with dropbear clients
that send an incompatible guess.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 22:03:32 +02:00
3eaad77de2 tests: Only link against threading library if available
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 19:09:51 +02:00
9244750a63 cmake: Add missing OpenSSL include directory
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 19:04:49 +02:00
e8720a30e2 cmake: Add --enable-stdcall-fixup for MinGW builds
This fixes warnings for getaddrinfo() and freeaddrinfo().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 18:59:30 +02:00
ad09009201 include: Fix variadic macro issues with MSVC
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 18:45:47 +02:00
e4e3b3052f tests: Apply umask before calling mkstemp()
CID: #978660

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 11:27:09 +02:00
96882cc58c example: Fix a use after free in the scp example
CID: #1032343

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 11:27:09 +02:00
7c79959e94 example: Check return value of ssh_get_fd()
CID: #1199454

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 11:27:09 +02:00
ca501df8c8 sftp: Fix size check
CID: #1296588

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-05 11:26:40 +02:00
a4cecf59d5 external: Fix resetting the state
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 18:10:30 +02:00
244881b87d external: Make sure we burn buffers in bcrypt
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
cf05e653de external: Fix a possible buffer overrun in bcrypt_pbkdf
CID: #1250106

This fixes a 1 byte output overflow for large key length (not reachable
in libssh). Pulled from OpenBSD BCrypt PBKDF implementation.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
4b9916136d sftp: Add bound check for size
CID: #1238630

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
33ecff11dd buffer: Cleanup vaargs in ssh_buffer_unpack_va()
CID: #1267977

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
83d3ee7fdb string: Improve ssh_string_len() to avoid tainted variables
CID: #1278978

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
b1a3f4ee33 pki_container: Fix a memory leak
CID: #1267980

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
05498e0e33 pki_container: Add check for return value
CID: #1267982

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 17:54:01 +02:00
4948fe21cd tests: Fix ctest default script
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 15:52:17 +02:00
fe8fcb805c cmake: Add support for Address Sanitizer
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 15:25:17 +02:00
c4af6fbce3 config: Add missing HAVE_ARPA_INET_H define
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-04 10:04:26 +02:00
3091025472 buffers: Fix a possible null pointer dereference
This is an addition to CVE-2015-3146 to fix the null pointer
dereference. The patch is not required to fix the CVE but prevents
issues in future.

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-23 10:33:52 +02:00
bf0c7ae0ae CVE-2015-3146: Fix state validation in packet handlers
The state validation in the packet handlers for SSH_MSG_NEWKEYS and
SSH_MSG_KEXDH_REPLY had a bug which did not raise an error.

The issue has been found and reported by Mariusz Ziule.

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-23 10:15:47 +02:00
b5dc8197f7 Fix leak of sftp->ext when sftp_new() fails
Signed-off-by: Kevin Fan <kevinfan@google.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-14 20:56:56 +02:00
19e23e6128 cmake: Require cmake 2.8.5
I've improved FindOpenSSL and FindZLIB in that version to work well with
Windows and Linux. This was 2011 it should be old enough that most
distributions have at least this version available.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 14:35:29 +02:00
195f25cfbd cmake: Detect network function correctly on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 13:32:09 +02:00
1cb940c44a socket: Cleanup ssh_socket_close() code.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 13:32:09 +02:00
3f04367fb8 bind: Correctly close sockets and invalidate them.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 13:32:09 +02:00
6c7e552509 cmake: Require cmake version 2.8.0 2015-04-10 13:32:09 +02:00
b1cb8de385 cmake: Check for sys/param.h header file
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 13:07:12 +02:00
69c9cd029f cmake: Check for arpa/inet.h header file
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 13:02:56 +02:00
c699b9ca94 external: Use standard int types
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-10 13:02:56 +02:00
53586ed4ba include: Do not make x11 variables const
We allocate them and also free them after the callback has been
executed.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-02 16:19:45 +02:00
5236358a48 messages: Don't leak memory after callback execution
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-02 16:13:20 +02:00
d6fe9dc220 unittests: Fix memory leak in torture_pki_ed25519
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-02 15:05:19 +02:00
e0a73d3dbe poll: Fix compilation with struct ssh_timestamp
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-02 15:02:29 +02:00
dbe7df7571 cmake: Detect __func__ and __FUNCTION__ during configure step
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-02 13:41:02 +02:00
a3357b8920 include: We should use __func__ which is C99
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-04-02 10:58:36 +02:00
7ec798d3e7 Locally restart ssh_poll() upon EINTR.
BUG: https://red.libssh.org/issues/186

Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
Signed-off-by: Sebastien Boving <seb@google.com>
2015-02-23 22:05:54 +01:00
f32e5f2191 Sending EOF on Socket that received a Broken Pipe makes call to poll to hang
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
Signed-off-by: Joao Pedro Almeida Pereira <joao.almeida@blue-tc.com>
2015-02-23 22:01:15 +01:00