Bug 1849069 - libssh ssh_channel_read() randomly returns error
Summary: libssh ssh_channel_read() randomly returns error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libssh
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anderson Sasaki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-19 14:28 UTC by Anderson Sasaki
Modified: 2020-07-10 01:00 UTC (History)
6 users (show)

Fixed In Version: libssh-0.9.4-3.fc32 libssh-0.9.4-3.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-04 01:12:02 UTC
Type: Bug


Attachments (Terms of Use)

Description Anderson Sasaki 2020-06-19 14:28:30 UTC
Description of problem:

The client may return error after successfully reading all data available from the server. Depending on the time the client detects the server closed the channel, it may return an error.

Version-Release number of selected component (if applicable):
libssh-0.9.4-2

How reproducible:
non-deterministic (depends on a race-condition)

Steps to Reproduce:
1. Compile exec example application available in libssh upstream repository: https://gitlab.com/libssh/libssh-mirror/-/blob/master/examples/exec.c
2. Start sshd and run the exec example application

Actual results:
Sometimes the exec example exits returning 1 for error instead of zero for success.

Expected results:
The exec example always returns zero for success

Additional info:
When libssh client is configured to be verbose, the following error message is printed to the log:

ssh_channel_read_timeout:  Remote channel is closed.

To configure libssh client to be verbose, run:

$ echo "LogLevel VERBOSE" >> ~/.ssh/config

Comment 1 Anderson Sasaki 2020-06-19 14:31:20 UTC
This bug was originally reported in https://bugs.libssh.org/T231

Comment 2 Fedora Update System 2020-06-24 12:14:08 UTC
FEDORA-2020-cecb600a30 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-cecb600a30

Comment 3 Fedora Update System 2020-06-24 12:15:06 UTC
FEDORA-2020-10ae0b41b9 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-10ae0b41b9

Comment 4 Fedora Update System 2020-06-25 00:58:18 UTC
FEDORA-2020-cecb600a30 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-cecb600a30`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-cecb600a30

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-06-25 01:03:43 UTC
FEDORA-2020-10ae0b41b9 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-10ae0b41b9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-10ae0b41b9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-07-04 01:12:02 UTC
FEDORA-2020-10ae0b41b9 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-07-10 01:00:48 UTC
FEDORA-2020-cecb600a30 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.