Bug 705324 - cifs: regression in unicode conversion routines when mounting with -o mapchars
Summary: cifs: regression in unicode conversion routines when mounting with -o mapchars
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jeff Layton
QA Contact: Jian Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-17 11:34 UTC by Jeff Layton
Modified: 2014-03-04 00:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 10:09:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cifs -- fix cifsConvertToUCS for the mapchars case (1.97 KB, patch)
2011-05-17 11:34 UTC, Jeff Layton
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1065 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.7 kernel security and bug fix update 2011-07-21 09:21:37 UTC

Description Jeff Layton 2011-05-17 11:34:21 UTC
Created attachment 499315 [details]
cifs -- fix cifsConvertToUCS for the mapchars case

The patches for bug 659715 introduced a regression when mounting with -o mapchars. In the switch statement in cifsConvertToUCS, the default case does a "continue" without ever placing the character in the string. The attached patch fixes it.

Comment 1 RHEL Program Management 2011-05-17 11:39:17 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Jeff Layton 2011-05-18 13:07:31 UTC
To test this, mount any share with -o mapchars and then try to access files on it. For instance, assuming you have such a share mounted on /mnt/cifs:

    # stat /mnt/cifs/foobar

...you'll get the inode info for the root of the share. This is because the unicode conversion of filenames is broken here. With the patch, everything should work as expected.

Comment 6 Jarod Wilson 2011-05-25 16:30:26 UTC
Patch(es) available in kernel-2.6.18-264.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5
Detailed testing feedback is always welcomed.

Comment 8 Jian Li 2011-06-03 03:04:51 UTC
This bug is reproduced on 2.6.18-261.el5, and verified on 2.6.18-264.el5, test result is as follow:

[root@intel-s3e36-01 ~]# uname -a
Linux intel-s3e36-01.rhts.eng.nay.redhat.com 2.6.18-261.el5 #1 SMP Thu May 12 16:47:18 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@intel-s3e36-01 ~]# mount | grep cifs
//localhost/test on /mnt/test type cifs (rw,mand)
[root@intel-s3e36-01 ~]# ll /test
total 8
-rw-r--r-- 1 root root 5 Jun  2 22:49 test
[root@intel-s3e36-01 ~]# ll /test/test
-rw-r--r-- 1 root root 5 Jun  2 22:49 /test/test
[root@intel-s3e36-01 ~]# ll /mnt/test/test
total 8
-rw-r--r-- 1 root root 5 Jun  2 22:49 test

[root@intel-s3e36-01 ~]# uname -a
Linux intel-s3e36-01.rhts.eng.nay.redhat.com 2.6.18-264.el5 #1 SMP Tue May 24 15:18:55 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@intel-s3e36-01 ~]# mount | grep cifs
//localhost/test on /mnt/test type cifs (rw,mand)
[root@intel-s3e36-01 ~]# ll /test
total 8
-rw-r--r-- 1 root root 5 Jun  2 22:49 test
[root@intel-s3e36-01 ~]# ll /mnt/test/test
-rw-r--r-- 1 root root 5 Jun  2 22:49 /mnt/test/test

Comment 9 errata-xmlrpc 2011-07-21 10:09:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1065.html


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