Anderson Toshiyuki Sasaki
e5ff7aa410
CVE-2018-10933: Check channel state when OPEN_FAILURE arrives
...
When a SSH2_MSG_OPEN_FAILURE arrives, the channel state is checked
to be in SSH_CHANNEL_STATE_OPENING.
Fixes T101
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2018-10-09 11:45:59 +02:00
Anderson Toshiyuki Sasaki
3837a0547f
CVE-2018-10933: Check channel state when OPEN_CONFIRMATION arrives
...
When a SSH2_MSG_OPEN_CONFIRMATION arrives, the channel state is checked
to be in SSH_CHANNEL_STATE_OPENING.
Fixes T101
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com >
2018-10-09 11:45:58 +02:00
David Kedves
0bf78b0b8b
channels: Bugfix for a possible invalid pointer usage (channel->session) in various places
...
BUG: https://red.libssh.org/issues/230
Signed-off-by: David Kedves <kedazo@severalnines.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit d7df4429eb )
2016-05-02 15:32:16 +02:00
Peter Volpe
03972b16c9
channels: Fix exit-signal data unpacking
...
Signed-off-by: Peter Volpe <pvolpe@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
(cherry picked from commit 7637351065 )
2015-06-29 09:50:28 +02:00
Aris Adamantiadis
5aeae08be0
channels: fix exit-status not correctly set
2015-06-03 16:41:19 +02:00
Mike DePaulo
64a658acaa
Comment that ssh_forward_cancel() is deprecated.
...
Signed-off-by: Aris Adamantiadis <aris@badcode.be >
2015-05-29 11:30:32 +02:00
Mike DePaulo
361940a5d7
Reintroduce ssh_forward_listen() ( Fixes : #194 )
...
Signed-off-by: Aris Adamantiadis <aris@badcode.be >
2015-05-29 11:24:27 +02:00
Aris Adamantiadis
506e11fa8b
buffers: adapt channels.c to ssh_buffer_(un)pack()
...
Reviewed-by: Andreas Schneider <asn@samba.org >
2014-08-06 09:33:03 +02:00
Gangadhar Sandrani
d6e6a453fc
log: Fix log levels.
...
Signed-off-by: Gangadhar Sandrani <gangadhar.sandrani@gmail.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-04-22 09:35:33 +02:00
Andreas Schneider
adf23533e0
doc: Improve docs for ssh_channel_get_exit_status().
...
BUG: https://red.libssh.org/issues/154
2014-04-10 08:54:11 +02:00
Andreas Schneider
927cd90dc1
channels: Fix exit-signal request.
...
BUG: https://red.libssh.org/issues/153
2014-04-10 08:54:11 +02:00
Jon Simons
dee8e5688b
channel: check for closed state in waitwindow loops
...
Signed-off-by: Jon Simons <jon@jonsimons.org >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-03-27 10:34:22 +01:00
Audrius Butkevicius
a277dd9277
Add session/channel byte/packet counters
...
Signed-off-by: Audrius Butkevicius <audrius.butkevicius@elastichosts.com >
2014-02-12 18:21:16 +01:00
Jon Simons
f7b61bf557
doc: correct ssh_channel_read_timeout units
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-02-02 22:19:46 +01:00
Oleksandr Shneyder
d904784489
Make function ssh_channel_accept() nonblocking if timeout is 0.
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-02-02 22:19:45 +01:00
Andreas Schneider
cb9786b3ae
src: Rename buffer_add_data() to ssh_buffer_add_data().
2014-01-19 20:55:55 +01:00
Andreas Schneider
9c4144689d
src: Rename buffer_init to ssh_buffer_init().
2014-01-19 20:43:29 +01:00
Andreas Schneider
e745236ae5
doc: Fix channel documentation.
2014-01-17 11:08:49 +01:00
Andreas Schneider
5229253f86
channel: Fix the name scheme of the forward functions.
2014-01-16 09:13:06 +01:00
Oleksandr Shneyder
a1c4fc07d4
channel: Add ssh_channel_accept_forward().
...
This works same way as ssh_forward_accept() but can return a destination
port of the channel (useful if SSH connection forwarding several TCP/IP
ports).
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2014-01-16 09:12:03 +01:00
Andreas Schneider
6fe51b13fb
src: Update my mail address.
2014-01-07 16:08:23 +01:00
Aris Adamantiadis
aecd952d18
update copyright information
2014-01-07 15:18:15 +01:00
Jon Simons
20b5734649
channel: fix setting of channel->flags
...
Fix the setting of 'channel->flags' to use '|='. Before this
change, one bug symptom can be that channels are never fully
free'd via ssh_channel_free, resulting in memory leaks.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-12-11 21:02:47 +01:00
Andreas Schneider
d65777b570
channels: Add a ssh_channel_read_timeout function.
2013-12-04 20:34:13 +01:00
Jon Simons
3d934f3ddc
channel: fix infinite loop in channel_write_common
...
BUG: https://red.libssh.org/issues/130
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-11-22 10:34:23 +01:00
Rod Vagg
06cc94eecf
flush channel after EOF and CLOSE
2013-11-18 17:22:30 +01:00
Andreas Schneider
6f0f1ef292
doc: Fix doxygen warnings.
2013-11-04 21:55:29 +01:00
Andreas Schneider
e30acdb58a
channel: Reinit the buffer and reset the state on error.
...
BUG: https://red.libssh.org/issues/126
2013-10-20 12:46:57 +02:00
Andreas Schneider
b0cbe88b0b
channel: Fix ssh_global_request_termination().
...
BUG: https://red.libssh.org/issues/126
2013-10-20 12:46:17 +02:00
Andreas Schneider
423d8c9b6a
channel: Fix packets termination timeout in global_request().
...
BUG: https://red.libssh.org/issues/126
2013-10-01 14:50:56 +02:00
Andreas Schneider
4eae4d592c
channels: Correctly handle timeouts in channel functions.
2013-09-17 11:23:56 +02:00
Andreas Schneider
566d842405
channel: Use the correct timeout option in channel_open().
...
BUG: https://red.libssh.org/issues/124
2013-09-17 11:19:49 +02:00
Andreas Schneider
3e07359a35
channels: Correctly decrement timeout value in ssh_channel_accept().
...
BUG: https://red.libssh.org/issues/116
2013-09-16 10:38:14 +02:00
Andreas Schneider
e9242a7a31
channel: Document SSH_AGAIN in ssh_channel_read().
...
BUG: https://red.libssh.org/issues/115
2013-09-16 10:38:14 +02:00
Andreas Schneider
fc8081cd06
channel: Refactor channel_write_common() code.
...
This makes it easier to read and easier to debug.
2013-08-13 08:22:28 +02:00
Andreas Schneider
7a64dd1b9a
channel: Make channel_write_common() static.
2013-08-13 08:17:15 +02:00
Andreas Schneider
5045133dc2
channel: Use MIN macro in channel_write_common().
2013-08-13 08:15:37 +02:00
Nicolas Viennot
2f674aeec1
channels: allow channel_open() to return SSH_AGAIN
...
Signed-off-by: Nicolas Viennot <nicolas@viennot.biz >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-25 22:34:51 +02:00
Andreas Schneider
11c82a26a6
channels: Fix a SSH_LOG call.
2013-07-15 08:07:34 +02:00
Andreas Schneider
c64ec43eef
src: Remove enter_function() and leave_function().
2013-07-14 13:31:24 +02:00
Andreas Schneider
ebdd0c6ac1
src: Migrate to SSH_LOG.
2013-07-14 12:44:26 +02:00
Aris Adamantiadis
ad92740dc3
server: Fix compilation without WITH_SERVER
2013-07-14 09:30:59 +02:00
Aris Adamantiadis
f528f71920
agent: the valid request is auth-agent@openssh.com
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:58:18 +02:00
Aris Adamantiadis
7e306a9ec6
server: implement server-side of agent forwarding
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:55:58 +02:00
Aris Adamantiadis
81e769ec6a
channels: implement callback for agent forwarding request
...
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:55:47 +02:00
Aris Adamantiadis
66b37c856c
session: Introduce SSH_TIMEOUT_DEFAULT
...
The default timeout of 30seconds is very nice when connecting to a new SSH
session, however it completely breaks the synchronous blocking API.
Use SSH_TIMEOUT_DEFAULT when in blocking mode so channel reads&write are blocking
as expected
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2013-07-13 14:03:42 +02:00
Aris Adamantiadis
de096910b3
Report according status when errors are detected
2012-12-27 22:01:37 +01:00
Aris Adamantiadis
6d61c3ce4a
Fix channel_write to wait during key reexchanges
2012-12-23 23:10:29 +01:00
Andreas Schneider
ab8c7de6f8
BUG 94: Fix big endian issue.
2012-12-03 12:35:36 +01:00
Andreas Schneider
68d04c8e47
CVE-2012-4559: Ensure that we don't free req twice.
2012-11-14 17:36:24 +01:00