Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 592850 - vsftpd binds to both ipv4 and ipv6 addresses when listen_ipv6 is enabled
vsftpd binds to both ipv4 and ipv6 addresses when listen_ipv6 is enabled
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vsftpd (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jiri Skala
Aleš Mareček
:
Depends On:
Blocks: 450853
  Show dependency treegraph
 
Reported: 2010-05-17 03:42 EDT by Radek Bíba
Modified: 2016-06-22 05:33 EDT (History)
5 users (show)

See Also:
Fixed In Version: vsftpd-2.2.2-5.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-02 15:57:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Radek Bíba 2010-05-17 03:42:32 EDT
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 Product and Program Management 2010-05-17 03:55:15 EDT
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 05:50:15 EDT
Created attachment 414499 [details]
The patch sets socket option to listen on IPv6 only
Comment 6 releng-rhel@redhat.com 2010-07-02 15:57:28 EDT
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 13:05:08 EDT
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 07:48:33 EDT
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.