Bug 391821

Summary: vsftpd file listing issue with wildcard
Product: Red Hat Enterprise Linux 3 Reporter: Michal Nowak <mnowak>
Component: vsftpdAssignee: Martin Nagy <mnagy>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 3.9CC: hripps, mbarabas, mnagy, ohudlick
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-27 13:16:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 392181    

Description Michal Nowak 2007-11-20 10:11:24 UTC
+++ This bug was initially created as a clone of Bug #244864 +++

Description of problem:

The wildcarding code misses trivially valid cases

  ls *1

will match

  A1
  b9087654321

but will fail against

  a11

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

vsftpd-2.0.1-5.EL4.5

How reproducible:

always

Steps to Reproduce:
1. create files on server  A1 A21 A11
2. ftp in and ls *1
3.
  
Actual results:

ftp> ls *1
 227 Entering Passive Mode (10,1,2,3,61,93)
 150 Here comes the directory listing.
 -rw-rw-r-- 1 500   500   0 Jun 11 00:30 A1
 -rw-r--r-- 1 0   0   0 Jun 12 01:55 A21

Expected results:

ftp> ls
 227 Entering Passive Mode (10,1,2,3,227,184)
 150 Here comes the directory listing.
 -rw-rw-r-- 1 500   500   0 Jun 11 00:30 A1
 -rw-rw-r-- 1 500   500   0 Jun 11 00:35 A11
 -rw-r--r-- 1 0   0   0 Jun 12 01:55 A21


Additional info:

The problem is due to the fact the match code is not greedy enough. Having found
a match it needs to speculatively scan for further matches without a permanent
failure.

Comment 1 Michal Nowak 2007-11-20 10:16:05 UTC
[root@nec-em11 regressions]# rpmquery vsftpd
vsftpd-1.2.1-3E.15


covered-by RHTS script:
/CoreOS/vsftpd/regressions/testbug_wildcard_matching


Comment 2 Radek Vokál 2007-11-27 13:16:02 UTC
For RHEL3 we're looking only at security and performance issues. Thus closing as
WONTFIX.