Andreas Schneider
1dd8466f66
sftp: Use ssh_buffer_pack() in sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
8b19ef05f3
sftp: Reformat sftp_canonicalize_path()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
7e11e41a9f
sftp: Use sftp_buffer_pack() in sftp_fstatvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
5914ea7c75
sftp: Reformat sftp_fstatvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
f1e84d5e67
sftp: Use ssh_buffer_pack() in sftp_fsync()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
8e3dd09e11
sftp: Use ssh_buffer_pack() in sftp_statvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
ae0afec98d
sftp: Reformat sftp_statvfs()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
0be43c333e
sftp: Use ssh_buffer_unpack() in sftp_readlink()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
83a5d3b258
sftp: Use ssh_buffer_pack() in sftp_readlink()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:23 +02:00
Andreas Schneider
bb4bdec184
sftp: Reformat sftp_readlink()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:39:16 +02:00
Andreas Schneider
e0449ba21f
sftp: Use ssh_buffer_pack() in sftp_setstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:37:24 +02:00
Andreas Schneider
8a56b90c3e
sftp: Reformat sftp_setstat()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:36:29 +02:00
Andreas Schneider
218c67a51d
sftp: Use ssh_buffer_pack() in sftp_mkdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:36:29 +02:00
Andreas Schneider
89c525bbf1
sftp: Reformat sftp_mkdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:36:29 +02:00
Andreas Schneider
2c0baef7d4
sftp: Use ssh_buffer_pack in sftp_open()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:34:00 +02:00
Andreas Schneider
bfb6718b50
sftp: Reformat sftp_open()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:34:00 +02:00
Andreas Schneider
d99c066a0b
sftp: Use ssh_buffer_pack() in sftp_handle_close()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:34:00 +02:00
Andreas Schneider
2844942c1b
sftp: Reformat sftp_handle_close()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:34:00 +02:00
Andreas Schneider
3a729829fd
sftp: Use ssh_buffer_pack() in sftp_readdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:34:00 +02:00
Andreas Schneider
576fdbe1e8
sftp: Reformat sftp_readdir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:32:45 +02:00
Andreas Schneider
87df9cfc5d
sftp: Use ssh_buffer_pack() in sftp_opendir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:32:23 +02:00
Andreas Schneider
ea375d1605
sftp: Reformat sftp_opendir()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:32:23 +02:00
Andreas Schneider
c15bd2831f
buffer: Precalculate the size required for ssh_buffer_pack()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:32:12 +02:00
Andreas Schneider
efef877356
buffer: Only reduce the buffer size if it gets bigger than 64K
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:29:15 +02:00
Andreas Schneider
254a0f7132
buffer: Only allow to allocate a maximum of 256MB
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:27:32 +02:00
Andreas Schneider
d2131b286f
buffer: Always preallocate a buffer with 64 bytes
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:26:36 +02:00
Andreas Schneider
c1c32bda14
buffer: Rewrite ssh_buffer_free()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 18:19:58 +02:00
Andreas Schneider
a1b57d3b94
buffer: Use bool for secure buffer
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 15:00:53 +02:00
Andreas Schneider
be703974e9
buffer: Reformat buffer_shift()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 15:00:53 +02:00
Andreas Schneider
29f36791c9
buffer: Cleanup buffer_verify
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 15:00:53 +02:00
Andreas Schneider
492e3d5c77
cmake: Store Profiling and AddressSanitizer flags in the cache
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 15:00:53 +02:00
Andreas Schneider
9a3f43f4ee
cmake: Add -fstack-clash-protection
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-03 14:18:25 +02:00
Andreas Schneider
baa434ebed
cmake: Small improvements to AddCMockaTest
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-02 11:25:43 +02:00
Andreas Schneider
f99e6766d6
auth: Fix freeing memory in ssh_userauth_agent_publickey()
...
CID 1395453
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-02 10:01:47 +02:00
Andreas Schneider
3efc64112a
include: Add SSH_STRING_FREE() and SSH_STRING_FREE_CHAR()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-02 09:54:20 +02:00
Andreas Schneider
bc19f892eb
gitlab-ci: Correctly run AddressSanitizer with cmake
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 21:26:48 +02:00
Andreas Schneider
f8fc0b9dfb
messages: Fix memory leak in ssh_packet_userauth_request
...
Found by AddressSanitizer.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 21:26:37 +02:00
Andreas Schneider
1b12a2415d
gitlab-ci: Enable address sanitzer build
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 10:21:06 +02:00
Andreas Schneider
1c0ac0b12e
tests: Fix memory leaks in torture_hashes
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 10:16:56 +02:00
Andreas Schneider
ea2b403ab2
auth: Fix a memory leak in ssh_userauth_agent_publickey()
...
CID 1230358
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 09:41:11 +02:00
Andreas Schneider
8323cd791f
pki: Fix a memory leak in ssh_pki_do_sign()
...
CID 1395335
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 09:41:11 +02:00
Andreas Schneider
461ebd1e2f
packet: Add a bound check for nr_extensions
...
CID 1395335
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-01 09:40:44 +02:00
Andreas Schneider
be147e897d
doc: Update Public Key Algorithms
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 15:04:37 +02:00
Andreas Schneider
1d329236b3
gitlab-ci: Move tumbleweed to the end of the file
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00
Andreas Schneider
0c6544adcb
gitlab-ci: Only run static-analysis on tumbleweed
...
Tumbleweed offers a newer clang version and we don't really have to
waste resources.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00
Andreas Schneider
09a1d95b69
gitlab-ci: Add a clang build on tumbleweed
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00
Jakub Jelen
6b10bbea2f
tests: Properly initilize library in threads tests
...
This was already done in the torture_threads_pki.
Without the explicit initialization, we can observe random
failures tests (at least of the torture_threads_crypto) from
various threads.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00
Jakub Jelen
b4c8bd9fe4
pki: Support RSA SHA2 signatures of sessionid for server
...
This involves mostly creation of host keys proofs but needs
to follow the same procedure as the client authentication
signatures.
At the same time, the SHA2 extension is enabled in the pkd
so we are able to atomicaly provide correct signatures and
pass tests.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00
Jakub Jelen
5d13006650
server: We should list SHA2 variants in offered hostkeys
...
The SHA2 variants should be preferred. Also the buffer needs to be
extended to fit all possible public key algorithms.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00
Jakub Jelen
6fa5e8adb0
server: Support for extension negotiation
...
This includes intercepting the ext-info-c string from
the client kex proposal, configuring the server to allow using
this extension and sending the SSH_MSG_EXT_INFO packet back
to the client after the new keys are in use.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-31 14:18:34 +02:00