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 1947338 - rebase socat to 1.7.4.1
Summary: rebase socat to 1.7.4.1
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2021-05-03
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: socat
Version: 8.4
Hardware: All
OS: Linux
high
unspecified
Target Milestone: alpha
: 8.5
Assignee: Ondrej Moriš
QA Contact: BaseOS QE Security Team
Mirek Jahoda
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-08 09:16 UTC by Ondrej Moriš
Modified: 2021-11-09 20:50 UTC (History)
1 user (show)

Fixed In Version: socat-1.7.4.1-1.el8
Doc Type: Enhancement
Doc Text:
.`socat` rebased to 1.7.4 The `socat` packages have been upgraded from version 1.7.3 to 1.7.4, which provides many bug fixes and improvements. Most notably: * `GOPEN` and `UNIX-CLIENT` addresses now support `SEQPACKET` sockets. * The generic `setsockopt-int` and related options are, in the case of listening or accepting addresses, applied to the connected sockets. To enable setting options on a listening socket, the `setsockopt-listen` option is now available. * Added the `-r` and `-R` options for a raw dump of transferred data to a file. * Added the `ip-transparent` option and the `IP_TRANSPARENT` socket option. * `OPENSSL-CONNECT` now automatically uses the SNI feature and the `openssl-no-sni` option turns SNI off. The `openssl-snihost` option overrides the value of the `openssl-commonname` option or the server name. * Added the `accept-timeout` and `listen-timeout` options. * Added the `ip-add-source-membership` option. * `UDP-DATAGRAM` address now does not check peer port of replies as it did in 1.7.3. Use the `sourceport` optioon if your scenario requires the previous behavior. * New `proxy-authorization-file` option reads `PROXY-CONNECT` credentials from a file and enables to hide this data from the process table. * Added `AF_VSOCK` support for `VSOCK-CONNECT` and `VSOCK-LISTEN` addresses.
Clone Of:
Environment:
Last Closed: 2021-11-09 17:48:19 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CRYPTO-5249 0 None None None 2021-11-09 18:08:22 UTC
Red Hat Product Errata RHBA-2021:4167 0 None None None 2021-11-09 17:48:26 UTC

Description Ondrej Moriš 2021-04-08 09:16:31 UTC
Description of problem:

We are rebasing socat to 1.7.4.1. Changelog is as follows:

 * https://fossies.org/linux/privat/socat-1.7.4.1.tar.gz/socat-1.7.4.1/CHANGES

More detailed changelog:

 * https://fossies.org/diffs/socat/1.7.3.3_vs_1.7.3.4/
 * https://fossies.org/diffs/socat/1.7.3.4_vs_1.7.4.0/
 * https://fossies.org/diffs/socat/1.7.4.0_vs_1.7.4.1/
Version-Release number of selected component (if applicable):

socat-1.7.3.3-2.el8

Comment 1 Ondrej Moriš 2021-04-08 10:13:24 UTC
I reviewed changelog:

 * 1.7.4.1 
   - minor bugfix release related to ssl mode 
   - changes tested by OPENSSL_STREAM_TO_SERVER upstream test

 * 1.7.4.0 
   - bugfixes, security fixes and new features 
   - security fix tested by BLKSIZE_INT_OVERFL upstream test
   - bugfixed tested by the following upstream tests
     + UNBALANCED_QUOTE
     + O_DIRECT
     + UNIX_SENDTO_UNLINK 
     + UNIX_CONNECT_UNLINK
     + OPENSSL_DTLS_CLIENT
     + OPENSSL_DTLS_SERVER
     + OPENSSL_METHOD_DTLS1
     + OPENSSL_METHOD_DTLS1.2
     + OPENSSLRENEG1
     + OPENSSLRENEG2
   - new features are covered by the following tests
     + SCTP_SERVICENAME
     + OPENSSL_MIN_VERSION
     + GOPENUNIXSEQPACKET
     + SETSOCKOPT
     + SETSOCKOPT_LISTEN
     + OPENSSL_SERVERALTAUTH
     + OPENSSL_SERVERALTIP4AUTH
     + OPENSSL_SERVERALTIP6AUTH
     + OPTION_RAW_DUMP
     + OPENSSL_SNI OPENSSL_NO_SNI
     + ACCEPTTIMEOUT
     + UDP_DATAGRAM_SOURCEPORT
     + PROXYAUTHFILE

 * 1.7.3.4
   - bugfix release
   - changes tested by the following upstream tests
     + TERMIOS_PH_ALL
     + IP_SENDTO_6
     + MULTIPLE_EOF

Therefore there is no need to create a new test coverage. We have already a beaker test running upstream testsuite and hence we only need to make sure all tests are executed there and passing.

Comment 2 Ondrej Moriš 2021-04-08 10:15:04 UTC
Granting qa_ack+ for RHEL-8.5.0.

Acceptance Criteria:

 * [gating] upstream testsuite passes on RHEL

Comment 7 Ondrej Moriš 2021-05-04 11:38:49 UTC
Please notice that the current coverity scan reveals a couple of issues present in this rebase:

 * https://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/70421/190657/

In particular, there are three security related defects and two of them are actually re-introcuced by this rebase - they are both related to "strncpy(ifr.ifr_name, ...., IFNAMSIZ)" (in xio-tun.c and sysutils.c). 

These issues were first reported a long time ago as BZ#1022048 and fixed in upstream in socat rebase to 1.7.2.4 [1] and in RHEL-7.4.0 via rebase to 1.7.3.2 in BZ#1085024. Notice that the fix actually does not change IFNAMSIZ to IFNAMSIZ-1 (as might be expected). Instead, these two strncpy calls are explicitly marked as being "ok" (while other usages of strncpy were corrected). The reason behind this is that ioctl() in kernel is actually presumed doing the null termination itself where it does matter. Hence there is currently a limited risk of buffer overflow. 

Nevertheless, for some reason, Paul addressed these two coverity defects in RHEL-8.2 socat rebase to 1.7.3.3 in BZ#1723581 by adding socat-1.7.3.3-warn.patch (addressing also other minor defect). There are no further details about this and since neither Paul nor Jaroslav (QE) are no longer in Red Hat I can only assume Paul wanted to have coverity scan [3] almost all cleared by fixing these coverity defects despite the fact that they are harmless. This patch was removed in this rebase and two coverity defects its removal revealed (again) were waived as negligible [4].

First and foremost, this is not a regression - original problem (BZ#1085024) was fixed in a way that is still present in this rebase. 

Would it make sense to reintroduce the patch again to mitigate these two coverity defects? If there would not be any other defects then I would do that. But this rebase introduces a lot of different coverity issues as well. Some of them are false positives, others are already reported upstream. They should better be addressed there first. I will suggest to upstream to address aforementioned two stncpy isssue in in the future either by not using strncpy or by using IFNAMSIZ-1 and explicitly null-terminating ifr.ifr_name variable. This approach is used widely.

[1] https://repo.or.cz/socat.git/commit/e4c6f3d93442b96cffac08023f18b5adc45fe1e0
[2] http://pkgs.devel.redhat.com/cgit/rpms/socat/tree/socat-1.7.3.3-warn.patch?h=rhel-8.2.0
[3] https://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/40670/141567/
[4] https://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/70421/190652/#waiver_15332

Comment 12 errata-xmlrpc 2021-11-09 17:48:19 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 (socat bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:4167


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