RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 927928 - stunnel first connection fails
Summary: stunnel first connection fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: stunnel
Version: 6.4
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: Stefan Kremen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-26 14:20 UTC by Jiri Pospisil
Modified: 2016-05-11 00:40 UTC (History)
6 users (show)

Fixed In Version: stunnel-4.29-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-11 00:40:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
stunnel log (6.74 KB, text/plain)
2013-03-26 14:20 UTC, Jiri Pospisil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0922 0 normal SHIPPED_LIVE stunnel bug fix update 2016-05-10 22:53:15 UTC

Description Jiri Pospisil 2013-03-26 14:20:29 UTC
Created attachment 716539 [details]
stunnel log

Description of problem:
When running the stunnel as daemon with config read from stdin file descriptor, the first connection always fails. This happens if stunnel is used on either server or client side.

Version-Release number of selected component (if applicable):
stunnel-4.29-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. SERVER="debug = 7
cert = $PWD/server.crt
key = $PWD/server.key
verify = 0
pid = $PWD/server.pid
output = $PWD/server.log
[server]
accept = 10001
connect = 10000
"
2. create server SSL certificate (server.crt) and key (server.key) in current working directory
3. echo foo > file.txt
4. stunnel -fd 0 <<< "$SERVER"
5. python -m SimpleHTTPServer 10000 &
6. curl -k https://localhost:10001/file.txt
7. curl -k https://localhost:10001/file.txt
  
Actual results:
first curl (6.) prints:
---
curl: (35) SSL connect error
---
second curl (7.) prints:
---
localhost.localdomain - - [26/Mar/2013 14:58:23] "GET /file.txt HTTP/1.1" 200 -
foo
---

Expected results:
Both curl runs are successful.

Additional info:
I. stunnel log attached. The timescale is:
2013.03.26 15:06:49 - startup
2013.03.26 15:06:55 - first (failing) curl connection
2013.03.26 15:07:01 - second (working) curl connection
2013.03.26 15:07:06 - exit

II. If the same config is loaded from a file, the first connection works well. This can be achieved by modifying stunnel execution (4.) as follows:
printf "$SERVER" > server.conf; stunnel server.conf

III. This bug appears to be already fixed upstream, as it is no longer an issue in the current upstream version (4.56)

Comment 1 Jiri Pospisil 2013-03-26 14:28:17 UTC
Sorry, I mixed it up a little. The working curl connection prints just "foo" (i.e. file.txt contents). The "GET /file.txt HTTP/1.1" line was printed by the python's SimpleHTTPServer running in background.

Comment 6 Tomas Mraz 2015-12-18 12:58:20 UTC
I have patch for this.

Comment 11 errata-xmlrpc 2016-05-11 00:40:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0922.html


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