Aris Adamantiadis
f818e63f8f
Add new options
...
Pair-Programmed-With: Jakub Jelen <jjelen@redhat.com >
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be >
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2017-12-15 12:00:49 +01:00
Jon Simons
380390c4b6
misc: relax fatal errors in ssh_analyze_banner
...
Relax the cases where `ssh_analyze_banner` fails to extract a
major and minor version from banners which appear like OpenSSH
banners.
Update the tests to demonstrate that now a banner as might be
sent by `ssh-keyscan(1)` ("SSH-2.0-OpenSSH-keyscan") no longer
returns failure.
Signed-off-by: Jon Simons <jon@jonsimons.org >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2017-07-18 09:32:31 +02:00
Jon Simons
a89a67e008
misc: fix error-checking in ssh_analyze_banner
...
Fix error-checking for `strtoul` in `ssh_analyze_banner`, and
enable some tests which demonstrate the fix before-and-after.
Signed-off-by: Jon Simons <jon@jonsimons.org >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2017-07-13 19:35:34 +02:00
Jon Simons
a97db12f4f
misc: reindent ssh_analyze_banner, update docs
...
No changes to code, only whitespace indentation and
an update to the function docs.
Signed-off-by: Jon Simons <jon@jonsimons.org >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2017-07-13 19:34:57 +02:00
Andreas Schneider
0cb2974bd8
misc: Use strtoul in ssh_analyze_banner()
...
Thanks to Tilo Eckert.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2017-06-28 12:29:53 +02:00
Andreas Schneider
c50f2d1356
misc: Do not fall through and return a value
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2017-06-06 10:25:15 +02:00
Andreas Schneider
d5d8349224
misc: Validate integers converted from the SSH banner
...
BUG: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1181
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2017-04-21 11:02:29 +02:00
Andreas Schneider
52efbc3a23
misc: Use simpler macros for htonll and ntohll
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2016-11-07 09:39:19 +01:00
Andreas Schneider
5d1a8cd88b
cmake: Check for io.h on Windows
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2016-11-06 11:57:52 +01:00
Andreas Schneider
528b9c5323
cmake: Correctly check for sys/[u]time.h
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2016-11-06 11:52:12 +01:00
Andreas Schneider
ef751a26d0
misc: Correctly guard the sys/time.h include
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2015-06-24 17:13:19 +02:00
Joseph Southwell
6bbdaceaca
src: Define MAX_BUF_SIZE globally and use it.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-02-02 22:19:46 +01:00
Andreas Schneider
6fe51b13fb
src: Update my mail address.
2014-01-07 16:08:23 +01:00
Andreas Schneider
c4937cedea
misc: Use the szPath variable instead of calling getenv.
2013-07-16 13:36:52 +02:00
Andreas Schneider
ebdd0c6ac1
src: Migrate to SSH_LOG.
2013-07-14 12:44:26 +02:00
Andreas Schneider
bd3acae4f3
CVE-2012-4560: Fix a write one past the end of 'buf'.
2012-11-14 17:36:24 +01:00
Andreas Schneider
894bbf3137
CVE-2012-4560: Fix a write one past the end of the 'u' buffer.
2012-11-14 17:36:24 +01:00
Andreas Schneider
e04dc45f20
misc: Use a fixed buffer for getenv().
2012-10-12 14:45:54 +02:00
Andreas Schneider
a660177a6e
misc: Use strncpy instead of strcat.
...
This is just hardening the code.
Found by Coverity.
2012-10-12 14:45:36 +02:00
Andreas Schneider
191faea325
misc: Use size_t for len.
2012-10-07 18:06:33 +02:00
Andreas Schneider
61d032fc03
misc: Don't leak memory on ssh_path_expand_escape() on error.
2012-10-05 11:12:13 +02:00
Andreas Schneider
66aaa6f573
misc: Improve byte swapping of ntohll().
...
Fixes sparse warnings.
2012-02-19 13:26:02 +01:00
Andreas Schneider
3582e386b7
misc: Fix definitions of ssh_list_new().
...
Fixes sparse warnings.
2012-02-19 13:26:02 +01:00
Andreas Schneider
ee774479de
session: Use a struct for all options.
2012-02-05 11:50:49 +01:00
rofl0r
4305da29a1
session: Cleanup timeout functions.
...
It is possible that we get unrelated packets while waiting for
termination, thus waiting indefinitely. As a workaround we have to
check the user-supplied timeout.
2012-01-02 12:39:43 +01:00
Andreas Schneider
6859e4f4ec
build: Fix zlib support.
2011-09-23 22:57:21 +02:00
Andreas Schneider
dc42a1757f
gzip: Fix zlib support.
2011-09-18 21:37:18 +02:00
Aris Adamantiadis
20f8e73e3e
Update libssh to ssh_handle_packets_termination
...
cherry-picked from 0cb5248
Should resolve all timeout problems
Conflicts:
src/auth.c
src/channels.c
2011-09-02 13:58:37 +03:00
Aris Adamantiadis
6d8bb956c5
channels: replaced bugged lists with ssh_list
...
cherry-picked from 0aef5f
Conflicts:
src/session.c
2011-09-02 13:46:10 +03:00
Andreas Schneider
6c03b7a9c9
misc: Add ssh_match_group().
2011-08-22 16:16:34 +02:00
Andreas Schneider
ddcb88070b
misc: Remove session from ssh_get_local_username().
2011-08-16 23:04:25 +02:00
rofl0r
c31cac93f3
misc: Fix ssh_timeout_update().
2011-08-06 11:08:38 +02:00
Aris Adamantiadis
54fb43358c
Workaround ssh_get_user_home_dir on LDAP users
2011-07-13 12:04:46 +02:00
Andreas Schneider
640e3830f2
build: Check for ntohll().
...
This function is available on AIX.
2011-06-06 18:56:30 +02:00
Andreas Schneider
ba03388031
misc: Fix compilation on Windows.
2011-05-26 11:20:04 +02:00
Andreas Schneider
07fb895fe9
cmake: Fix detection of clock_gettime.
2011-05-25 22:08:31 +02:00
Aris Adamantiadis
65282841e2
Replace clock_gettime with gettimeofday when missing
2011-05-25 21:27:48 +02:00
Aris Adamantiadis
59f7647cd9
Introduced ssh_timeout_elapsed functions
...
Functions to mesure elapsed time before and after a serie of
calls. Introduces a dependancy to clock_gettime() and librt,
hope this doesn't break anything. Porting to gettimeofday() should
not be too hard.
2011-05-24 23:26:18 +02:00
Oliver Stöneberg
166ee451c5
build: Fixed some VS2010 problems.
2011-04-11 11:18:57 +02:00
Andreas Schneider
eea1df3574
misc: Fixed ssh_is_ipaddr_v4() on Windows.
2011-02-13 17:36:45 +01:00
Andreas Schneider
cd30a1d4b1
misc: Added working ssh_is_ipaddr for Windows.
2011-02-13 11:56:47 +01:00
Andreas Schneider
d1ddec00d9
misc: Fixed ssh_is_ipaddr on FreeBSD.
2011-02-13 10:32:47 +01:00
Andreas Schneider
b313fa944a
misc: Added ssh_is_ipaddr() function.
2011-02-12 19:08:59 +01:00
Aris Adamantiadis
7fbb926c0b
Fix getpwuid_r on opensolaris
2011-01-11 17:55:12 +01:00
Andreas Schneider
1b88542fbe
misc: Avoid redefine of _WIN32_IE.
2011-01-01 18:43:37 +01:00
Andreas Schneider
a0e98f585a
misc: Fixed a possible memory leak.
2010-12-27 18:08:30 +01:00
Andreas Schneider
be837cdbc2
misc: Fixed a typo.
2010-09-29 14:19:07 +02:00
Andreas Schneider
38359672a5
misc: Make sure ssh_analyze_banner has proper length checks.
2010-09-29 12:12:14 +02:00
Andreas Schneider
1b471256d4
misc: Differentiate between client and server in ssh_analyze_banner.
2010-09-29 12:11:43 +02:00
Andreas Schneider
30e22fed6e
misc: Fixed a possible data overread and crash bug.
2010-09-29 11:29:37 +02:00