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 1907718 - Socat udp4-recvfrom cause endless loop error when target is not vaild
Summary: Socat udp4-recvfrom cause endless loop error when target is not vaild
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: socat
Version: 7.9
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Paul Wouters
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1914989
TreeView+ depends on / blocked
 
Reported: 2020-12-15 03:49 UTC by xuchunmei
Modified: 2021-01-12 01:31 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1914989 (view as bug list)
Environment:
Last Closed: 2021-01-11 17:04:03 UTC
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description xuchunmei 2020-12-15 03:49:10 UTC
My socat version is 1.7.3.2,with the following steps,socat will get endless loop error like this:
2020/12/15 11:36:13 socat[7065] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7066] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7067] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7068] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7069] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7070] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7071] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7072] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused
2020/12/15 11:36:13 socat[7073] E connect(6, AF=2 127.0.0.1:6667, 16): Connection refused

Steps to reproduce:
1. setup ssh tunnel:
ssh -NfL 6667:192.168.122.23:6667 192.168.122.23
2. setup socket udp to tcp:
socat -T15 udp4-recvfrom:8888,reuseaddr,fork tcp:127.0.0.1:6667
3.  Kill ssh process to produce target address invalid
4. Send a udp packet to 127.0.0.1:8888



With -d -d -d -d options to debug socat, the endless loop is caused by select always return true, and recvmsg can always read data. 


2020/12/15 11:27:43 socat[4346] N receiving on AF=2 0.0.0.0:8888
2020/12/15 11:27:43 socat[4346] D select(6, &0x20, &0x0, &0x0, NULL/0.000000)
2020/12/15 11:27:43 socat[4346] D select -> (, 0x20, 0x0, 0x0, NULL/0.000000), 1
2020/12/15 11:27:43 socat[4346] D recvmsg(5, 0x7ffdeff59140{0x7ffdeff59180,112,0x7ffdeff590b0,1,0x7ffdeff59800,1024,0}, 34)
2020/12/15 11:27:43 socat[4346] D recvmsg(, {AF=2 127.0.0.1:0,16,,1,,0,}, ) -> 4


Expected results:
only print error once

Comment 3 Paul Wouters 2021-01-11 17:04:03 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7 because it is seen either as low or moderate impact to a small number of use-cases. The current release is in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We are deferring this issue to Red Hat Enterprise Linux 8, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open.

Comment 4 xuchunmei 2021-01-12 01:31:05 UTC
(In reply to Paul Wouters from comment #3)
> This issue was not selected to be included in Red Hat Enterprise Linux 7
> because it is seen either as low or moderate impact to a small number of
> use-cases. The current release is in Maintenance Support 1 Phase, which
> means that qualified Critical and Important Security errata advisories
> (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be
> released as they become available. We are deferring this issue to Red Hat
> Enterprise Linux 8, but if you believe that it qualifies for the Maintenance
> Support 1 Phase, please re-open.

Thanks, actually, the recent socat release version has fix this problem, related commit is https://repo.or.cz/socat.git/commitdiff/ff8de6c5cd4e380d7867f5fdeda15098cb55514d?spm=a2o8d.corp_prod_issue_detail_v2.0.0.78f46b86aZuLQ1


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