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 592850 - vsftpd binds to both ipv4 and ipv6 addresses when listen_ipv6 is enabled
Summary: vsftpd binds to both ipv4 and ipv6 addresses when listen_ipv6 is enabled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vsftpd
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Skala
QA Contact: Aleš Mareček
URL:
Whiteboard:
Depends On:
Blocks: 450853
TreeView+ depends on / blocked
 
Reported: 2010-05-17 07:42 UTC by Radek Bíba
Modified: 2016-06-22 09:33 UTC (History)
5 users (show)

Fixed In Version: vsftpd-2.2.2-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 19:57:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The patch sets socket option to listen on IPv6 only (1.60 KB, patch)
2010-05-17 09:50 UTC, Jiri Skala
mhlavink: review+
Details | Diff

Description Radek Bíba 2010-05-17 07:42:32 UTC
Description of problem:
The 'listen' option is described this way:

...listens on IPv4 sockets. This directive cannot be used in conjunction with the listen_ipv6 directive.

And 'listen_ipv6' this way:

...enables listening on IPv6 sockets. To listen on IPv4 and IPv6 sockets, you must run two copies of vsftpd with two configuration files.

However, it turns out that vsftpd is reachable via both ipv4 and ipv6 when the former is disabled and the latter enabled. This is caused by the fact that the 'net.ipv6.bindv6only' kernel parameter is set to 0 by default in RHEL, so for any process that opens an ipv6 port, the same ipv4 port number is opened automatically.

vsftpd should make sure that the server is accessible via ipv6 only in this case. It can be accomplished by appropriate setsockopt() flags.

Version-Release number of selected component (if applicable):
vsftpd-2.2.2-3.el6

Comment 1 RHEL Program Management 2010-05-17 07:55:15 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Jiri Skala 2010-05-17 09:50:15 UTC
Created attachment 414499 [details]
The patch sets socket option to listen on IPv6 only

Comment 6 releng-rhel@redhat.com 2010-07-02 19:57:28 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 7 David Woodhouse 2011-07-14 17:05:08 UTC
The way I see it, this was a *documentation* bug. The documentation lied, and we should have changed the documentation to tell the truth.

Changing the code to match the documentation has *broken* vsftpd, which no longer listens for Legacy IP connections and IPv6 at the same time.

See related bug 450853.

We should fix the documentation so that it makes it explicit that 'listen_ipv6=YES' also listens on Legacy IP (which fixes this bug). And we should change the default vsftpd.conf to make that the default (which fixes bug 450853).

Comment 8 Vadim Grinco 2012-07-11 11:48:33 UTC
I completely agree with David. I need to serve ftp over both IPv4 and IPv6 and I currently see no other way doing that than running two separate vsftpd instances - which is lame and completely wrong!

Bug 839257 open to revert that change.


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