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 1166741 - Wildcard "?" does not work correctly in vsftpd-3.0.2-9.el7
Summary: Wildcard "?" does not work correctly in vsftpd-3.0.2-9.el7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vsftpd
Version: 7.0
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Martin Sehnoutka
QA Contact: Stefan Kremen
URL:
Whiteboard:
: 1086873 (view as bug list)
Depends On:
Blocks: 1203710 1295829 1311475
TreeView+ depends on / blocked
 
Reported: 2014-11-21 15:40 UTC by Javier Coscia
Modified: 2020-02-14 17:27 UTC (History)
11 users (show)

Fixed In Version: vsftpd-3.0.2-11.el7_2
Doc Type: Bug Fix
Doc Text:
Previously, due a bug, the vsftpd service did not handle the question mark character "?" correctly when used in the middle of filenames. As a result, the service sent incorrect responses to clients using question marks in this way. This has been fixed and vsftpd now responds correctly in this situation.
Clone Of:
: 1311475 (view as bug list)
Environment:
Last Closed: 2016-11-04 01:32:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch from Bug 799245 (602 bytes, patch)
2016-02-03 19:45 UTC, Bryan Mason
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 76543 0 None None None Never
Red Hat Product Errata RHBA-2016:2242 0 normal SHIPPED_LIVE vsftpd bug fix and enhancement update 2016-11-03 13:29:21 UTC

Internal Links: 1392156

Description Javier Coscia 2014-11-21 15:40:23 UTC
Description of problem:

While trying to list files using the "?" wildcard through ftp linux clients, if the wildcard isn't at the end of the query it won't list the file

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

Red Hat Enterprise Linux Server release 7.0 (Maipo)
vsftpd-3.0.2-9.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. ftp to localhost
2. use wildcard "?" to list files in path

Actual results:

If the wildcard "?" is in the middle it won't list the file(s)

Expected results:

It should list the file using the "?" character in any location

Additional info:

Testing on RHEL 7 with vsftpd-3.0.2-9.el7.x86_64

ftp> ls aaa.tx?
229 Entering Extended Passive Mode (|||18064|).
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 Nov 21 15:04 aaa.txt
226 Directory send OK.

ftp> ls aaa.t?t
229 Entering Extended Passive Mode (|||25136|).
150 Here comes the directory listing.
226 Directory send OK.

ftp> ls aa?.txt
229 Entering Extended Passive Mode (|||65270|).
150 Here comes the directory listing.
226 Directory send OK.

ftp> ls ?aa.txt
229 Entering Extended Passive Mode (|||34540|).
150 Here comes the directory listing.
226 Directory send OK.

Testing on RHEL 6 with vsftpd-2.2.2-13.el6_6.1.x86_64

ftp> ls aaa.tx?
227 Entering Passive Mode (127,0,0,1,137,146).
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 Nov 21 15:13 aaa.txt
226 Directory send OK.

ftp> ls aaa.t?t
227 Entering Passive Mode (127,0,0,1,145,44).
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 Nov 21 15:13 aaa.txt
226 Directory send OK.

ftp> ls aaa.?xt
227 Entering Passive Mode (127,0,0,1,233,19).
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 Nov 21 15:13 aaa.txt
226 Directory send OK.

This seems to be a regression of BZ [799245](https://bugzilla.redhat.com/show_bug.cgi?id=799245)

Comment 3 lunix4knmi 2015-02-17 15:58:53 UTC
Any update on this?

Comment 10 Bryan Mason 2016-02-03 19:45:07 UTC
Created attachment 1120893 [details]
Patch from Bug 799245

This patch applies cleanly and appears to resolve the issue:

Before (vsftpd-3.0.2-9.el7.x86_64):

$ lftp sf01551872-test
lftp sf01551872-test:~> user anonymous
Password: 

lftp anonymous@sf01551872-test:~> ls
-rw-r--r--    1 0        0               0 Feb 03 19:37 aaa.txt
-rw-r--r--    1 0        0               0 Feb 03 19:37 file
drwxr-xr-x    2 0        0            4096 Mar 07  2014 pub

lftp anonymous@sf01551872-test:/> ls aaa.tx?
-rw-r--r--    1 0        0               0 Feb 03 19:37 aaa.txt

lftp anonymous@sf01551872-test:/> ls aaa.t?t
lftp anonymous@sf01551872-test:/>

After (vsftpd-3.0.2-10.el7_2.bz1166741.1.x86_64)

$ lftp sf01551872-test
lftp sf01551872-test:~> user anonymous              
Password: 

lftp anonymous@sf01551872-test:~> ls
-rw-r--r--    1 0        0               0 Feb 03 19:37 aaa.txt
-rw-r--r--    1 0        0               0 Feb 03 19:37 file
drwxr-xr-x    2 0        0            4096 Feb 03 18:43 pub

lftp anonymous@sf01551872-test:/> ls aaa.tx?
-rw-r--r--    1 0        0               0 Feb 03 19:37 aaa.txt

lftp anonymous@sf01551872-test:/> ls aaa.t?t
-rw-r--r--    1 0        0               0 Feb 03 19:37 aaa.txt

Comment 21 Martin Sehnoutka 2016-04-05 11:53:25 UTC
*** Bug 1086873 has been marked as a duplicate of this bug. ***

Comment 25 errata-xmlrpc 2016-11-04 01:32:27 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, 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://rhn.redhat.com/errata/RHBA-2016-2242.html


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