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 682372 - appears to assume there is always an eth0 device
Summary: appears to assume there is always an eth0 device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openswan
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Paul Wouters
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 682371
Blocks: 682269
TreeView+ depends on / blocked
 
Reported: 2011-03-05 01:18 UTC by Bill Nottingham
Modified: 2014-03-17 03:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 682371
Environment:
Last Closed: 2013-08-10 19:57:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2011-03-05 01:18:27 UTC
+++ This bug was initially created as a clone of Bug #682371 +++

Description of problem:

Network devices can have arbitrary names, and due to
http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming, will have
different names in Fedora 15.

openswan-2.6.32/programs/pluto/nat_traversal.c:int nat_traversal_espinudp_socket (int sk, const char *fam, u_int32_t type)

...

                switch(kern_interface) {

                        case USE_MASTKLIPS:
                                strcpy(ifr.ifr_name, "mast0");
                                break;
                        case USE_KLIPS:
                                strcpy(ifr.ifr_name, "ipsec0");
                                break;
                        case USE_NETKEY:
                                /* Let's hope we have at least one ethernet device */
                                strcpy(ifr.ifr_name, "eth0");
                                break;
                        default:
                                /* We have nothing , really prob just abort and return -1 */
                                strcpy(ifr.ifr_name, "eth0");
                                break;
                }
                fdp[0] = sk;
                fdp[1] = type;
                r = ioctl(sk, IPSEC_UDP_ENCAP_CONVERT, &ifr);

Depending on how forgiving the kernel is, this looks like it will fail on any machine that doesn't happen to have an eth0 device.

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

openswan-2.6.32

How reproducible:

By inspection.

Comment 2 RHEL Program Management 2011-04-04 02:16:51 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Avesh Agarwal 2011-04-07 18:22:32 UTC
Here is my analysis, and reply:

(In reply to comment #0)
> +++ This bug was initially created as a clone of Bug #682371 +++
> 
> Description of problem:
> 
> Network devices can have arbitrary names, and due to
> http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming, will have
> different names in Fedora 15.
> 
> openswan-2.6.32/programs/pluto/nat_traversal.c:int
> nat_traversal_espinudp_socket (int sk, const char *fam, u_int32_t type)
> 
> ...
> 
>                 switch(kern_interface) {
> 
>                         case USE_MASTKLIPS:
>                                 strcpy(ifr.ifr_name, "mast0");
>                                 break;
>                         case USE_KLIPS:
>                                 strcpy(ifr.ifr_name, "ipsec0");
>                                 break;
>                         case USE_NETKEY:
>                                 /* Let's hope we have at least one ethernet
> device */
>                                 strcpy(ifr.ifr_name, "eth0");
>                                 break;
>                         default:
>                                 /* We have nothing , really prob just abort and
> return -1 */
>                                 strcpy(ifr.ifr_name, "eth0");
>                                 break;
>                 }
>                 fdp[0] = sk;
>                 fdp[1] = type;
>                 r = ioctl(sk, IPSEC_UDP_ENCAP_CONVERT, &ifr);
> 
> Depending on how forgiving the kernel is, this looks like it will fail on any
> machine that doesn't happen to have an eth0 device.

Not really because  I have tested it with system without eth0 and with eth0 device, and it seems to work fine. And the reason is that the call

r = ioctl(sk, IPSEC_UDP_ENCAP_CONVERT, &ifr)

always fails with NETKEY (something Openswan uses in RH products), so passing "eth0" or not does not seem to make any difference. Infact the next call 

r = setsockopt(sk, SOL_UDP, UDP_ESPINUDP, &type, sizeof(type));

decides the state of "ESP in UDP" to be set on the socket. 

So in practicality, and given the state of current code and NETKEY functionality, this does not seem an issue.

On the other hand, this code change to test on "eth0" was done by upstream recently in december 2010 to avoid issue in some other context. Before that the above test on eth0 did not exist.

> 
> Version-Release number of selected component (if applicable):
> 
> openswan-2.6.32
> 
> How reproducible:
> 
> By inspection.

That said, I have come up with some ideas to fix the root cause of the above issue, and I would be happy to discuss this with upstream, once I comp up with a patch and after testing with NETKEY. However upstream uses KLIPS, and this code changes will affect their code too. Given that I (or we at RedHat) do not test KLIPS, and it is not advisable to patch the openswan code without upstream review and their testing. 


Avesh

Comment 4 Denise Dumas 2011-04-07 18:38:35 UTC
Proposing for 6.2

Comment 5 RHEL Program Management 2011-07-06 01:38:44 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 8 RHEL Program Management 2012-05-03 05:00:51 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 9 Paul Wouters 2013-02-02 02:55:41 UTC
Filed as https://bugs.libreswan.org/show_bug.cgi?id=63

Avesh is correct in that it does not affect RHEL/Fedora that uses NETKEY, not KLIPS/MAST

Comment 10 Eric Paris 2013-08-10 19:57:12 UTC
As this is not a problem in RHEL/Fedora I am closing this bug as NOTABUG.


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